public abstract class UiHandler
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected UiHandlerContext |
context
UiHandlerContext object for this UiHandler.
|
protected java.util.Hashtable |
m_parameterValues
Parameter key/value pairs for this UiHandler.
|
protected java.util.ArrayList |
m_params
Each UiHandler can present params to the user through Plug-in Studio, this is a list of params.
|
protected MContext |
m_taskContext |
static java.lang.String |
PARAM_CUSTOM_LABEL
PARAM_CUSTOM_LABEL = "customLabel".
|
static java.lang.String |
PARAM_HIDE_LABEL
PARAM_HIDE_LABEL = "hideLabel".
|
static java.lang.String |
PARAM_REGULAR_EXPRESSION
PARAM_REGULAR_EXPRESSION = "regularExpression".
|
static java.lang.String |
PARAM_REGULAR_EXPRESSION_ERROR_MSG
PARAM_REGULAR_EXPRESSION_ERROR_MSG = "regularExpressionErrorMsg".
|
| Constructor and Description |
|---|
UiHandler() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getActionHandlerName()
Returns the JavaScript method that will handle all actions for the UI control.
|
java.lang.String |
getAttributeName()
Returns the name of attribute this UiHandler will control.
|
java.lang.String |
getEncodedAttributeName()
Safename for the name of the attribute (non-alphanumeric chars replaced with '_').
|
java.lang.String |
getId()
Plug-in Id from XML descriptor registering the UI Handler.
|
org.jdom.Element[] |
getNeedUrlParams()
Allows the UiHandler to add UrlParams to the task or page descriptor.
|
java.lang.String |
getNotificationName()
Returns the JavaScript method that will handle notifications to the UI control when the PropertyBookPage is
exiting.
|
java.lang.String |
getParameterValue(java.lang.String name)
Returns the value of a key for this UiHandler.
|
java.lang.String[] |
getParameterValues(java.lang.String name)
Returns the multiple values of a key for this UiHandler.
|
java.util.ArrayList |
getParams()
Used to write config data out to xml.
|
java.lang.String[] |
getSharedHeaderCode()
Returns any shared files to include in the head element.
|
void |
init(UiHandlerContext context)
This must be called to initialize all uihandlers.
|
boolean |
isEDirAttribute()
If this is an eDirectory attribute, attributes rights will be added to the XML descriptor for use by RBS.
|
boolean |
isForceReadOnly()
Returns whether the attribute is forced to be in read only mode.
|
boolean |
makeMultiPartFrom()
Returns whether this UiHandler requires a MultiPart Form for uploading files.
|
void |
printExitCode(java.io.PrintWriter pw,
java.lang.String indent)
Prints JavaScript code called when page is being submitted.
|
void |
printFocus(java.io.PrintWriter pw,
java.lang.String indent)
Called if this is the first control on the page; will ask for focus.
|
protected void |
printHiddenInput(java.io.PrintWriter pw,
java.lang.String indent)
Called by UiHandler.printLabelLeftOfControl and UiHandler.printLabelAboveControl.
|
void |
printInitCode(java.io.PrintWriter pw,
java.lang.String indent)
Prints JavaScript code for initializing the control.
|
void |
printLabel(java.io.PrintWriter pw,
java.lang.String indent)
Prints a label above the control.
|
void |
printLabelAboveControl(java.io.PrintWriter pw,
java.lang.String indent,
MContext taskContext)
General implementation of this method should simply call printlabel
and printUiCode surrounded with the appropriate formating code.
|
void |
printLabelAboveControl(java.io.PrintWriter pw,
java.lang.String indent,
MContext taskContext,
int i) |
void |
printLabelLeftOfControl(java.io.PrintWriter pw,
java.lang.String indent,
MContext taskContext)
General implementation of this method should simply call printlabel
and printUiCode surrounded with the appropriate formatting code.
|
void |
printLabelLeftOfControl(java.io.PrintWriter pw,
java.lang.String indent,
MContext taskContext,
int i) |
void |
printMandatoryCheckCode(java.io.PrintWriter pw,
java.lang.String indent,
boolean forceMandatory)
Called by TemplateBuilder.
|
protected void |
printModeSelectorCode(java.io.PrintWriter pw,
java.lang.String indent)
Prints HTML code to display mode selector widgit (ignore, set, add, remove).
|
void |
printScript(java.io.PrintWriter pw,
java.lang.String indent)
Optionally print:
-javascript call addToNotificationList if it needs to be notified on exit -javascript call addActionHandler if the control can accept actions -javascript call addEventListener if the control needs to listen to any other controls events -javascript window.uiObject_attributename Always print like: pw.println(indent + "my code"); This will make sure the code is pretty printed. |
protected void |
printUiCode(java.io.PrintWriter pw,
java.lang.String indent)
This will be the code within a form that actually creates ui control.
|
protected void |
printUiCode(java.io.PrintWriter pw,
java.lang.String indent,
int i) |
void |
processParam(org.jdom.Element element)
Each control can have params described in their UiHandler XML descriptor.
|
void |
setParameterValue(java.lang.String name,
java.lang.String value)
Sets a parameter key/value pair for this UiHandler.
|
void |
setParameterValues(java.lang.String name,
java.lang.String[] values)
Sets a parameter key with multiple values for this UiHandler.
|
protected UiHandlerContext context
protected java.util.ArrayList m_params
protected java.util.Hashtable m_parameterValues
protected MContext m_taskContext
public static final java.lang.String PARAM_REGULAR_EXPRESSION
public static final java.lang.String PARAM_REGULAR_EXPRESSION_ERROR_MSG
public static final java.lang.String PARAM_CUSTOM_LABEL
public static final java.lang.String PARAM_HIDE_LABEL
public final void init(UiHandlerContext context)
context - UiHandlerContext of the plug-inpublic boolean isEDirAttribute()
public java.lang.String getId()
public java.lang.String getAttributeName()
public java.lang.String getEncodedAttributeName()
public boolean isForceReadOnly()
public java.lang.String getActionHandlerName()
public java.lang.String getNotificationName()
public org.jdom.Element[] getNeedUrlParams()
public boolean makeMultiPartFrom()
public void processParam(org.jdom.Element element)
element - XML Element containing the parameters entered by the plug-in developerpublic final java.util.ArrayList getParams()
public java.lang.String[] getSharedHeaderCode()
public void printExitCode(java.io.PrintWriter pw,
java.lang.String indent)
pw - PrintWriter to use to writeindent - String containing the amount to indentpublic void printInitCode(java.io.PrintWriter pw,
java.lang.String indent)
pw - PrintWriter to use to writeindent - String containing the amount to indentpublic void printFocus(java.io.PrintWriter pw,
java.lang.String indent)
pw - PrintWriter to use to writeindent - String containing the amount to indentpublic void printScript(java.io.PrintWriter pw,
java.lang.String indent)
pw - PrintWriter to use to writeindent - String containing the amount to indentpublic void printLabel(java.io.PrintWriter pw,
java.lang.String indent)
pw - PrintWriter to use to writeindent - String containing the amount to indentpublic void printMandatoryCheckCode(java.io.PrintWriter pw,
java.lang.String indent,
boolean forceMandatory)
pw - PrintWriter to use to writeindent - String containing the amount to indentforceMandatory - boolean: true allows the process building the JSP to force the field to be mandatory
(even if the uihandler.m_forceMandatory is false), false if otherwisepublic void printLabelLeftOfControl(java.io.PrintWriter pw,
java.lang.String indent,
MContext taskContext)
pw - PrintWriter to use to writeindent - String containing the amount to indentprintLabel(java.io.PrintWriter, java.lang.String),
printUiCode(java.io.PrintWriter, java.lang.String)public void printLabelLeftOfControl(java.io.PrintWriter pw,
java.lang.String indent,
MContext taskContext,
int i)
protected void printHiddenInput(java.io.PrintWriter pw,
java.lang.String indent)
pw - PrintWriter to use to writeindent - String containing the amount to indentprintLabelLeftOfControl(java.io.PrintWriter, java.lang.String, com.novell.emframe.dev.MContext),
printLabelAboveControl(java.io.PrintWriter, java.lang.String, com.novell.emframe.dev.MContext)public void printLabelAboveControl(java.io.PrintWriter pw,
java.lang.String indent,
MContext taskContext)
pw - PrintWriter to use to writeindent - String containing the amount to indentprintLabelLeftOfControl(java.io.PrintWriter, java.lang.String, com.novell.emframe.dev.MContext),
printLabelAboveControl(java.io.PrintWriter, java.lang.String, com.novell.emframe.dev.MContext)public void printLabelAboveControl(java.io.PrintWriter pw,
java.lang.String indent,
MContext taskContext,
int i)
protected void printModeSelectorCode(java.io.PrintWriter pw,
java.lang.String indent)
pw - PrintWriter to use to writeindent - String containing the amount to indentprotected void printUiCode(java.io.PrintWriter pw,
java.lang.String indent)
pw - PrintWriter to use to writeindent - String containing the amount to indentprotected void printUiCode(java.io.PrintWriter pw,
java.lang.String indent,
int i)
public void setParameterValue(java.lang.String name,
java.lang.String value)
name - String containing the keyvalue - String containing the valuegetParameterValue(java.lang.String)public void setParameterValues(java.lang.String name,
java.lang.String[] values)
name - String containing the keyvalues - String array containing the valuesgetParameterValues(java.lang.String)public java.lang.String getParameterValue(java.lang.String name)
name - String containing the keysetParameterValue(java.lang.String, java.lang.String)public java.lang.String[] getParameterValues(java.lang.String name)
name - String containing the keysetParameterValues(java.lang.String, java.lang.String[])
API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated ${TODAY} ${TSTAMP}.