|
SAP NetWeaver 7.30 Enterprise Portal (SP03) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IValidator
The interface used to validate pane input.
Panes that display a user interface should use this interface in the
implementation of the method
AbstractWizardComponent.getErrorMessages(IWizardContext).
Always call the isValid(java.lang.Object, com.sapportals.admin.wizardframework.api.IWizardContext) method and provide the key for the input
to check.
Typically, each IValidator implementer should perform
validations on a single parameter, such as the object ID or selected layouts.
For invalid input, it gets the error list from the implementer that
holds the resource bundle keys.
For example:
public List getErrorMessages(IWizardContext ctx)
{
PageLayoutsValidator validator = new PageLayoutsValidator();
StringBuffer validatorKey = new StringBuffer(getPath())
.append(PageLayoutsPane.LAYOUTS_AVAILABLE_LIST_KEY)
.append(WizardSession.PATH_SEPERATOR)
.append(MultiSelectionComponent.VALUE);
if (!validator.isValid(validatorKey.toString(), ctx))
{
List errKeyList = validator.getErrorKeyList(ctx);
LinkedList errValList = new LinkedList();
for (Iterator iter = errKeyList.iterator(); iter.hasNext();)
{
String key = (String) iter.next();
errValList.add(_basicObjService.getBundleString(key, ctx));
}
return errValList;
}
}
| Method Summary | |
|---|---|
List |
getErrorKeyList(IWizardContext context)
Deprecated. Gets a list of resource bundle keys for the errors collected when the validity check fails. |
boolean |
isValid(Object key,
IWizardContext context)
Deprecated. Indicates whether the required field/input/key/value is valid. |
| Method Detail |
|---|
boolean isValid(Object key,
IWizardContext context)
key - a key to checkcontext - the current wizard context
true if valid, false if notList getErrorKeyList(IWizardContext context)
context - the current wizard context
| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] EP-RUNTIME
|
[sap.com] tc/ep/admin/api
|
api
|
EP-PIN
|
|
SAP NetWeaver 7.30 Enterprise Portal (SP03) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||