public interface UIContext
UIBeanEditor
contexts.
A UIBeanEditor
request context
and a response context are both
associated with a specific data model node and to a validation context.
UIBeanEditor
Locale getLocale()
UISessionContext.getLocale()
boolean isCreatingRecord()
WidgetDisplayContext.isCreatingRecord()
true
if this component is displayed in
the context of a new record creation. In this case, the persistent record
does not yet exist.boolean isDuplicatingRecord()
WidgetDisplayContext.isDuplicatingRecord()
true
if this component is displayed in
the context of the duplication of an existing record. In this case, the target persistent record
does not yet exist.Session getSession()
UISessionContext.getSession()
com.orchestranetworks.hierarchy.Member getHierarchyMember()
WidgetDisplayContext.getHierarchyMember()
.UIBeanEditor
is instantiated in the context of a hierarchy.
Returns null
otherwise.
This method allows specializing the look and feel of user interface for hierarchy contexts.
HierarchyNode getHierarchyNode()
getHierarchyMember()
.Object getValue()
ValueContext.getValue()
from WidgetDisplayContext.getValueContext()
.Object getValue(Path aPath)
ValueContext.getValue(Path)
from WidgetDisplayContext.getValueContext()
.aPath
- the location of the target relative to the current node (to maximize reusability,
it is advised to use a relative path)String displayOccurrence(Object aValue, boolean useLabels)
WidgetDisplayContext.displayOccurrence(Object, boolean)
.The specified value must be related to the current node.
SchemaNode getNode()
WidgetDisplayContext.getNode()
.ValueContext.getNode()
Path getPathInAdaptation()
SchemaNode.getPathInAdaptation()
from WidgetDisplayContext.getNode()
.
The result of this method is more precise than getNode().getPathInAdaptation()
because it is able to specify indexes (position predicates in XPath).
Step.isIndexed()
,
getNode()
Path getPathForListOccurrence(int index)
WidgetWriterForList.getPathForListOccurrence(int)
Replaced by WidgetListValidationContext.getPathForListOccurrence(int)
Returns the absolute path of an occurrence at the specified index under the
current aggregated list field (maxOccurs > 1
).
This method can be useful for UI beans that implement
UIBeanEditor.addList(UIResponseContext)
to call the
best matching widget
for each occurrence.
index
- The index of an occurrence in the current aggregated list field.Step.isIndexed()
,
UIBeanEditor.addList(UIResponseContext)
,
getPathForListOccurrence(int, boolean)
Path getPathForListOccurrence(int index, boolean isRelative)
WidgetWriterForList.getPathForListOccurrence(int, boolean)
Replaced by WidgetListValidationContext.getPathForListOccurrence(int, boolean)
Returns the path of an occurrence at the specified index under the
current aggregated list field (maxOccurs > 1
).
This method can be useful for UI beans that implement
UIBeanEditor.addList(UIResponseContext)
to call the
best matching widget
for each occurrence.
index
- The index of an occurrence in the current aggregated list field.isRelative
- If true, the returned path will be relative. If false, it will be absolute.Step.isIndexed()
,
UIBeanEditor.addList(UIResponseContext)
SchemaNode getNode(Path aPath)
SchemaNode.getNode(Path)
from WidgetDisplayContext.getNode()
.This method is equivalent to : UIContext.getNode().getNode(aPath)
SchemaNode.getNode(Path)
String getWebNameFor(String aLocalId)
WidgetWriter.getWidgetName(String)
Replaced by WidgetValidationContext.getWidgetName(String)
The web name is only to be used on custom external components (with the HTML attribute name or id for example). It must not be used to manipulate native components or widgets. Native components are internal and the web name policy can be modified at any time.
aLocalId
- must respect the pattern [a-zA-Z0-9_.-]+
String getWebNameForPath(Path aPath)
WidgetWriter.getWidgetName(Path)
Replaced by WidgetValidationContext.getWidgetName(Path)
The web name is only to be used on custom external components (with the HTML attribute name or id for example). It must not be used to manipulate native components or widgets. Native components are internal and the web name policy can be modified at any time.
aPath
- location of the target relative to the current node. An absolute path
may be used only for instance nodes.String getWebNameOfParent()
WidgetWriter.getWidgetNameOfParent()
Replaced by WidgetValidationContext.getWidgetNameOfParent()
The web name is only to be used on custom external components (with the HTML attribute name or id for example). It must not be used to manipulate native components or widgets. Native components are internal and the web name policy can be modified at any time.
String getWebName()
WidgetWriter.getWidgetName()
Replaced by WidgetValidationContext.getWidgetName()
The web name is only to be used on custom external components (with the HTML attribute name or id for example). It must not be used to manipulate native components or widgets. Native components are internal and the web name policy can be modified at any time.