org.kuali.rice.krad.uif.component
Annotation Type ClientSideState


@Target(value=FIELD)
@Retention(value=RUNTIME)
@Documented
public @interface ClientSideState

Annotation that can be used on Component properties to indicate the property value should be exposed in the client and populated back from the client

Some components have state that can be altered on the client without making a server call. An example of this is the open state for an Disclosure. When the View is refreshed from the server, the refreshed state needs to reflect the last state before the refresh was made. The framework supports this exposure of state in the client and syncing of the client state to the server component by means of this annotation. During the finalize phase, values for properties that contain this annotation will be pulled and added to the ViewState object that is exposed through JavaScript. The property name/value pair is associated with the component id on the ViewState object so that the state can be updated when the view is refreshed. Properties exposed client side can also be accessed and updated by custom script. e.g. var componentState = ViewState['componentId']; // or ViewState.componentId var propertyValue = componentState['propertyName'];

The property will be exposed client side with the identifier given by variableName(). If not specified, the name of the property for which the annotation applies will be used

Author:
Kuali Rice Team (rice.collab@kuali.org)

Optional Element Summary
 String variableName
          Identifier to expose the client side variable as, can be left blank in which case the name of the property the annotation is associated with will be used
 

variableName

public abstract String variableName
Identifier to expose the client side variable as, can be left blank in which case the name of the property the annotation is associated with will be used

Returns:
String client side variable name
Default:
""


Copyright © 2005-2011 The Kuali Foundation. All Rights Reserved.