|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.faces.component Class UISelectItem
java.lang.Object javax.faces.component.UIComponent javax.faces.component.UIComponentBase javax.faces.component.UISelectItem
- All Implemented Interfaces:
- StateHolder
public class UISelectItem
- extends UIComponentBase
UISelectItem 是可以嵌入 UISelectMany
或 UISelectOne
组件内部的组件,并且会导致将 SelectItem
实例添加到父组件的可用选项列表。可以通过以下方式之一指定 SelectItem
的内容:
value
属性的值是SelectItem
的实例。- 关联的
javax.el.ValueExpression
指向类型为SelectItem
的模型数据项。 - 根据
itemDescription
、itemDisabled
、itemLabel
和itemValue
属性的值合成新的SelectItem
实例。
UISelectItem is a component that may be nested
inside a UISelectMany
or UISelectOne
component, and
causes the addition of a SelectItem
instance to the list of
available options for the parent component. The contents of the
SelectItem
can be specified in one of the following ways:
- The
value
attribute's value is an instance ofSelectItem
. - The associated
ValueExpression
points at a model data item of typeSelectItem
. - A new
SelectItem
instance is synthesized from the values of theitemDescription
,itemDisabled
,itemLabel
, anditemValue
attributes.
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 | |
---|---|
UISelectItem()
Create a new UISelectItem instance with default property
values. |
Method Summary | |
---|---|
String |
getFamily()
Return the identifier of the component family to which this component belongs. |
String |
getItemDescription()
Return the description for this selection item. |
String |
getItemLabel()
Return the localized label for this selection item. |
Object |
getItemValue()
Return the server value for this selection item. |
Object |
getValue()
Returns the value property of the
UISelectItem . |
boolean |
isItemDisabled()
Return the disabled setting for this selection item. |
boolean |
isItemEscaped()
Return the escape setting for the label of this selection item. |
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 |
setItemDescription(String itemDescription)
Set the description for this selection item. |
void |
setItemDisabled(boolean itemDisabled)
Set the disabled value for this selection item. |
void |
setItemEscaped(boolean itemEscaped)
Set the escape value for the label of this selection item. |
void |
setItemLabel(String itemLabel)
Set the localized label for this selection item. |
void |
setItemValue(Object itemValue)
Set the server value for this selection item. |
void |
setValue(Object value)
Sets the value property of the
UISelectItem . |
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
UISelectItem()
使用默认属性值创建新的 UISelectItem
实例。
UISelectItem
public UISelectItem()
Create a new
UISelectItem
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 String
getItemDescription()
返回此选定项的描述。
getItemDescription
public String getItemDescription()
Return the description for this selection item.
public void
setItemDescription(String itemDescription)
设置此选定项的描述。
itemDescription | 新的描述 |
setItemDescription
public void setItemDescription(String itemDescription)
Set the description for this selection item.
- Parameters:
itemDescription
- The new description
public boolean
isItemDisabled()
返回此选定项的禁用设置。
isItemDisabled
public boolean isItemDisabled()
Return the disabled setting for this selection item.
public void
setItemDisabled(boolean itemDisabled)
设置此选定项的禁用值。
itemDisabled | 新的禁用标志 |
setItemDisabled
public void setItemDisabled(boolean itemDisabled)
Set the disabled value for this selection item.
- Parameters:
itemDisabled
- The new disabled flag
public boolean
isItemEscaped()
选择此选定项标签的转义设置。
isItemEscaped
public boolean isItemEscaped()
Return the escape setting for the label of this selection item.
public void
setItemEscaped(boolean itemEscaped)
设置此选定项标签的转义值。
itemEscaped | 新的禁用标志 |
setItemEscaped
public void setItemEscaped(boolean itemEscaped)
Set the escape value for the label of this selection item.
- Parameters:
itemEscaped
- The new disabled flag
public String
getItemLabel()
返回此选定项的本地化标签。
getItemLabel
public String getItemLabel()
Return the localized label for this selection item.
public void
setItemLabel(String itemLabel)
设置此选定项的本地化标签。
itemLabel | 新的本地化标签 |
setItemLabel
public void setItemLabel(String itemLabel)
Set the localized label for this selection item.
- Parameters:
itemLabel
- The new localized label
public Object
getItemValue()
返回此选定项的服务器值。
getItemValue
public Object getItemValue()
Return the server value for this selection item.
public void
setItemValue(Object itemValue)
设置此选定项的服务器值。
itemValue | 新的服务器值 |
setItemValue
public void setItemValue(Object itemValue)
Set the server value for this selection item.
- Parameters:
itemValue
- The new server value
public Object
getValue()
返回 UISelectItem
的 value
属性。
getValue
public Object getValue()
Returns the
value
property of theUISelectItem
.
public void
setValue(Object value)
设置 UISelectItem
的 value
属性。
value | 新值 |
setValue
public void setValue(Object value)
Sets the
value
property of theUISelectItem
.- 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 : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!