com.plumtree.remote.sci
Class SciTextElement

java.lang.Object
  extended bycom.plumtree.remote.sci.SciTextElement
All Implemented Interfaces:
ISciElement

public class SciTextElement
extends java.lang.Object
implements ISciElement

Represents a textbox control with a label and validation.


Constructor Summary
SciTextElement(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 setLabelStyle(TypeStyle labelStyle)
          Sets the label style (important or normal).
 void setMandatoryValidation(java.lang.String message)
          Sets mandatory validation for the control.
 void setRegExpValidation(java.lang.String message, java.lang.String re, TypeMatch matchType)
          Sets regular expression validation for the control.
 void setSize(int size)
          Sets the size of the input box in characters.
 void setStorageType(TypeStorage storageType)
          Sets the storage type (integer or string)
 void setValue(java.lang.String value)
          Sets the value of this control.
 java.lang.String toString()
          Writes the element to a string for debugging.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SciTextElement

public SciTextElement(java.lang.String fieldName,
                      java.lang.String labelText)
Valued constructor.

Note: Balues retrieved from the portal using IDocFetchProvider.initialize(DataSourceInfo dsInfo) will be decoded in the process. To prevent "+" from being decoded into a space and "%" from having indeterminate behavior, make sure that all values entered into the data source using SCI pages are encoded using com.plumtree.remote.util.CSPCodec. Likewise, all values that have been encoded in the SCI data source pages should be decoded when displayed with SCI using Pcom.plumtree.remote.util.CSPCodec. If the developer is not using DocFetch this is not an issue.

Parameters:
fieldName - the name of the field; should be uppercase as the portal will uppercase all names in the NamedValue[] returned by IAdminEditor.finalize()
labelText - the text to set to the left of the control
See Also:
CSPCodec
Method Detail

setSize

public void setSize(int size)
Sets the size of the input box in characters.

Parameters:
size - the size of the control in characters

setValue

public void setValue(java.lang.String value)
Sets the value of this control.

Parameters:
value - the field value

setStorageType

public void setStorageType(TypeStorage storageType)
Sets the storage type (integer or string)

Parameters:
storageType - the TypeStorage

setLabelStyle

public void setLabelStyle(TypeStyle labelStyle)
Sets the label style (important or normal).

Parameters:
labelStyle - the TypeStyle for the label

setMandatoryValidation

public void setMandatoryValidation(java.lang.String message)
Sets mandatory validation for the control.

Parameters:
message - the message to display in the JavaScript alert if the field is empty

setRegExpValidation

public void setRegExpValidation(java.lang.String message,
                                java.lang.String re,
                                TypeMatch matchType)
Sets regular expression validation for the control.

Parameters:
message - the message to display in the JavaScript alert if validation fails
re - the regular expression to match or not match
matchType - the TypeMatch (match or not-match)

getRootNode

public org.w3c.dom.Node getRootNode()
Gets the root Node to add to the page.

Specified by:
getRootNode in interface ISciElement
Returns:
the root Node

toString

public java.lang.String toString()
Writes the element to a string for debugging.

Returns:
the element as a string


For additional information on the Oracle® WebCenter Interaction Development Kit, including tutorials, blogs, code samples and more, see the Oracle Technology Network (http://www.oracle.com/technology/index.html).

Copyright ©2010 Oracle® Corporation. All Rights Reserved.