public class FormTag extends FreeMarkerTag
<@form... />
tag.
This tag generates an HTML form tag and has functionality specific for ActiveWeb.
Like any other ActiveWeb tag, it has ability to pass through any non - ActiveWeb attributes. This means that if you
specify any attribute that is not mentioned here, it will be passed through as a regular HTML attribute.
Attributes:
<form action="controller/action/id"
. Do not confuse with HTML element ID.
Optional.<form id="123..."
. Optoinal.RESTful
for more information.
Examples (given that the current context is "simple_context"):
<@form controller="simple" action="index" method="get"/>will generate this HMTL:
<form action="/simple_context/simple/index" method="get"/>
<@form controller="simple" action="index" id="123" method="post" html_id="formA"/>will generate:
<form action="/simple_context/simple/index/123" method="post" id="formA"/>
<@form controller="simple" action="index" method="put"> <input type="hidden" name="blah"> </@form>will generate this HMTL:
<form action="/simple_context/simple/index" method="post"> <input type='hidden' name='_method' value='put' /> <input type="hidden" name="blah"> </form>
<@form controller="photos" id="x123" method="put" html_id="formA"> <input type="hidden" name="blah"> </@form>will generate:
<form action="/simple_context/photos/x123" method="post" id="formA"> <input type='hidden' name='_method' value='put' /> <input type="hidden" name="blah"> </form>
<@form data="data-greeting='hola' data-bye='astalavista'" ... >
Constructor and Description |
---|
FormTag() |
Modifier and Type | Method and Description |
---|---|
protected void |
render(Map params,
String body,
Writer writer)
Implement this method ina concrete subclass.
|
appContext, context, cookie, cookies, cookieValue, execute, exists, format, get, getAllVariables, getContextPath, getId, getLocale, getRequestHost, getRequestPort, getRequestProtocol, getRoute, getUnwrapped, getUnwrapped, header, headers, host, ipAddress, ipForwardedFor, isDelete, isGet, isHead, isMethod, isPost, isPut, isXhr, locale, logger, method, overrideContext, param, params, params, params1st, path, port, process, protocol, queryString, remoteAddress, remoteHost, requestHas, session, session, sessionObject, uri, url, userAgent, validateParamsPresence, xhr
protected void render(Map params, String body, Writer writer) throws Exception
FreeMarkerTag
render
in class FreeMarkerTag
params
- this is a list of parameters as provided to tag in HTML.body
- body of tagwriter
- writer to write output to.Exception
- if anyCopyright © 2016. All rights reserved.