Project Documentation

Summary

Tag name: <tr:selectItem>
UIComponent class: org.apache.myfaces.trinidad.component.core.input.CoreSelectItem
Component type: org.apache.myfaces.trinidad.CoreSelectItem
The selectItem tag represents a single item that the user may select from a list, choice, radio, or shuttle Trinidad control. It may be used in place of the JSF selectItem or selectItems tags, but is very similar (largely not requiring "item" in front of its attributes.)

Code Example(s)

<tr:selectOneRadio value="#{bean.aValue}" required="true">
  <tr:selectItem label="Option1" value="1"/>
  <tr:selectItem label="Option1" value="2"/>
  <tr:selectItem label="Option1" value="3"/>
</tr:selectOneRadio>

Events

Type Phases Description
org.apache.myfaces.trinidad.event.AttributeChangeEventInvoke Application,
Apply Request Values
Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change event might include the width of a column that supported client-side resizing.

Attributes

Name Type Supports EL? Description
attributeChangeListenerjavax.el.MethodExpressionOnly EL a method reference to an attribute change listener. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change events might include the width of a column that supported client-side resizing.
bindingorg.apache.myfaces.trinidad.component.core.input.CoreSelectItemOnly EL an EL reference that will store the component instance on a bean. This can be used to give programmatic access to a component from a backing bean, or to move creation of the component to a backing bean.
disabledbooleanYes Default Value: false

whether the item is disabled. By default, no items are disabled.
idStringNo the identifier for the component. The identifier must follow a subset of the syntax allowed in HTML:
  • Must not be a zero-length String.
  • First character must be an ASCII letter (A-Za-z) or an underscore ('_').
  • Subsequent characters must be an ASCII letter or digit (A-Za-z0-9), an underscore ('_'), or a dash ('-').
labelStringYes the user-visible text of the item
longDescStringYes the description associated with this option. This is used in selectManyShuttle and selectOrderShuttle, and ignored otherwise.
renderedbooleanYes Default Value: true

whether the component is rendered. When set to false, no output will be delivered for this component (the component will not in any way be rendered, and cannot be made visible on the client). If you want to change a component's rendered attribute from false to true using PPR, set the partialTrigger attribute of its parent component so the parent refreshes and in turn will render this component.
shortDescStringYes The short description of the bean. This text is commonly used by user agents to display advisory information about the option.
valueObjectYes the value used to identify this item when the parent control is submitted to the server. If no value is specified for a particular item, the item's contents will be used as its value.