com.HybridServerPages
Class Base_WS

java.lang.Object
  extended by com.HybridServerPages.Base_WS0
      extended by com.HybridServerPages.Base_WS

public class Base_WS
extends com.HybridServerPages.Base_WS0

Derive widget state classes from this class


Field Summary
protected  javax.servlet.http.HttpServletRequest request
           
protected  javax.servlet.http.HttpServletResponse response
           
protected  javax.servlet.http.HttpSession session
           
 
Constructor Summary
Base_WS()
           
 
Method Summary
protected  void $accept(int code, java.lang.String msg, java.lang.Object more, Base_WS source)
          Override this method to get signals from sub-components.
protected  java.lang.String $getParam(java.lang.String name, java.lang.String prev)
          Access to component-related HTTP request parameters
protected  void $handleWidget(java.lang.String h1, java.lang.String h2)
          If the actual submission is unrelated to current component then empty strings are passed to both parameters.
protected  void $resend()
          Resends the last accepted message (code,msg,more,source) upwards
protected  void $send(int code, java.lang.String msg, java.lang.Object more)
          Override this method to get signals from sub-components.
protected  void $setBadParam(java.lang.String name, java.lang.String msg)
          Marks the parameter as bad
protected  boolean $setNextPage(java.lang.String pn)
          Sets the next page to be shown.
protected  void $setReturn()
          Sets the next page equal to the page you came here from This is a support for back button
 java.lang.String getUniqueId()
          Returns unique ID of the component state instance
 java.lang.String getWidgetName()
          Name of the widget asoociated with this current component
 
Methods inherited from class com.HybridServerPages.Base_WS0
accept, getFullId, getShortName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

request

protected javax.servlet.http.HttpServletRequest request

response

protected javax.servlet.http.HttpServletResponse response

session

protected javax.servlet.http.HttpSession session
Constructor Detail

Base_WS

public Base_WS()
Method Detail

getWidgetName

public java.lang.String getWidgetName()
Name of the widget asoociated with this current component

Overrides:
getWidgetName in class com.HybridServerPages.Base_WS0
Returns:
the name of the widget associated with this component

getUniqueId

public java.lang.String getUniqueId()
Returns unique ID of the component state instance

Returns:
unique id of the component state instance

$send

protected final void $send(int code,
                           java.lang.String msg,
                           java.lang.Object more)
Override this method to get signals from sub-components. Otherwise the signal will be propagated up

Parameters:
code - some value
msg - some message
more - some additional data

$resend

protected final void $resend()
Resends the last accepted message (code,msg,more,source) upwards


$accept

protected void $accept(int code,
                       java.lang.String msg,
                       java.lang.Object more,
                       Base_WS source)
Override this method to get signals from sub-components. Otherwise the signal will be propagated up

Specified by:
$accept in class com.HybridServerPages.Base_WS0
Parameters:
code - some value
msg - some message
more - some additional data
source - the component that fired the signal

$handleWidget

protected void $handleWidget(java.lang.String h1,
                             java.lang.String h2)
If the actual submission is unrelated to current component then empty strings are passed to both parameters.

Specified by:
$handleWidget in class com.HybridServerPages.Base_WS0
Parameters:
h1 - first (name) part (before ':') of HJ_Action HTTP parameter
h2 - second (value) part of HJ_Action HTTP parameter
Using the HJ_Action is optional as HTTP request is also available
To extract request parameters relevant to this component use String $getParam(String name) This method is called for every component with respect to their seniority AND before $handlePage.

$setNextPage

protected final boolean $setNextPage(java.lang.String pn)
Sets the next page to be shown. If called more than once the last call effective

Parameters:
pn - name of the page a.k.a. full class name of the page
Returns:
false for all calls except the first one

$setBadParam

protected final void $setBadParam(java.lang.String name,
                                  java.lang.String msg)
Marks the parameter as bad

Parameters:
name - of the parameter that did not pass validation
msg - message to be shown at the control

$getParam

protected final java.lang.String $getParam(java.lang.String name,
                                           java.lang.String prev)
Access to component-related HTTP request parameters

Parameters:
name - component-scope name of the parameter
prev - value returned if no such parameter in the current HTTP request
Returns:
parameter value.

$setReturn

protected final void $setReturn()
Sets the next page equal to the page you came here from This is a support for back button