com.cc.framework.ui.control
Class ControlValuePath

java.lang.Object
  extended bycom.cc.framework.ui.control.ControlValuePath

public class ControlValuePath
extends java.lang.Object

This class encapsulates all information necessary to locate a control after a server round trip and synchronize its data model with the request values.

Since:
1.3
Version:
$Revision: 1.19 $
Author:
Harald Schulz

Field Summary
static java.lang.String KEY_COLUMN
          Key for the ControlValuePath column attribute
static java.lang.String KEY_CONTROL
          Key for the controls name
static java.lang.String KEY_ROW
          Key for the ControlValuePath row attribute
static java.lang.String KEY_SELECTMODE
          Key for the ControlValuePath select mode attribute
static java.lang.String KEY_TYPE
          Key for the ControlValuePath type attribute
private static java.lang.String PREFIX
          Prefix
private  java.util.Properties props
          Properties
static java.lang.String TYPE_CHECKBOX
          Indicator for a checkbox values
static java.lang.String TYPE_CHECKBOX_ORIGINAL
          Old value indicator for checkbox values.
static java.lang.String TYPE_NESTEDCONTROL
          Indicator for a nested control
static java.lang.String TYPE_RADIO
          Indicator for radio button (horizontal alignment)
static java.lang.String TYPE_TEXT
          Indicator for text values
 
Constructor Summary
ControlValuePath()
          Constructor
ControlValuePath(Control ctrl)
          Constructor
ControlValuePath(java.lang.String ctrlname)
          Constructor
 
Method Summary
private  void decode(java.lang.String path)
          Decodes a String encoded Path
private static java.lang.String encode(java.util.Properties props)
          Creates a String for the path instance which can be used in HTML-Pages
private static java.lang.String encode(java.lang.String propsList)
          Creates a String for the path instance which can be used in HTML-Pages
 java.lang.String getControl()
           
 java.lang.String getProperty(java.lang.String key)
          Gets a property value
static ControlValuePath parse(java.lang.String path)
          Parses a ControlValuePath from the given Request Parameter key
 void reset()
          Reset the parameter list
 void setControl(Control ctrl)
          Set the Control
 void setProperty(java.lang.String key, java.lang.Object value)
          Sets a property
 java.lang.String toString()
           
static java.lang.String toString(java.util.Properties props)
          Creates a String for the path instance which can be used in HTML-Pages
static java.lang.String toString(java.lang.String propsList)
          Creates a String for the path instance which can be used in HTML-Pages
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PREFIX

private static final java.lang.String PREFIX
Prefix

See Also:
Constant Field Values

KEY_CONTROL

public static final java.lang.String KEY_CONTROL
Key for the controls name

See Also:
Constant Field Values

KEY_TYPE

public static final java.lang.String KEY_TYPE
Key for the ControlValuePath type attribute

See Also:
Constant Field Values

KEY_ROW

public static final java.lang.String KEY_ROW
Key for the ControlValuePath row attribute

See Also:
Constant Field Values

KEY_COLUMN

public static final java.lang.String KEY_COLUMN
Key for the ControlValuePath column attribute

See Also:
Constant Field Values

KEY_SELECTMODE

public static final java.lang.String KEY_SELECTMODE
Key for the ControlValuePath select mode attribute

See Also:
Constant Field Values

TYPE_TEXT

public static final java.lang.String TYPE_TEXT
Indicator for text values

See Also:
Constant Field Values

TYPE_RADIO

public static final java.lang.String TYPE_RADIO
Indicator for radio button (horizontal alignment)

See Also:
Constant Field Values

TYPE_NESTEDCONTROL

public static final java.lang.String TYPE_NESTEDCONTROL
Indicator for a nested control

See Also:
Constant Field Values

TYPE_CHECKBOX_ORIGINAL

public static final java.lang.String TYPE_CHECKBOX_ORIGINAL
Old value indicator for checkbox values. Only checkboxes with value "on" are included in the HTTP Request. To recognize the unchecked checkboxes we need a additional hidden field that holds the value before the server round trip

See Also:
Constant Field Values

TYPE_CHECKBOX

public static final java.lang.String TYPE_CHECKBOX
Indicator for a checkbox values

See Also:
Constant Field Values

props

private java.util.Properties props
Properties

Constructor Detail

ControlValuePath

public ControlValuePath()
Constructor


ControlValuePath

public ControlValuePath(java.lang.String ctrlname)
Constructor

Parameters:
ctrlname - the name of the control for witch to create a ValuePath

ControlValuePath

public ControlValuePath(Control ctrl)
Constructor

Parameters:
ctrl - the control for witch to create a ValuePath
Method Detail

parse

public static ControlValuePath parse(java.lang.String path)
Parses a ControlValuePath from the given Request Parameter key

Parameters:
path - The request key
Returns:
returns a ValuePath or null if the given request key is not a valid path expression

decode

private void decode(java.lang.String path)
Decodes a String encoded Path

Parameters:
path - String encoded path

encode

private static java.lang.String encode(java.util.Properties props)
Creates a String for the path instance which can be used in HTML-Pages

Parameters:
props - Property table
Returns:
String encoded Path

encode

private static java.lang.String encode(java.lang.String propsList)
Creates a String for the path instance which can be used in HTML-Pages

Parameters:
propsList - Property table "key=value;key=value;key=value;...."
Returns:
String encoded Path

reset

public void reset()
Reset the parameter list


setControl

public void setControl(Control ctrl)
Set the Control

Parameters:
ctrl - Control instance

getControl

public java.lang.String getControl()
Returns:
The control name

setProperty

public void setProperty(java.lang.String key,
                        java.lang.Object value)
Sets a property

Parameters:
key - property key
value - property value

getProperty

public java.lang.String getProperty(java.lang.String key)
Gets a property value

Parameters:
key - property key
Returns:
Property value

toString

public static java.lang.String toString(java.util.Properties props)
Creates a String for the path instance which can be used in HTML-Pages

Parameters:
props - Property table
Returns:
String encoded Path

toString

public static java.lang.String toString(java.lang.String propsList)
Creates a String for the path instance which can be used in HTML-Pages

Parameters:
propsList - Property table "key=value;key=value;key=value;...."
Returns:
String encoded Path

toString

public java.lang.String toString()
See Also:
Object.toString()


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.