com.plumtree.remote.sci
Class SciPasswordElement

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

public class SciPasswordElement
extends java.lang.Object
implements ISciElement

Represents a password control with confirmation box. If a developer does not want to store the unencrypted value, use the IAdminEditor.finalize() as follows: 1. Check if the password value is not blank and is not equal to *******, or whatever value has been set in setValue. 2. If the password passes the above test and there not already an existing encrypted password, encrypt the password, add it to the NamedValueMap with your key for encrypted password. 3. If the password passes the above test and there is already an existing encrypted password, decrypt the encrypted password and compare it to the new password. If the new password is different, encrypt it and add it to the NamedValueMap with your key for encrypted password. 4. Remove the password from the NamedValueMap so it is not stored unencrypted.


Constructor Summary
SciPasswordElement(java.lang.String fieldName, java.lang.String labelText, java.lang.String verifyText, java.lang.String matchText)
          Valued constructor.
 
Method Summary
 org.w3c.dom.Node getRootNode()
          Gets the Node root node to add to the page.
 void setSize(int size)
          Sets the size of the control in characters (e.g., 50).
 void setValue(java.lang.String value)
          Sets the displayed password value, usually ********.
 java.lang.String toString()
          Writes the elements to a string for debugging.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SciPasswordElement

public SciPasswordElement(java.lang.String fieldName,
                          java.lang.String labelText,
                          java.lang.String verifyText,
                          java.lang.String matchText)
Valued constructor.

Note that values 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 datasource using SCI pages are encoded using com.plumtree.remote.util.CSPCodec. Likewise, all values that have been encoded in the SCI datasource 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 - field name. The fieldName 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
verifyText - text to display to the left of the second password box for confirmation, usually "Confirm"
matchText - message to display in Javascript alert if passwords do not match
See Also:
CSPCodec
Method Detail

setSize

public void setSize(int size)
Sets the size of the control in characters (e.g., 50). The size must be between 1 and 64.

Parameters:
size - size of control

setValue

public void setValue(java.lang.String value)
Sets the displayed password value, usually ********.

Parameters:
value - password value

getRootNode

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

Specified by:
getRootNode in interface ISciElement
Returns:
root node

toString

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

Returns:
String for debugging


For additional information on the IDK, including tutorials, blogs, code samples and more,see the AquaLogic User Interaction Developer Center on BEA dev2dev.

Copyright ©2007 BEA Systems, Inc. All Rights Reserved.