|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.plumtree.remote.sci.SciCheckboxElement
Represents a checkbox control.
| Constructor Summary | |
SciCheckboxElement(java.lang.String fieldName,
java.lang.String labelText)
Valued constructor |
|
| Method Summary | |
org.w3c.dom.Node |
getRootNode()
Gets the root Node to add to the page. |
void |
setCheckedValue(int value)
Sets the checked value for the checkbox. |
void |
setImage(java.lang.String image)
Sets the image for the checkbox. |
void |
setLabelStyle(TypeStyle labelStyle)
Sets the label style for the checkbox (important or normal). |
void |
setMandatoryValidation(java.lang.String message)
Sets mandatory validation for the checkbox. |
void |
setRegExpValidation(java.lang.String message,
java.lang.String re,
TypeMatch matchType)
Sets regular expression validation for the checkbox. |
void |
setUnCheckedValue(int value)
Sets the unchecked value for the checkbox. |
void |
setValue(int value)
Sets the field value for the checkbox. |
java.lang.String |
toString()
Writes the control to a string for debugging. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public SciCheckboxElement(java.lang.String fieldName,
java.lang.String labelText)
fieldName - the name of the field; should be uppercase as the portal will uppercase all names in the NamedValue[] returned by IAdminEditor.finalize()labelText - text to display to the left of the control| Method Detail |
public void setCheckedValue(int value)
value - the checked valuepublic void setUnCheckedValue(int value)
value - the unchecked valuepublic void setImage(java.lang.String image)
image - the path to the imagepublic void setMandatoryValidation(java.lang.String message)
message - the message to display in the JavaScript alert if the field is empty
public void setRegExpValidation(java.lang.String message,
java.lang.String re,
TypeMatch matchType)
message - the message to display if validation failsre - the regular expression to matchmatchType - a TypeMatch enum of match or not-matchpublic void setValue(int value)
public void setLabelStyle(TypeStyle labelStyle)
labelStyle - a valid TypeStyle enumpublic org.w3c.dom.Node getRootNode()
Node to add to the page.
getRootNode in interface ISciElementNode
//Simple Example Code to make a link to Google:
//nested class implementing ISciElement
class LinkElement implements ISciElement
{
private org.w3c.dom.Document m_doc;
public Node getRootNode()
{
return m_doc.getDocumentElement();
}
public LinkElement()
{
m_doc = new CoreDocumentImpl();
//make an anchor element
Element link = m_doc.createElement("a");
//set the correct namespace so the portal will treat it as raw html
link.setAttribute("xmlns","http://www.w3.org/1999/xhtml");
//set the href
link.setAttribute("href", "http://www.google.com");
//create a text node for the link text
Node textNode = m_doc.createTextNode("google");
link.appendChild(textNode);
m_doc.appendChild(link);
}
}
// use this in getPageContent:
public String getContent(int pageNumber, NamedValueMap pageInfo) throws ServiceException
{
SciPage page = new SciPage();
ISciElement linkElement = new LinkElement();
page.add(linkElement);
return page.toString();
}
ISciElement.getRootNode()public java.lang.String toString()
Object.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright ©2008 Oracle® Corporation. All Rights Reserved.