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>
LOGGER
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.
|
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.