|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.faces.component Class UISelectItems
java.lang.Object javax.faces.component.UIComponent javax.faces.component.UIComponentBase javax.faces.component.UISelectItems
- All Implemented Interfaces:
- StateHolder
public class UISelectItems
- extends UIComponentBase
UISelectItems 是可以嵌入 UISelectMany
或 UISelectOne
组件内部的组件,并且会导致将一个或多个 SelectItem
实例添加到父组件的可用选项列表。此组件的 value
(直接设置,或通过 javax.el.ValueExpression
间接获得)可以为以下任一类型:
SelectItem
的单个实例 - 此实例被添加到父标记的可用选项集合。SelectItem
的数组 - 此实例集合按下标升序顺序被添加到父组件的可用选项集合。SelectItem
Collection - 此实例集合按其上迭代器提供的顺序被添加到父组件的可用选项集合。- Map - 此对象的键(转换为 String 后)假定为标签,而此对象的值(转换为 String 后)假定为
SelectItem
实例的值,可以动态构造这些实例,并按这些键上迭代器提供的顺序,将其添加到父组件的可用选项集合。
UISelectItems is a component that may be nested
inside a UISelectMany
or UISelectOne
component, and
causes the addition of one or more SelectItem
instances to the
list of available options in the parent component. The
value
of this component (set either directly, or acquired
indirectly a ValueExpression
, can be of any
of the following types:
- Single instance of
SelectItem
- This instance is added to the set of available options for the parent tag. - Array of
SelectItem
- This set of instances is added to the set of available options for the parent component, in ascending subscript order. - Collection of
SelectItem
- This set of instances is added to the set of available options for the parent component, in the order provided by an iterator over them. - Map - The keys of this object (once converted to
Strings) are assumed to be labels, and the values of this object
(once converted to Strings)
are assumed to be values, of
SelectItem
instances that will be constructed dynamically and added to the set of available options for the parent component, in the order provided by an iterator over the keys.
Field Summary | |
---|---|
static String |
COMPONENT_FAMILY
The standard component family for this component. |
static String |
COMPONENT_TYPE
The standard component type for this component. |
Fields inherited from class javax.faces.component.UIComponent |
---|
bindings |
Constructor Summary | |
---|---|
UISelectItems()
Create a new UISelectItems instance with default property
values. |
Method Summary | |
---|---|
String |
getFamily()
Return the identifier of the component family to which this component belongs. |
Object |
getValue()
Returns the value property of the
UISelectItems . |
void |
restoreState(FacesContext context,
Object state)
Perform any processing required to restore the state from the entries in the state Object. |
Object |
saveState(FacesContext context)
Gets the state of the instance as a Serializable Object. |
void |
setValue(Object value)
Sets the value property of the
UISelectItems . |
Methods inherited from class javax.faces.component.UIComponent |
---|
encodeAll, getContainerClientId, getValueExpression, setValueExpression |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
英文文档:
COMPONENT_TYPE
public static final String COMPONENT_TYPE
The standard component type for this component.
- See Also:
- Constant Field Values
英文文档:
COMPONENT_FAMILY
public static final String COMPONENT_FAMILY
The standard component family for this component.
- See Also:
- Constant Field Values
Constructor Detail |
---|
public
UISelectItems()
使用默认属性值创建新的 UISelectItems
实例。
UISelectItems
public UISelectItems()
Create a new
UISelectItems
instance with default property values.
Method Detail |
---|
public String
getFamily()
英文文档:
getFamily
public String getFamily()
- Description copied from class:
UIComponent
Return the identifier of the component family to which this component belongs. This identifier, in conjunction with the value of the
rendererType
property, may be used to select the appropriateRenderer
for this component instance.- Specified by:
getFamily
in classUIComponent
public Object
getValue()
返回 UISelectItems
的 value
属性。
getValue
public Object getValue()
Returns the
value
property of theUISelectItems
.
public void
setValue(Object value)
设置 UISelectItems
的 value
属性。
value | 新值 |
setValue
public void setValue(Object value)
Sets the
value
property of theUISelectItems
.- Parameters:
value
- the new value
public Object
saveState(FacesContext context)
英文文档:
saveState
public Object saveState(FacesContext context)
- Description copied from interface:
StateHolder
Gets the state of the instance as a
Serializable
Object.If the class that implements this interface has references to instances that implement StateHolder (such as a
UIComponent
with event handlers, validators, etc.) this method must call theStateHolder.saveState(javax.faces.context.FacesContext)
method on all those instances as well. This method must not save the state of children and facets. That is done via theStateManager
This method must not alter the state of the implementing object. In other words, after executing this code:
Object state = component.saveState(facesContext);
component
should be the same as before executing it.The return from this method must be
Serializable
- Specified by:
saveState
in interfaceStateHolder
- Overrides:
saveState
in classUIComponentBase
public void
restoreState(FacesContext context, Object state)
英文文档:
restoreState
public void restoreState(FacesContext context, Object state)
- Description copied from interface:
StateHolder
Perform any processing required to restore the state from the entries in the state Object.
If the class that implements this interface has references to instances that also implement StateHolder (such as a
UIComponent
with event handlers, validators, etc.) this method must call theStateHolder.restoreState(javax.faces.context.FacesContext, java.lang.Object)
method on all those instances as well.- Specified by:
restoreState
in interfaceStateHolder
- Overrides:
restoreState
in classUIComponentBase
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!