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'" ... >
LOGGER
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.
|
execute, get, getAllVariables, getContextPath, getUnwrapped, getUnwrapped, logger, overrideContext, process, session, sessionObject, validateParamsPresence
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
appContext, context, cookie, cookies, cookieValue, exists, format, getId, getLocale, getRequestHost, getRequestPort, getRequestProperties, getRequestProtocol, getRoute, header, headers, host, ipAddress, ipForwardedFor, isDelete, isGet, isHead, isMethod, isMultipartContent, isPost, isPut, isXhr, locale, method, param, param, params, params, params, params1st, params1st, path, port, protocol, queryString, remoteAddress, remoteHost, requestHas, servletPath, session, session, uri, url, userAgent, 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 © 2020 JavaLite. All rights reserved.