public class SelectTag extends FreeMarkerTag
Parameters:
java.util.List filled with instances of
SelectOption
<@select list=books>
<option value="3">A Tale of Two Cities</option>
</@>
And pass this data from controller:
view("books", list(new SelectOption(1, "The Hitchhiker's Guide to the Galaxy"), new SelectOption(2, "All Quiet on Western Front", true)));
then the output from the tag will be:
<select>
<option value="3">A Tale of Two Cities</option>
<option value="1">The Hitchhiker's Guide to the Galaxy</option>
<option value="2" selected="true">All Quiet on Western Front</option>
</select>
Which means that the generated code is appended to hand-written body.
<select data="data-greeting='hola' data-bye='astalavista'" > ... </select>
| Constructor and Description |
|---|
SelectTag() |
| 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, xhrprotected void render(Map params, String body, Writer writer) throws Exception
FreeMarkerTagrender in class FreeMarkerTagparams - 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.