public interface UIExpandCollapseBlock
By default, this specification represents a collapsed block with an empty title.
To write it into a form,
use UIComponentWriter.startExpandCollapseBlock(UIExpandCollapseBlock)
.
Note: The expand/collapse block must be terminated using UIComponentWriter.endExpandCollapseBlock().
Modifier and Type | Method and Description |
---|---|
void |
collapse()
Makes the block rendered collapsed.
|
void |
expand()
Makes the block rendered expanded.
|
String |
getId()
Returns the id previously defined, or
null . |
UserMessage |
getLabel()
Returns the previously defined label, or an empty one if none was defined.
|
boolean |
isCollapsed()
Returns
true if the component is configured to be rendered
collapsed. |
void |
setId(String anId)
Sets an id for the expand/collapse block.
|
void |
setLabel(String aLabel)
Sets the label of the expand/collapse block.
|
void |
setLabel(UserMessage aLabel)
Sets the label of the expand/collapse block.
|
void setLabel(String aLabel)
aLabel
must not be null
.
aLabel
- the label to setvoid setLabel(UserMessage aLabel)
aLabel
must not be null
.
aLabel
- the label to setUserMessage getLabel()
Never returns null
.
void expand()
void collapse()
boolean isCollapsed()
true
if the component is configured to be rendered
collapsed.
If expand()
nor collapse()
have not been called yet,
returns true
.
void setId(String anId)
When components ordering is dynamic over pages refresh (that is, their order depends on the record state, or any other parameter), it is recommended to invoke this method with a stable identifier, to ensure the block state remains the same if the page is redisplayed after a page submit.
anId
- The id to set for the block; the id attribute must respect the W3C Recommendation
(in particular, by being unique in the page).String getId()
null
.