|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.HybridServerPages.BaseComponent
public class BaseComponent
Derive component state classes ("*_WS.java") from this class
Constructor Summary | |
---|---|
BaseComponent()
|
Method Summary | |
---|---|
protected void |
$accept(int code,
java.lang.String msg,
java.lang.Object more,
BaseComponent source)
Override this method to get signals from sub-components. |
protected void |
$ajaxComponent(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Override this method to process Ajax request at the component level |
protected java.lang.String |
$getParam(java.lang.String name,
java.lang.String previous_value)
Access to component-related HTTP request parameters |
protected void |
$handleComponent(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)
Send a signal to the parent component or to the page |
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 |
getShortName()
Returns the short name of the component |
java.lang.String |
getUniqueId()
Returns unique id of the component state instance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BaseComponent()
Method Detail |
---|
public final java.lang.String getShortName()
public final java.lang.String getUniqueId()
protected final void $send(int code, java.lang.String msg, java.lang.Object more)
code
- some valuemsg
- some messagemore
- some additional dataprotected final void $resend()
protected void $accept(int code, java.lang.String msg, java.lang.Object more, BaseComponent source)
code
- some valuemsg
- some messagemore
- some additional datasource
- the component that fired the signalprotected void $handleComponent(java.lang.String h1, java.lang.String h2)
h1
- first (name) part (before ':') of HJ_Action HTTP parameterh2
- second (value) part of HJ_Action HTTP parameter String $getParam(String name)
This method is called for every component with respect to their seniority
AND before $handlePage.protected final void $setBadParam(java.lang.String name, java.lang.String msg)
name
- of the parameter that did not pass validationmsg
- message to be shown at the controlprotected final java.lang.String $getParam(java.lang.String name, java.lang.String previous_value)
name
- component-scope name of the parameterprevious_value
- - returned if no such parameter
in the current HTTP request
protected final void $setReturn()
protected final boolean $setNextPage(java.lang.String pn)
pn
- name of the page a.k.a. full class name of the page
protected void $ajaxComponent(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
request
- standardresponse
- standard
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |