h
Standard Syntax: XML Syntax:
<@tgi pei=h ui"tp/jv.u.o/s/tl % % alb rfx"" r=ht:/aasncmjfhm" > <nxllmn xlsh"tp/jv.u.o/s/tl / aymeeet mn:=ht:/aasncmjfhm" >
Ti tglbaycnan JvSre Fcscmoettg fralUCmoet+HM RneKtRnee cmiain dfndi teJvSre FcsSeiiain hs a irr otis aaevr ae opnn as o l Iopnn TL edri edrr obntos eie n h aaevr ae pcfcto.
Tag Summary
Renders an HTML "input" element. Decode Behavior Obtain the M pfrom the "requestParameterMap" property of the E t r a C n e t If the value in the M pfor the value of the "clientId" a xenlotx. a property of the component is n l , create a String by concatenating the value of the "clientId" property of the component with the String ".x" ul (without the quotes). Create another String in the same manner, but concatenate ".y" (without the quotes). If n l is the value in the M pfor ul a both Strings, return from d c d ( . If the value in the M pfor the value of the "clientId" property of the component is not n l , get the value eoe) a ul of the "type" attribute, and convert it to lower case. If the result is equal to the String "reset" (without the quotes), return from d c d ( . eoe) Otherwise, create a j v x f c s e e t A t o E e taround the component, and pass it to the q e e v n ( method of the component, aa.ae.vn.cinvn uuEet) which must be an instance of U C m a d Iomn. Encode Behavior
commandButton
Render the clientId of the component as the value of the "name" attribute. Render the current value of the component as the value of the "value" attribute. If "image" attribute is specified render it as the value of the "src" attribute after passing it to the g t e o r e R ( method eRsucUL) of the V e H n l rfor this application, and passing the result through the e c d R s u c U L )method of the E t r a C n e t Note iwade noeeoreR( xenlotx. that calling g t e o r e R ( will prefix the context-root of the current application if the value of the "src" attribute starts with "/". When eRsucUL) handling the "image" attribute, the value must not be escaped. For example, &must not be turned into & m ; If the "styleClass" attribute is ap. specified, render its value as the value of the "class" attribute. If the user has specified an "onclick" attribute, append that JavaScript to any existing JavaScript before rendering. If the component being rendered by this renderer has any U P r m t rchildren, each one of them must be rendered using the renderer for Iaaee component-family: "javax.faces.Input" and renderer-type: "javax.faces.Hidden". For discussion, this is called the hiddenRenderer. A component with component-type "javax.faces.Input" must be created for local use in rendering each U P r m t rchild. The "id" property of Iaaee the temporary component must be set to the "name" of the U P r m t r The "value" property of the temporary component must be set to Iaaee. the "value" of the U P r m t r For each U P r m t rchild, the hiddenRenderer must have its e c d B g n ) e c d C i d e ( , and Iaaee. Iaaee noeei(, noehlrn)
e c d E d )methods called, in order, passing the temporary component as the second argument. noen(
Render an HTML "a" anchor element that acts like a form submit button when clicked. General Behaviour Both the encode and decode behavior require the ability to get the id/name for a hidden field, which may be rendered in markup or which may be programmatically added via client DOM manipulation, whose value is set by the JavaScript form submit. This name must be constructed as follows: Get the clientId for the form of which this component is a child. Append N m n C n a n r S P R T R C A . aigotie.EAAO_HR Append a constant string that is the same for all command link components in the tree. In the following text, this String is called hiddenFieldName. Decode Behavior Obtain the "clientId" property of the component. Obtain the M pfrom the "requestParameterMap" property of the E t r a C n e t Derive a xenlotx. hiddenFieldName as above. Get the entry in the M punder the key that is the hiddenFieldName. If the there is no entry, or the entry is the a empty String, or the entry is not equal to the value of the "clientId" property, return immediately. If there is an entry, and its value is equal to the value of the "clientId" property, create a new j v x f c s e e t A t o E e tinstance around the component and call aa.ae.vn.cinvn
javaserverfaces.java.net/nonav/docs/2.0/pdldocs/facelets/h/tld-summary.html
1/9
11/19/12
commandLink
Render the current value of the component as the link text if it is specified. Render JavaScript that is functionally equivalent to the following as the value of the "onclick" attribute:
dcmn.om[CIN_D]'idnilNm'.au=CIN_D;dcmn.om[CIN_D] ouetfrs'LETI'[hdeFedae]vle'LETI' ouetfrs'LETI' [PRM_AE]vle'AA1VLE;dcmn.om[CIN_D]'AA2NM'.au=PRM_AU' rtr fle 'AA1NM'.au=PRM_AU' ouetfrs'LETI'[PRM_AE]vle'AA2VLE; eun as;
document.forms['CLIENT_ID'].submit()" where hiddenFieldName is as described above, CLIENT_ID is the clientId of the UICommand component, PARAM*_NAME and PARAM*_VALUE are the names and values, respectively, of any nested UIParameter children. The name and the value must be URLEncoded. If an "onclick" attribute was specified by the user, render this JavaScript in a function, and render the user's JavaScript in a function. Render both functions in a choice function as follows:
dcmn.om[CIN_D]tre=TRE' ouetfrs'LETI'.agt'AGT;
Where TARGET is the value of the target attribute on the JSP tag.
Renders an HTML "table" element compliant with the HTML 401 specification. Render the "caption" facet, if present, inside a "caption" element immediately below the "table" element. If the "captionClass" attribute is specified, render its value as the value of the "class" attribute on the "caption" element. If the "captionStyle" attribute is specified, render its value as the value of the "style" attribute on the "caption" element. Please consult the javadoc for U D t to supplement this specification. If the "styleClass" attribute is specified, render its value as the value of the Iaa "class" attribute on the "table" element. Any pass-through attributes are also rendered on the "table" element. Column Groups If the U D t component has a "colgroups" facet, render its contents. Consistent with the rules of facets in general, this facet must have only Iaa one child. In general, this will be a p n l g o pcomponent that will contain c l r u and c lelements per the HTML Table specification. ae ru ogop o Use of column grouping can improve accessibility. This facet must be rendered before the table header and footer. Rendering the header If the U D t component has a "header" facet, or any of the child U C l m components has a "header" facet, render a "thead" element. If Iaa Ioun the U D t component has a "header" facet, encode its contents inside of "tr" and "th" elements, respectively. Output the value of the Iaa "headerClass" attribute of the U D t component, if present, as the value of the "class" attribute on the "th". Output the number of child Iaa
U C l m components of the U D t component as the value of the "colspan" attribute on the "th". Output "colgroup" as the value of the Ioun Iaa
"scope" attribute on the "th" element. If any of the child U C l m components has a "header" facet render a "tr" element. For each U C l m that actually has a "header" facet, Ioun Ioun render it inside of a "th" element. Columns that don't have a "header" facet cause an empty "th" element to be rendered. Output the value of the "headerClass" attribute of the U C l m component, if present, as the value of the "class" attribute on the "th". If the "headerClass" Ioun attribute of the U C l m component is not present, output the value of the "headerClass" attribute of the U D t component, if present, as Ioun Iaa the value of the "class" attribute on the "th". Output "col" as the value of the "scope" attribute on the "th" element.
dataTable
Close out the "thead" element. Rendering the footer Follow the same process as for the header, except replace "header" with "footer", "th" with "td", "thead" with "tfoot", and "headerClass" with "footerClass". Do not render any "scope" attribute for the footer. Rendering the table body Look at the value of the "bodyrows" attribute. If present, this must be a comma separated list of integers. Each entry in this list is the row index of the row before which a "tbody" element should be rendered. If there was no "bodyrows" attribute, or it was empty, render a "tbody" element. Keep track of the result of the "rows" property on the U D t Iaa
javaserverfaces.java.net/nonav/docs/2.0/pdldocs/facelets/h/tld-summary.html
2/9
11/19/12
U C l m child. Close out the "td" or "th" element. When done with the row, close out the "tr" element. When done with all the rows, close out Ioun
the "tbody" element. When done rendering all the rows, set the "rowIndex" property of the U D t to -1, and close out the "table" element. Iaa
U F r component, call s t u m t e ( r e on the form, otherwise call s t u m t e ( a s )on the form. Iom eSbitdtu) eSbitdfle
Encode Behavior The value of the "method" attribute must be "post". The value of the "action" attribute must be the result of passing the view identifier of the current view to the g t c i n R ( method of the V e H n l rfor this application, then passing that String to the e c d A t o U L ) eAtoUL) iwade noecinR( method on the E t r a C n e t The value of the acceptcharset attribute must be rendered as the value of "accept-charset". If the xenlotx. "styleClass" attribute is specified, render its value as the value of the "class" attribute. Render a "name" attribute with a value the same as the "id" attribute as described in "General Notes on Encoding" regarding the "id" attribute for UIInput components.
form
Obtain the U V e R o v e i e t f e and use it to obtain an a t o U Lby calling V e H n l r g t c i n R . Use the a t o U L Iiwot iw dniir cin R iwade.eAtoUL cin R to obtain an e c d d a t o U Lby calling E t r a C n e t e c d A t o U L Obtain an e c d d p r i l a t o U Lby calling noe cin R xenlotx.noecinR. noe ata cin R
E t r a C n e t e c d P r i l c i n R using a t o U Las the argument. Compare the result from xenlotx.noeataAtoUL cin R E t r a C n e t e c d P r i l c i n R with the value from E t r a C n e t e c d A t o U L ) If they are different, render a xenlotx.noeataAtoUL xenlotx.noecinR(.
hidden field with the name j v x f c s e c d d R and the value of this hidden field as the value from aa.ae.noeUL
EtraCnetecdPrilcinR. xenlotx.noeataAtoUL
Call V e H n l r w i e t t ( before the the close of the "form" element. Render all the necessary hidden iwade.rtSae) fields for all commandLink instances in the page just before the close of the "form" element. Just before rendering the closing < f r > element tag, render any resources that have been targeted /om for this form: Obtain a U V e R o instance. Iiwot Obtain a L s of component resources targeted for this form with a call to it U V e R o . e C m o e t e o r e ( with the S r n " o m as the argument. IiwotgtopnnRsucs) tig fr" Iterate over the returned L s of U C m o e t instances and call e c d A l on each U C m o e t instance. it Iopnn noel Iopnn
Renders an HTML "img" element. Render the clientId as the value of the "id" attribute. Handling the Value If the "name" attribute is present, execute algorithm Common Algorithm for Obtaining A Resource to Render to obtain a R s u c instance. eore Call R s u c . e R q e t a h )and output the result as the value of the "src" attribute on the rendered markup. eoregteusPt(
graphicImage
Otherwise, if the "url" attribute is present, treat its value as if it was the value of the "value" attribute. Otherwise, if the "value" attribute is present, render the value of the component as the value of the "src" attribute, after passing it to the g t e o r e R ( method of the eRsucUL)
V e H n l rfor this application, and passing the result through the e c d R s u c U L )method of the E t r a C n e t iwade noeeoreR( xenlotx.
When handling the "src" attribute, the value must not be escaped. For example, &must not be turned into & m ; If the "styleClass" attribute ap. is specified, render its value as the value of the "class" attribute.
Renders an HTML "input" element of type "hidden". Decode Behavior See the decode description for the Input Text renderer.
inputHidden
Encode Behavior Render the clientId of the component as the value of the "name" attribute. Render the current value of the component as the value of the "value" attribute.
Renders an HTML "input" element of "type" "password". Decode Behavior See the decode description for the Input Text renderer.
inputSecret
javaserverfaces.java.net/nonav/docs/2.0/pdldocs/facelets/h/tld-summary.html
3/9
11/19/12
Renders an HTML "input" element of "type" "text". Decode Behavior Obtain the M pfrom the "requestParameterMap" property of the E t r a C n e t If the M pcontains an entry for the "clientId" of the a xenlotx. a component, pass the value of the entry to the s t u m t e V l e )method of the component, which must be an instance of eSbitdau(
inputText
EialVleodr dtbeauHle.
Encode Behavior Render the clientId of the component as the value of the "name" attribute. Render the current value of the component as the value of the "value" attribute. If the "styleClass" attribute is specified, render its value as the value of the "class" attribute.
Renders an HTML "textarea" element. Decode Behavior See the encode description for the Input Text renderer. Encode Behavior Render the clientId as the value of the "name" attribute. Render the current valu eof the component inside the "textarea" element.
inputTextarea
Render a single message for a specific component. Set-up for Rendering Obtain the "summary" and "detail" properties from U M s a ecomponent. If not present, keep the empty string as the value, respectively. Iesg Obtain the first F c s e s g to render from the component, using the "for" property of the U M s a e This will be the only message we aeMsae Iesg. render. Obtain the severity style for this message. If the severity of the message is F c s e s g . E E I Y I F , the severity style comes aeMsaeSVRT_NO from the value of the "infoStyle" attribute. If the severity of the message is F c s e s g . E E I Y W R , the severity style comes from the aeMsaeSVRT_AN value of the "warnStyle" attribute, and so on for each of the severities, I F , W R , E R Rand F T L The same rules apply for obtaining NO AN RO AA. the severity style class, but instead of "infoStyle, warnStyle", etc use "infoClass, warnClass", etc. Obtain the "style", "styleClass" and "layout" attributes from the U M s a ecomponent. If we have a "style" attribute and a severity style attribute, use the severity style attribute as the Iesg value of the "style" attribute. If we have no "style" attribute, but do have a severity style, use the severity style as the value of the "style" attribute. The same precedence rules apply for the style class. Obtain the value of the d rand l n attributes. i ag Rendering For the message renderer, we only render one row, for the first message. For the messages renderer, we render as many rows as we have messages. If any of the "dir", "lang", "style" or "styleClass" attributes has a non-null value (as determined above), render a "span" element, outputting the value of the "style" attribute as the the value of the "style" attribute, and outputting the value of the "styleClass" attribute as the value of the "class" attribute on the "span" element. Output the "dir" and "lang" attributes as well, if they are present. If the U M s a ehas a Iesg "tooltip" attribute with the value of "true", and the U M s a ehas "showSummary" and "showDetail" properties with the value "true", if we Iesg haven't already written out the "span", output the "summary" as the value of the "title" attribute on the "span". If we haven't already written out a "title" attribute, and "showSummary" is true, output the summary. If "showDetail" is true, output the detail. Close out the span if necessary.
message
The same as for the Message renderer, but output all the messages. If an "id" attribute has been specified, it must be rendered on the outermost markup corresponding to this component. If the value of the "layout" attribute is "table", render nested "table", "tr", and "td" elements, in that order. If the value of the "layout" attribute is "list", or the "layout" attribute is not specified, render nested "ul", "li" elements, in that order. Output the value of the "style" attribute as the value of the "style" attribute, output the value of the "styleClass" attribute as the value of the "class" attribute, and
messages
output the dir and lang attributes. Output these values on the "table" element or the "ul" element. Output the values of the "errorStyle", "fatalStyle", "infoStyle", "warnStyle" attributes as the value of the "style" attribute on either the "tr" element or the "li" element. Output the values of the "errorClass", "fatalClass", "infoClass", "warnClass" attributes as the value of the "class" attribute on either the "tr" element or the "li" element. The component is a U M s a e , and there is no "for" attribute. Therefore, use either n l to obtain the messages from the F c s o t x or the empty Iesgs ul aeCnet string if the components "globalOnly" property is t u . If the layout was "table" close out the table elements, otherwise, close out the list elements. re
button
Render an HTML "input" element of type "button". The value of the component is rendered as the button text and the outcome of the component is used to determine the target URL which is activated by onclick. If "image" attribute is specified, render it as the value of the "src" attribute after passing it to the g t e o r e R ( method of the V e H n l r for this application, and passing the result through the eRsucUL) iwade e c d R s u c U L ) method of the E t r a C n e t Any child U P r m t r components are appended to the String noeeoreR( xenlotx. Iaaee to be used as the target URL as query parameters before rendering. The entire target URL string must be passed through a call to the e c d R s u c U L ) method of the E t r a C n e t The name of the U P r m t r noeeoreR( xenlotx. Iaaee goes on the left hand side, and the value of the U P r m t r on the right hand side. The name and the value Iaaee must be URLEncoded. Each U P r m t r instance is separeted by an ampersand, as dictated in the URL spec. Iaaee
javaserverfaces.java.net/nonav/docs/2.0/pdldocs/facelets/h/tld-summary.html
4/9
11/19/12
The final encoded result will be written out to the onclick attribute of the button as "window.location.href = ''". If the developer has specified a custom onlclick the window.location.href name/value pair will be appended at the end of the developer specified script. If the "fragment" attribute is specified, the value will be included at the end of the resulting URL preceded by a hash mark. If the "styleClass" attribute is specified, render its value as the value of the "class" attribute. If the "id" attribute is specified, follow the same steps as mentioned in the "General Notes on Encoding" regarding the "id" attribute for UIInput components. If the "disabled" attribute is specified, do not render the "onclick" element and assign the "disabled" attribute a value of true. Render an HTML "a" anchor element. The value of the component is rendered as the anchor text and the outcome of the component is used to determine the target URL rendered in the "href" attribute. Any child U P r m t r components are appended to the String to be output as the value of the "href" attribute as Iaaee query parameters before rendering. The entire "href" string must be passed through a call to the e c d R s u c U L ) method of the E t r a C n e t The name of the U P r m t r goes on the left hand side, and noeeoreR( xenlotx. Iaaee the value of the U P r m t r on the right hand side. The name and the value must be URLEncoded. Each Iaaee U P r m t r instance is separated by an ampersand, as dictated in the URL spec. If the "fragment" attribute Iaaee is specified, the value will be included at the end of the resulting URL preceded by a hash mark. If the "styleClass" attribute is specified, render its value as the value of the "class" attribute. If the "id" attribute is specified, follow the same steps as mentioned in the "General Notes on Encoding" regarding the "id" attribute for UIInput components. If the "disabled" attribute is specified, do not render the HTML "a" anchor element or the "href" element. Instead, render a "span" element. If the "styleClass" attribute is specified, render its value as the value of the "class" attribute on the "span". Render any pass-through attributes on the "span".
Render the markup for a < o y element. bd> Decode Behavior No action is required during decode for this renderer. Encode Behavior Render the starting < o y element tag. Just before rendering the closing < b d >element tag, render any resources that have been bd> /oy targeted for this "body" element:
link
body
Obtain a Obtain a
U V e R o instance. Iiwot L s of component resources targeted for this "body" element with a call to it U V e R o . e C m o e t e o r e ( with the S r n " o y as the argument. Render the ending < b d > IiwotgtopnnRsucs) tig bd" /oy
L s of U C m o e t instances it Iopnn
and call
e c d A l on noel
each
U C m o e t instance. Iopnn
Any attributes declared on the element must be passed through unmodified to the rendered output.
Render parameterized text. Obtain the s y e s y e l s , d r and l n attributees from this component. If any are present, render a "span" tl, tlCas i, ag element. Output the s y e l s attribute (if present) as the value of the c a sattribute. Output the s y eattribute as the value of the s y e tlCas ls tl tl attribute. Output the d rand l n attributes as pass through attributes. Accrue a list of the values of all child U P r m t rcomponents of this i ag Iaaee component. If there are one or more accumulated parameter values, convert the list of parameter values to an O j c array, call bet
outputFormat
M s a e o m t f r a ( , passing the v l eof this component as the first argument, and the array of parameter values as the second argument, esgFra.omt) au
and render the result. Otherwise, render the v l eof this component unmodified. au Render the markup for a < e d element. ha> Decode Behavior No action is required during decode for this renderer. Encode Behavior Render the starting < e d element tag. Any attributes declared on the element must be passed through unmodified to the rendered output. ha> Just before rendering the closing < h a >element tag, render any resources that have been targeted for this "head" element: /ed
head
Obtain a Obtain a
U V e R o instance. Iiwot L s of component resources targeted for this "head" element with a call to it U V e R o . e C m o e t e o r e ( with the S r n " e d as the argument. IiwotgtopnnRsucs) tig ha" Iterate over the returned L s of U C m o e t instances and call e c d A l on each U C m o e t instance. it Iopnn noel Iopnn
Any attributes declared on the element must be passed through unmodified to the rendered output.
tag.
outputLabel
Renders an HTML "label" element. Render the current value of the component as label text if it is specified. If a "for" attribute is specified, find the component specified by the value of the "for" attribute, and render its client id as the value of the "for" attribute. If "styleClass" attribute is specified, render its value as the value of the "class" attribute. Render an HTML "a" anchor element. The value of the component is rendered as the value of the "href" attribute. Any child UIParameter components are appended to the String to be output as the value of the "href" attribute as query parameters before rendering. The entire "href" string must be passed through a call to the e c d R s u c U L ) method of the E t r a C n e t The name of the UIParameter goes on the left noeeoreR( xenlotx. hand side, and the value of the UIParameter on the right hand side. The name and the value must be URLEncoded. Each UIParameter instance is separeted by an ampersand, as dictated in the URL spec. If the
outputLink
javaserverfaces.java.net/nonav/docs/2.0/pdldocs/facelets/h/tld-summary.html
5/9
11/19/12
"styleClass" attribute is specified, render its value as the value of the "class" attribute. If the "id" attribute is specified, follow the same steps as mentioned in the "General Notes on Encoding" regarding the "id" attribute for UIInput components. If the "disabled" attribute is specified, do not render the HTML "a" anchor element or the "href" element. Instead, render a "span" element. If the "styleClass" attribute is specified, render its value as the value of the "class" attribute on the "span". Render any pass-through attributes on the "span". If the "styleClass", "style", "dir" or "lang" attributes are present, render a "span" element. If the "styleClass" attribute is present, render its value as the value of the "class" attribute. If the "style" attribute is present, pass it thru. If the "escape" attribute is not present, or it is present and its value is "true" all angle brackets should be converted to the ampersand xx semicolon syntax when rendering the value of the "value" attribute as the value of the component. If the "escape" attribute is present and is "false" the value of the component should be rendered as text without escaping.
Render the markup for a < c i t element that renders the script R s u c specified by the optional n m attribute and l b a yattributes. srp> eore ae irr The implementation of this renderer must have a @ i t n r o annotation attached to it, at the class level, declaring P s A d o i w v n . l s LseeFr otdTVeEetcas as the value of the s s e E e t l s attribute. The presence of this annotation on a renderer implies the renderer implements ytmvnCas
outputText
C m o e t y t m v n L s e e , which this renderer must do. The implementation of p o e s v n ( must extract the U C m o e tfrom the opnnSseEetitnr rcsEet) Iopnn
argument event and look for the presence of the key "t r e " in the component's attribute M p If and only if such a key is present, the agt a. implementation of p o e s v n ( must pass the component to U V e R o . d C m o e t e o r e ) rcsEet) IiwotadopnnRsuc(. Decode Behavior No action is required during decode for this renderer. Encode Behavior Common Algorithm for Obtaining A Resource to Render This algorithm is used by all resource renderers to obtain a R s u c instance which is then rendered in a specific way depending on eore what kind of renderer is doing the encoding. Look in the component attribute M pfor a value under the key name. a Look in the component attribute M pfor a value under the key library. This attribute is optional, therefore, library may be n l . a ul Create the resource by calling A p i a i n g t e o r e a d e . r a e e o r e n m , l b a y ; plcto.eRsucHnlrcetRsuc(ae irr). Common Encode Behavior This algorithm is used by all resource renderers to render the resource.
outputScript
ato. cin
If there is no name attribute, and the argument c m o e thas no children, and P o e t t g is not opnn rjcSae
P o e t t g . r d c i n add a F c s e s g for this component's clientId to the F c s o t x stating that if no name rjcSaePouto, aeMsae aeCnet
attribute is present, and no body content is present either, then the user should take action to correct this problem. In this case, e c d C i d e ( must take no further action. noehlrn) If there is no name attribute and the argument c m o e tdoes have children, the renderer must ensure that those children opnn are encoded as usual. If there is a name attribute and the argument c m o e tdoes have children, the renderer must log a descriptive localized opnn message stating that the child content will be ignored. The resource referenced by the name attribute will be rendered in
ecdEd) noen(.
If there is a name attribute and the argument c m o e tdoes not have children, e c d C i d e ( must take no action. opnn noehlrn)
e c d E d )must take specific action based on the specific kind of resource being rendered. noen(
Use the algorithm Common Encode Behavior for e c d B g n ) e c d C i d e ( and g t e d r C i d e ( . noeei(, noehlrn) eRneshlrn) For e c d E d ) use the algorithm Common Algorithm for Obtaining A Resource to Render above to obtain a reference to the R s u c to noen(, eore be encoded. If this is NOT the first time this R s u c has been referenced on this request take no action and return. eore Render a script element. Use the result from calling r s u c . e R q e t a h )as the value of the "src" attribue and the result from eoregteusPt( calling r s u c . e C n e t y e )as the value of the "type" attribute. eoregtotnTp(
Render the markup for a < i k element that renders the style R s u c specified by the optional n m and l b a yattributes. ln> eore ae irr Decode Behavior No action is required during decode for this renderer. Encode Behavior
javaserverfaces.java.net/nonav/docs/2.0/pdldocs/facelets/h/tld-summary.html
6/9
11/19/12
outputStylesheet
encoded. Output a < i k element. Use the result from calling r s u c . e R q e t a h )as the value of the "href" attribute, the result from ln> eoregteusPt( calling r s u c . e C n e t y e )as the value of the "type" attribute, the literal string "stylesheet" as the value of the "rel" attribute, and eoregtotnTp( the literal string "screen" as the value of the "media" attribute. The implementation of this renderer must have a @ i t n r o annotation attached to it, at the class level, declaring LseeFr
P s A d o i w v n . l s as the value of the s s e E e t l s attribute. The presence of this annotation on a renderer implies the otdTVeEetcas ytmvnCas
renderer implements C m o e t y t m v n L s e e , which this renderer must do. The implementation of p o e s v n ( must extract opnnSseEetitnr rcsEet) the U C m o e tfrom the argument event pass it to U V e R o . d C m o e t e o r e ) specifying the literal string "h a " as the last Iopnn IiwotadopnnRsuc(, ed argument. The stylsheet renderer must ensure that any stylesheets are included in the <head> of the document.
panelGrid
Renders an HTML "table" element, conforming to the rules in the HTML 401 specification. Render the "caption" facet, if present, inside a "caption" element immediately below the "table" element. If the "captionClass" attribute is specified, render its value as the value of the "class" attribute on the "caption" element. If the "captionStyle" attribute is specified, render its value as the value of the "style" attribute on the "caption" element. If the "styleClass" attribute is specified, render its value as the value of the "class" attribute. Render the pass-through attributes in the table below. Render the "header" facet, if present, inside of "thead", "tr", and "th" elements, nested in that order. If the "headerClass" attribute is specifed, render its value as the value of the "class" attribute on the "th" element. Render "colgroup" as the value of the "scope" attribute. Render the value of the "columns" attribute as the value of the "colspan" attribute on the "th" element. Render the "footer" facet if present, using similar logic to the rendering of the "header", but replacing "thead" with "tfoot", "th" with "td", and "headerClass" with "footerClass". Render the children of the U P n l component inside of a "tbody" element. Render the children based on the value of the Iae "columns" attribute, creating a new row each time a "columns" worth of children have been rendered. For the start of each row, render a "tr" element. Output the value of the "rowClasses" per the attribute description below. For each child, output a "td" element, attaching the value of the "columnClasses" attribute per the attribute description below. Recursively encode each child. Close out the "td" element. When done with the row, close out the "tr" element. If a child has "rendered==false" it is not rendered, and the column counter must not be incremented. Intended for use in situations when only one UIComponent child can be nested, such as in the case of facets. If the "style" or "styleClass" attributes are present, and the "layout" attribute is present with a value of "block", render a "div" element, outputting the value of the "style" attribute as the value of the "style" attribute and the value of the "styleClass" attribute as the value of the "class" attribute. Otherwise, if the "layout" attribute is not present, or the "layout" attribute contains a value other than "block", render a "span" element, outputting the value of the "style" attribute as the value of the "style" attribute, and the value of the "styleClass" attribute as the value of the "class" attribute.
Renders an HTML "input" element of type "checkbox". Decode Behavior Obtain the M pfrom the "requestParameterMap" property of the E t r a C n e t If there is no entry in the M pfor the "clientId" of this a xenlotx. a component, pass "false" to the s t u m t e V l e )method of the component, which must be an instance of E i a l V l e o d r If eSbitdau( dtbeauHle. there is an entry, and its value is equal, ignoring case and without quotes, to any of the Strings: "on", "yes" or "true" pass true to the
panelGroup
selectBooleanCheckbox
Render an HTML checkbox list. Decode Behavior See the "Decode Behavior for UISelectMany Components" section. Encode Behavior Render a "table" element. If the "styleClass" is specified, render the value of the "styleClass" attribute as the value of the "class" attribute on the "table" element. If the "style", or "border" attributes are specified, pass them thru and render their values as the "style" and "border" attributes on the "table", respectively. If the "layout" attribute is specified, and its value is "pageDirection", render the children elements vertically, otherwise horizontally, in the table. If any of the children are an instance of SelectItemGroup, render them as a nested table. Each of the children are ultimately rendererd as follows. Render an "input" element of "type" "checkbox" for each child component. Render the "name" attribute on the "input" element with the value of the c i n I of the component. Render an "id" attribute on the "input" element. letd Each "id" value must be unique. If the current SelectItem.isDisabled() returns true, render "disabled" as the value of the "disabled" attribute.
selectManyCheckbox
Close out the "input" element. Render a "label" element. Render the "for" attribute of the "label" element whose value is the corresponding "input" element's "id" value. Render any "style" as the "class" attribute on the "label" element. If the current checkbox would be rendered as being checked, and there is a "selectedClass" attribute, append a space, followed by the value of the "selectedClass" attribute to any existing
javaserverfaces.java.net/nonav/docs/2.0/pdldocs/facelets/h/tld-summary.html
7/9
11/19/12
Render an HTML option list. Decode Behavior This section documents the decode behavior for all renderers that handle U S l c M n or U S l c O ecomponents. Ieetay Ieetn Decode Behavior for U S l c M n components Ieetay Obtain the M pfrom the "requestParameterValuesMap" property of the E t r a C n e t If the M pcontains an entry for the a xenlotx. a "clientId" of the component, pass the value of the entry, cast to a S r n [ , to the s t u m t e V l e )method of the component, tig ] eSbitdau( which must be an E i a l V l e o d r If the M pdoes not contain an entry, create an empty S r n array and call dtbeauHle. a tig
selectManyListbox
Rendering the "option" elements The only valid children of this component are U S l c I e or U S l c I e sinstances. Iterate over the children of this component, Ieettm Ieettm and accrue a list of j v x f c s m d l S l c I e instances. If the current child is a S l c I e whose n S l t o P o e t is aa.ae.oe.eettm eettm oecinrpry
t u , and the U S l c O eor U S l c M n parent of this option has one or more selected values that are not the "no selection" re Ieetn Ieetay S l c I e , and the component has a "hideNoSelectionLabel" attribute whose value is t u , then the current option, which is the "no eettm re
selection" option, must not be rendered. If the current child is a U S l c I e create a S l c I e instance from its i e V l e Ieettm eettm tmau,
i e L b land i e D s r p i nproperties, add it to the list. If the current child is a U S l c I e sinstance, call its g t a u ( tmae tmecito Ieettm eVle)
method. If the result is a S l c I e bean, add it to the list. If the result is an array of S l c I e beans, add each one to the list. If eettm eettm the result is a C l e t o of S l c I e beans, add each one to the list. If the result is a M p create a S l c I e bean for each olcin eettm a, eettm entry in the M pusing the key as the label, the value as the value, and n l as the description. Iterate over the list of S l c I e a ul eettm beans. If the current element is a S l c I e G o p render an "optgroup" element with a "label" attribute, the value of which is the eettmru, "label" property from the current element, then call g t e e t t m ( and render each element as below. If the current element is eSlcIes) not a S l c I e G o p render an "option" element. Follow the conversion rules in the spec to obtain a renderable S r n from the eettmru, tig "value" property of the current element, render that as the value of the "value" atribute. Now it is time to see if the current element is the selected value. Call its g t u m t e V l e )method, casting the result to an O j c [ , otherwise the component must be a eSbitdau( bet ]
U S l c O einstance, call its g t u m t e V l e )method and create an O j c [ around the result. Determine the type of the Ieetn eSbitdau( bet ]
resultant array if the resultant array is non-null, otherwise the type is S r n . Coerce the current item value to this type following the tig Expression Language coercion rules. If the resultant array is non-null, we look in the array for a value that, when we pass the renderable value to its e u l ( method, it returns t u , meaning the current element is selected. If the resultant array is n l , if the qas) re ul component is a U S l c M n , call its g t a u ( method. If the result is a L s obtain the values in the list as an array. Otherwise, Ieetay eVle) it the component must be a U S l c O einstance. Call its g t a u ( method, which must be an Object array. Look for an element in Ieetn eVle) the resultant array that, 1. when we pass the renderable value to its e u l ( method, it returns t u , or 2. if the renderable value is qas) re null, and there is a null element in the array, also conclude that the current element is selected. Otherwise the current element is not selected. Now, if the current value is selected, write out an HTML boolean property "selected". If the current SelectItem.isDisabled() returns true, render "disabled" as the value of the "disabled" attribute.
Render an HTML option list. Decode Behavior See the "Decode Behavior for UISelectMany Components" section.
selectManyMenu
Encode Behavior
javaserverfaces.java.net/nonav/docs/2.0/pdldocs/facelets/h/tld-summary.html
8/9
11/19/12
Render an HTML option list. Decode Behavior See the "Decode Behavior for UISelectOne Components" section. Encode Behavior Render an HTML "select" element. Render the clientId of the component as the value of the "name" attribute. If the "styleClass" attribute is specified, render its value as the value of the "class" attribute on the "select" element. If the component to be rendered is a UISelectMany, render "multiple" as the value of the "multiple" attribute. If the "size" attribute is specified, render its value as the value of the "size" attribute. Otherwise use the number of items as the value of the "size" attribute. See the "Rendering the option elements" specification for
selectOneListbox
L s b x e d r rfor more detail on how to render the "option" elements in this renderer. itoRnee
Render an HTML option list. Decode Behavior See the "Decode Behavior for UISelectOne Components" section.
selectOneMenu
Encode Behavior Render an HTML "select" element. Render the clientId of the component as the value of the "name" attribute. If the "styleClass" attribute is specified, render its value as the value of the "class" attribute on the "select" element. If the component to be rendered is a UISelectMany, render "true" as the value of the "multiple" attribute. Use the number of items as the value of the "size" attribute. See the "Rendering the option elements" specification for L s b x e d r rfor more detail on how to render the "option" elements in this renderer. itoRnee
Render a set of html "input" elements of type "radio". Decode Behavior See the "Decode Behavior for UISelectOne Components" section. Encode Behavior Render a "table" element. If the "styleClass" is specified, render the value of the "styleClass" attribute as the value of the "class" attribute on the "table" element. If the "style", "border" attributes are specified, pass them thru and render their values as the "style" and "border" attributes on the "table", respectively.. If the "layout" attribute is specified, and its value is "pageDirection", render the children elements vertically, otherwise horizontally, in the table. If any of the children are an instance of SelectItemGroup, render them as a nested table. Each
selectOneRadio
of the children are ultimately rendered as follows. Render an "input" element of "type" "radio" for each child component. Render the "name" attribute on the "input" element with the value of the c i n I of the component. Render an "id" attribute on the "input" element. Each "id" letd value must be unique. If the current SelectItem.isDisabled() returns true, render "disabled" as the value of the "disabled" attribute. Close out the "input" element. Render a "label" element. Render the "for" attribute of the "label" element whose value is the corresponding "input" element's "id" value. Render any "style" as the "class" attribute on the "label" element. Close out the starting "label" element and render the label value from SelectItem.getLabel(). Close out the "label" element. As an exception to the general rules about how to handle the "id" attribute, render it as an attribute on the outer "table" element, the value of which is the c i n I of the component per the rules at the letd beginning of this specification. Coerce the value of the currently rendered child to the type of the parent UISelectOne value using the Expression Language coercion rules before comparing the values. If the value of the currently rendered child is equal to the value of the parent UISelectOne, render an appropriate HTML boolean value indicating "checked" for the enclosing "input". See the "Rendering the option elements" specification for L s b x e d r rfor more detail on how to render the "option" elements in this renderer. itoRnee
column
Renders a UIComponent that represents a single column of data within a parent U D t component. Iaa
javaserverfaces.java.net/nonav/docs/2.0/pdldocs/facelets/h/tld-summary.html
9/9