|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.platform.ui.web.util.ComponentUtils
public final class ComponentUtils
Generic component helper methods.
Field Summary | |
---|---|
static java.lang.String |
WHITE_SPACE_CHARACTER
|
Method Summary | ||
---|---|---|
static void |
addErrorMessage(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.String message)
|
|
static void |
addErrorMessage(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.String message,
java.lang.Object[] params)
|
|
static void |
copyLinkValues(javax.faces.component.UIComponent parent,
javax.faces.component.UIComponent child)
|
|
static void |
copyValues(javax.faces.component.UIComponent parent,
javax.faces.component.UIComponent child,
java.lang.String[] valueNames)
Copies attributes and value expressions with given name from parent component to child component. |
|
static java.lang.String |
download(javax.faces.context.FacesContext faces,
Blob blob,
java.lang.String filename)
|
|
static void |
encodeComponent(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Calls a component encodeBegin/encodeChildren/encodeEnd methods. |
|
static java.lang.Object |
getAttributeOrExpressionValue(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.String attributeName,
java.lang.Object defaultValue)
|
|
static java.lang.Object |
getAttributeValue(javax.faces.component.UIComponent component,
java.lang.String attributeName,
java.lang.Object defaultValue)
|
|
static javax.faces.component.UIComponent |
getBase(javax.faces.component.UIComponent anchor)
Gets the base naming container from anchor. |
|
static
|
getComponent(javax.faces.component.UIComponent base,
java.lang.String componentId,
java.lang.Class<T> expectedComponentClass)
Returns the component specified by the componentId parameter
from the base component. |
|
static javax.faces.component.UIComponent |
hookSubComponent(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent parent,
javax.faces.component.UIComponent child,
java.lang.String defaultChildId)
Add a sub component to a UI component, marking is as rendered. |
|
static void |
initiateSubComponent(javax.faces.component.UIComponent parent,
java.lang.String facetName,
javax.faces.component.UIComponent child)
Helper method meant to be called in the component constructor. |
|
static void |
moveAllItems(javax.faces.component.UISelectItems sourceItems,
javax.faces.component.UISelectItems targetItems,
UIEditableList hiddenTargetList,
boolean setTargetIds)
Move items from components to others. |
|
static void |
moveItems(javax.faces.component.UISelectMany sourceSelect,
javax.faces.component.UISelectItems sourceItems,
javax.faces.component.UISelectItems targetItems,
UIEditableList hiddenTargetList,
boolean setTargetIds)
Move items from components to others. |
|
static void |
shiftItemsDown(javax.faces.component.UISelectMany targetSelect,
javax.faces.component.UISelectItems targetItems,
UIEditableList hiddenTargetList)
|
|
static void |
shiftItemsFirst(javax.faces.component.UISelectMany targetSelect,
javax.faces.component.UISelectItems targetItems,
UIEditableList hiddenTargetList)
|
|
static void |
shiftItemsLast(javax.faces.component.UISelectMany targetSelect,
javax.faces.component.UISelectItems targetItems,
UIEditableList hiddenTargetList)
|
|
static void |
shiftItemsUp(javax.faces.component.UISelectMany targetSelect,
javax.faces.component.UISelectItems targetItems,
UIEditableList hiddenTargetList)
Move items up inside the target select |
|
static java.lang.String |
translate(javax.faces.context.FacesContext context,
java.lang.String messageId)
|
|
static java.lang.String |
translate(javax.faces.context.FacesContext context,
java.lang.String messageId,
java.lang.Object... params)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String WHITE_SPACE_CHARACTER
Method Detail |
---|
public static void encodeComponent(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
java.io.IOException
public static void initiateSubComponent(javax.faces.component.UIComponent parent, java.lang.String facetName, javax.faces.component.UIComponent child)
When adding sub components dynamically, the tree fetching could be a problem so all possible sub components must be added.
By default initiated component are marked as not rendered.
parent
- child
- facetName
- facet name to put the child in.public static javax.faces.component.UIComponent hookSubComponent(javax.faces.context.FacesContext context, javax.faces.component.UIComponent parent, javax.faces.component.UIComponent child, java.lang.String defaultChildId)
context
- parent
- child
- defaultChildId
-
public static void copyValues(javax.faces.component.UIComponent parent, javax.faces.component.UIComponent child, java.lang.String[] valueNames)
public static void copyLinkValues(javax.faces.component.UIComponent parent, javax.faces.component.UIComponent child)
public static java.lang.Object getAttributeValue(javax.faces.component.UIComponent component, java.lang.String attributeName, java.lang.Object defaultValue)
public static java.lang.Object getAttributeOrExpressionValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.String attributeName, java.lang.Object defaultValue)
public static java.lang.String download(javax.faces.context.FacesContext faces, Blob blob, java.lang.String filename)
public static java.lang.String translate(javax.faces.context.FacesContext context, java.lang.String messageId)
public static java.lang.String translate(javax.faces.context.FacesContext context, java.lang.String messageId, java.lang.Object... params)
public static void addErrorMessage(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.String message)
public static void addErrorMessage(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.String message, java.lang.Object[] params)
public static javax.faces.component.UIComponent getBase(javax.faces.component.UIComponent anchor)
Gets out of suggestion box as it's a naming container and we can't get components out of it with a relative path => take above first found container.
public static <T> T getComponent(javax.faces.component.UIComponent base, java.lang.String componentId, java.lang.Class<T> expectedComponentClass)
componentId
parameter
from the base
component.
Does not throw any exception if the component is not found, returns
null
instead.
public static void shiftItemsUp(javax.faces.component.UISelectMany targetSelect, javax.faces.component.UISelectItems targetItems, UIEditableList hiddenTargetList)
public static void shiftItemsDown(javax.faces.component.UISelectMany targetSelect, javax.faces.component.UISelectItems targetItems, UIEditableList hiddenTargetList)
public static void shiftItemsFirst(javax.faces.component.UISelectMany targetSelect, javax.faces.component.UISelectItems targetItems, UIEditableList hiddenTargetList)
public static void shiftItemsLast(javax.faces.component.UISelectMany targetSelect, javax.faces.component.UISelectItems targetItems, UIEditableList hiddenTargetList)
public static void moveItems(javax.faces.component.UISelectMany sourceSelect, javax.faces.component.UISelectItems sourceItems, javax.faces.component.UISelectItems targetItems, UIEditableList hiddenTargetList, boolean setTargetIds)
public static void moveAllItems(javax.faces.component.UISelectItems sourceItems, javax.faces.component.UISelectItems targetItems, UIEditableList hiddenTargetList, boolean setTargetIds)
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |