com.getsnappy.w20
Class DynamicContextBean

java.lang.Object
  extended by com.getsnappy.w20.JavaScriptBean
      extended by com.getsnappy.w20.DynamicContextBean

public class DynamicContextBean
extends JavaScriptBean

Every DynamicContext instance is backed by a CategoryChooserBean bean

Author:
brian

Nested Class Summary
static class DynamicContextBean.Attributes
           
 
Field Summary
protected static java.lang.String COOKIE_NAME
           
 
Constructor Summary
DynamicContextBean(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String contextId, java.lang.String defaultApplication)
          load up the CategoryChooserBean with the giving contextId.
 
Method Summary
protected  java.util.Vector<java.lang.String> getApplicationVariables()
          overide this function to define all variables for this bean
protected  java.util.Vector<java.lang.Class> getApplicationVariableTypes()
          overide this function to define the variables types.
 java.lang.String getClassName()
           
 java.lang.String getCookieName()
          overide this function to define a cookieName to load cookie state from
 java.lang.String getJavaScriptBeanName()
          // overide this function to define a bean name.
 
Methods inherited from class com.getsnappy.w20.JavaScriptBean
get, getAttributeId, isPersistedInRequest, jsDeclareObject, jsGet, jsPersist, jsPersistForm, jsSet, jsSet, jsSet, jsSet, load, persistToRequest, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COOKIE_NAME

protected static java.lang.String COOKIE_NAME
Constructor Detail

DynamicContextBean

public DynamicContextBean(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response,
                          java.lang.String contextId,
                          java.lang.String defaultApplication)
load up the CategoryChooserBean with the giving contextId. This contextId is appended to the cookie name, js bean name, and all attributes. This contextId allows multiple DynamicContext's to coexists on the same web page.

Parameters:
request -
response -
contextId - - this parameter is prefixed to attributes, so that we can support mulitple DynamicContext's
Method Detail

getApplicationVariables

protected java.util.Vector<java.lang.String> getApplicationVariables()
Description copied from class: JavaScriptBean
overide this function to define all variables for this bean

Specified by:
getApplicationVariables in class JavaScriptBean
Returns:

getApplicationVariableTypes

protected java.util.Vector<java.lang.Class> getApplicationVariableTypes()
Description copied from class: JavaScriptBean
overide this function to define the variables types. This corresponds with the collection of variables above.

Specified by:
getApplicationVariableTypes in class JavaScriptBean
Returns:

getCookieName

public java.lang.String getCookieName()
Description copied from class: JavaScriptBean
overide this function to define a cookieName to load cookie state from

Specified by:
getCookieName in class JavaScriptBean

getClassName

public java.lang.String getClassName()

getJavaScriptBeanName

public java.lang.String getJavaScriptBeanName()
Description copied from class: JavaScriptBean
// overide this function to define a bean name. This function should be a return a static string and you should // implement a static version as well // // e.g. // public static String beanName = ""; // public static String getJavaScriptBeanName() { return beanName; } // public String getJavaScriptBeanName() { return beanName; }

Specified by:
getJavaScriptBeanName in class JavaScriptBean