|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.novell.emframe.dev.UiHandler
Abstract class to implement to plug-in to iManager to handle custom UI for a specific attribute.
| Field Summary | |
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. |
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 Summary | |
UiHandler()
|
|
| Method Summary | |
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.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)
General implementation of this method should simply call printlabel and printUiCode surrounded with the appropriate formating code. |
void |
printLabelLeftOfControl(java.io.PrintWriter pw,
java.lang.String indent)
General implementation of this method should simply call printlabel and printUiCode surrounded with the appropriate formatting code. |
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. |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected UiHandlerContext context
protected java.util.Hashtable m_parameterValues
protected java.util.ArrayList m_params
public static final java.lang.String PARAM_CUSTOM_LABEL
public static final java.lang.String PARAM_HIDE_LABEL
public static final java.lang.String PARAM_REGULAR_EXPRESSION
public static final java.lang.String PARAM_REGULAR_EXPRESSION_ERROR_MSG
| Constructor Detail |
public UiHandler()
| Method Detail |
public java.lang.String getActionHandlerName()
public java.lang.String getAttributeName()
public java.lang.String getEncodedAttributeName()
public java.lang.String getId()
public org.jdom.Element[] getNeedUrlParams()
public java.lang.String getNotificationName()
public java.lang.String getParameterValue(java.lang.String name)
name - String containing the key
setParameterValue(java.lang.String, java.lang.String)public java.lang.String[] getParameterValues(java.lang.String name)
name - String containing the key
setParameterValues(java.lang.String, java.lang.String[])public java.lang.String[] getSharedHeaderCode()
public final void init(UiHandlerContext context)
context - UiHandlerContext of the plug-inpublic boolean isEDirAttribute()
public boolean isForceReadOnly()
public boolean makeMultiPartFrom()
public void printExitCode(java.io.PrintWriter pw,
java.lang.String indent)
pw - PrintWriter to use to writeindent - String containing the amount to indent
public void printFocus(java.io.PrintWriter pw,
java.lang.String indent)
pw - PrintWriter to use to writeindent - String containing the amount to indent
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),
printLabelAboveControl(java.io.PrintWriter, java.lang.String)
public void printInitCode(java.io.PrintWriter pw,
java.lang.String indent)
pw - PrintWriter to use to writeindent - String containing the amount to indent
public void printLabel(java.io.PrintWriter pw,
java.lang.String indent)
pw - PrintWriter to use to writeindent - String containing the amount to indent
public void printLabelAboveControl(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),
printLabelAboveControl(java.io.PrintWriter, java.lang.String)
public void printLabelLeftOfControl(java.io.PrintWriter pw,
java.lang.String indent)
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 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 otherwise
protected void printModeSelectorCode(java.io.PrintWriter pw,
java.lang.String indent)
pw - PrintWriter to use to writeindent - String containing the amount to indent
public void printScript(java.io.PrintWriter pw,
java.lang.String indent)
pw - PrintWriter to use to writeindent - String containing the amount to indent
protected void printUiCode(java.io.PrintWriter pw,
java.lang.String indent)
pw - PrintWriter to use to writeindent - String containing the amount to indentpublic void processParam(org.jdom.Element element)
element - XML Element containing the parameters entered by the plug-in developer
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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||