|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softwareag.mdm.ui.UIBeanEditor
Abstract class for implementing user interface components on master data. A user interface editor displays and modifies the value hold by an adaptation node.
A specific user interface component may be associated to any element declaration that
is a terminal value or under a terminal value
(see SchemaNode.isTerminalValue()
).
The component must be declared under the element
xs:annotation/xs:appinfo
:
where<xs:annotation> <xs:appinfo> <mdm:uiBean class="com.foo.MyUIBean" /> <xs:appinfo> </xs:annotation>
com.foo.MyUIBean
is
the fully qualified name of a class implementing this interface.
The declaration may also use parameters:
where<mdm:uiBean class="com.foo.MyUIBean"> <param1>...</param1> <param2>...</param2> </mdm:uiBean>
param1
and param2
are JavaBean properties
of com.foo.MyUIBean
class.
For more information, read JavaBeans specification.
This option is only needed when the developer does not want to repeat the schema declaration
<mdm:uiBean class="...">
each time a JavaBean class is referenced in schemas.
When a schema node is associated to a JavaBean (by attribute mdm:class="..."
), it is
possible to specify once the association between the JavaBean and its default UIBeanEditor.
This association is declared by the standard BeanInfo extension class. This class extends java.beansSimpleBeanInfo
and it must implement the following method:
public BeanDescriptor getBeanDescriptor() { return new BeanDescriptor(MyBean.class, UIMyBean.class); }
setParam1(...)
and
setParam2(...)
). Then, one of the methods addFor...
is called.shallValidateInput(UIRequestContext)
and optionally
validateInput(UIRequestContext)
are called.webMethods MDM container ensures that an instance executes no more than one thread at a given time.
If this editor applies to a complex node with maxOccurs > 1
, it is instanciated
for the List
and also for each occurrence in the list.
In order to distinguish the whole List
from one of its item, the developer can check current context path.
For example:
public void addForEdit(UIResponseContext aContext); { Step step = aContext.getPathInAdaptation().getLastStep(); if (step.isIndexed()) { int i = step.getIndex(); // Editor applies to occurrence at index i .../... } else { // Editor applies to the list // Use the default behaviour for default list management aContext.addUIBestMatchingEditor(Path.SELF, ""); } }
Step.isIndexed()
Constructor Summary | |
UIBeanEditor()
|
Method Summary | |
abstract void |
addForDisplay(UIResponseContext aResponse)
Adds HTML or DHTML content to HTTP response. |
abstract void |
addForEdit(UIResponseContext aResponse)
Adds HTML or DHTML content to HTTP response. |
abstract void |
addForPrint(UIResponseContext aResponse)
Adds HTML or DHTML content to HTTP response. |
boolean |
shallValidateInput(UIRequestContext aRequest)
If this method returns true , user input associated with this editor will be
validated. |
void |
validateInput(UIRequestContext aRequest)
This method offers the opportunity to perform specific validation on user input. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public UIBeanEditor()
Method Detail |
public abstract void addForDisplay(UIResponseContext aResponse)
public abstract void addForEdit(UIResponseContext aResponse)
public abstract void addForPrint(UIResponseContext aResponse)
public boolean shallValidateInput(UIRequestContext aRequest)
true
, user input associated with this editor will be
validated. It it returns false
, user input is ignored beyond the execution of
this method.
More precisely, user input validation implies first that the container validates
automatically the input associated with each component that has been added via one of the
addUI...()
methods. Then the method validateInput()
is called
on this instance.
Default implementation returns always true
.
validateInput(UIRequestContext)
public void validateInput(UIRequestContext aRequest)
This method is called only if the method shallValidateInput()
has returned
true
and after the container has automatically validated the input associated
with each component that has been added via one of the
UIResponseContext.addUI...()
methods.
Default implementation does nothing.
shallValidateInput(UIRequestContext)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
(report a bug)
webMethods MDM 4.2.8 [0558]
Copyright Software AG 2000-2007. All rights reserved.