webuijsf
Tag property


Use the webuijsf:property tag inside the webuijsf:propertySheetSection tag to lay out a property in a webuijsf:propertySheet. The webuijsf:property tag allows you to encapsulate a logical property and help you lay it out on the page.

HTML Elements and Layout

The properties in a property sheet are rendered as rows in a two-column table by default. The content of each webuijsf:property tag is rendered as one row. The first column is reserved for the property label, which can be specified with either the webuijsf:property tag's label attribute or the label facet. The label facet provides more control over the content of the label area.

The second column is the content area, which contains the components that are specified as the content of the webuijsf:property tag. Each webuijsf:property tag can include multiple tags for UI components such as webuijsf:textField, webuijsf:dropdown, webuijsf:checkbox, or any other component. You can label these content components by using their label attributes or the webuijsf:label tag. These labels are displayed within the content area.

The tags for a property's content can be specified as child tags of the webuijsf:property tag, or enclosed in the webuijsf:property tag's content facet. There is no rendering difference between the two approaches.

Help text can be provided for each property with the webuijsf:property tag's helpText attribute. The help text is displayed below the content of the property in smaller text. If you want more control over the type of content provided in the help text area, you can use the helpText facet.

Several attributes can be used to change the formatting of the property label:

The attributes are described in greater detail in the list of attributes below.

Facets

The webuijsf:property tag supports the facets described below.

content
Specifies the components to include for the content of the property component. The content facet is not required, and the components can be specified as child tags. However, if both child components and the content facet are supplied, only the content facet content is displayed.
label
Specifies the component and content to use for the label, overriding the label attribute.
helpText
Specifies the component and content to use for the help text, overriding the helpText attribute.

Client Side Javascript Functions

None.

Examples

Example 1: Content Specified with Child Tags

The label is specified via the label attribute. The components of the content area are specified as children of the webuijsf:property tag.

 
   <webuijsf:property id="prop1" label="Log file name: ">           
       <webuijsf:textField id="logfile" required="true"/>
       <h:message id="logfile_error" for="logfile" showDetail="true"/> 
   </webuijsf:property>

Example 2: Using the Label Facet

The components of the content area are specified as children of the webuijsf:property tag. The label is specified via a label facet, to label the dropDown in the content area.

            
   <webuijsf:property id="prop2">    
       <f:facet name="label">
           <webuijsf:label id="prop2label" 
                     text="Select update frequency"
                     for="unit"/>
       </f:facet>   
       <webuijsf:textField id="frequency" 
                     text="#{Logger.frequency.number}"
                     label="Every "/>
       <webuijsf:dropDown id="unit" 
                    selected="#{Logger.frequency.unit}"  
                    items="#{Logger.frequency.units}"  
                    required="true"/>
       <h:message id="msg1"_msg4b" for="frequency" showDetail="true"/> 
       <h:message id="msg2" for="unit" showDetail="true"/> 
   </webuijsf:property>

Example 3: Using webuijsf:panelGroup for Content Component Layout

The components of the content area are specified inside a PanelGroup child component.

 
   <webuijsf:property id="prop3" label="Admin Server URI"> 
       <webuijsf:panelGroup id="pg">
           <webuijsf:textField id="uri" text="#{Server.uri}" required="true"/>
           <h:message id="msg3" for="uri" showDetail="true"/> 
       </webuijsf:panelGroup>                               
   </webuijsf:property>

Example 4: Using the content Facet

The components of the content area are specified inside a PanelGroup inside a facet.

 
   <webuijsf:property id="prop3" label="Admin Server URI"> 
       <f:facet name="content">
           <webuijsf:panelGroup id="pg">
               <webuijsf:textField id="uri" text="#{Server.uri}" required="true"/>
               <h:message id="msg3" for="uri" showDetail="true"/> 
           </webuijsf:panelGroup>                               
       </f:facet>                       
   </webuijsf:property>



Tag Information
Tag Classcom.sun.webui.jsf.component.PropertyTag
TagExtraInfo ClassNone
Body ContentJSP
Display NameNone

Attributes
NameRequiredRequest-timeTypeDescription
bindingfalsefalsejava.lang.String A ValueExpression that resolves to the UIComponent that corresponds to this tag. This binding allows the Java bean that contains the UIComponent to manipulate the UIComponent, its properties, and its children.
styleClassfalsefalsejava.lang.String

CSS style class(es) to be applied to the outermost HTML element when this component is rendered.

labelfalsefalsejava.lang.String

Use this attribute to specify the text of the label of this property. The text is displayed in the column that is reserved for the label of this property row. The attribute value can be a string or a value binding expression. The label is associated with the first input element in the content area of the property. To label a different component, use the label facet instead.

disabledfalsefalsejava.lang.String

Flag indicating that the user is not permitted to activate this component, and that the component's value will not be submitted with the form.

labelAlignfalsefalsejava.lang.String

Specifies the alignment for the property label. The label occupies a cell in the first column of a table that is used to lay out the properties. Set the labelAlign attribute to make the label align to the left or right of the cell. The default alignment is left. This attibute applies to labels that are specified with either the label attribute or the label facet.

visiblefalsefalsejava.lang.String

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page. If set to false, the HTML code for the component is present in the page, but the component is hidden with style attributes. By default, visible is set to true, so HTML for the component HTML is included and visible to the user. If the component is not visible, it can still be processed on subsequent form submissions because the HTML is present.

stylefalsefalsejava.lang.String

CSS style(s) to be applied to the outermost HTML element when this component is rendered.

noWrapfalsefalsejava.lang.String

Specifies that the label should not wrap around to another line, if set to true. If the label is long, the label column in the table for the property sheet section expands to accomodate the label without wrapping to a new line. This attibute applies to labels that are specified with either the label attribute or the label facet.

renderedfalsefalsejava.lang.String Use the rendered attribute to indicate whether the HTML code for the component should be included in the rendered HTML page. If set to false, the rendered HTML page does not include the HTML for the component. If the component is not rendered, it is also not processed on any subsequent form submission.
overlapLabelfalsefalsejava.lang.String

Specifies that the content of the property should occupy the label area as well as the content area, if set to true. The default value is false. This attribute is useful for properties that require the entire width of the property sheet.

idfalsetruejava.lang.StringNo Description
helpTextfalsefalsejava.lang.String

The text specified with this attribue is displayed below the content of the property in a small font. The value can be a literal String or a ValueBinding expression. If you want greater control over the content that is displayed in the help text area, use the helpText facet.


Variables
No Variables Defined.


Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.