| com.salmonllc.jsp.JspController com.salmonllc.examples.BaseController
All known Subclasses: com.salmonllc.examples.SourceViewController,
BaseController | public class BaseController extends JspController implements SubmitListener,PageListener(Code) | | This controller is used as the ancestor for the other controllers in the example app.
Generally, every controller will extend from this one, but the examples all extend JspController in order to keep them encapsulated.
This controller has more functionality than is requied by the sample application so it can be copied and used as a starting point for your application's base controller.
It implements frequently used interfaces at the base level to avoid having to implement all the methods in each controller.
Also, it provides some basic functionality such as checking if the session or page is required and redirecting the user to the appropriate page.
|
Method Summary | |
public boolean | getBooleanParameter(String name) This method tries to get the string parameter passed into this function from the URL. | public Cookie | getCookie(String key) Return the text of the request referer, if available, else null. | public int | getIntParameter(String name) This method tries to get the integer value from the parameter in the URL called passed into this method. | public SessionManager | getSessionManager() Gets the SessionManager for this application. | public boolean | hasPageRedirected() | public void | initialize() | public void | pageRequestEnd(PageEvent p) This method/event will get fired each time a page is requested by the browser after Html is generated and sent back. | public void | pageRequested(PageEvent p) This method/event will get fired each time a page is requested by the browser before Html is generated and sent back. | public void | pageSubmitEnd(PageEvent p) This method occurs each time a page is submitted after submit values are copied to components. | public void | pageSubmitted(PageEvent p) This method occurs each time a page is submitted before submit values are copied to components. | public void | setCheckPageExpired(boolean check) | public void | setCheckSessionExpired(boolean check) | public void | setNoCache(boolean noCache) If you want to have the browser cache this page instead of reloading it each time call this method with a true argument. | public boolean | submitPerformed(SubmitEvent e) This method is used to signal that a submit button has been pressed, and that the user has intended
to submit the descendant class/page. |
getBooleanParameter | public boolean getBooleanParameter(String name)(Code) | | This method tries to get the string parameter passed into this function from the URL. It then checks to see if that "name" parameter is of boolean type. The default is FALSE.
Parameters: name - - name of the parameter that is being looked up |
getCookie | public Cookie getCookie(String key)(Code) | | Return the text of the request referer, if available, else null.
Parameters: key - - name of the cookie java.lang.String |
getIntParameter | public int getIntParameter(String name)(Code) | | This method tries to get the integer value from the parameter in the URL called passed into this method. If the value of the parameter is not an integer, a -1 value will be returned.
Parameters: name - - name of the parameter that is being looked up int - returns the value of the parameter as an int, if the value can NOT be cast to an int -1 is returned |
getSessionManager | public SessionManager getSessionManager()(Code) | | Gets the SessionManager for this application.
|
hasPageRedirected | public boolean hasPageRedirected()(Code) | | Returns true if either the page or the session is expired and the page has been redirected to another page indicating that
|
initialize | public void initialize() throws Exception(Code) | | This method
- creates a SessionManager a page Listener
- adds a page Listener
- adds a page Listener
throws: Exception - if anything goes wrong |
pageRequestEnd | public void pageRequestEnd(PageEvent p) throws Exception(Code) | | This method/event will get fired each time a page is requested by the browser after Html is generated and sent back.
Parameters: p - PageEvent throws: Exception - if anything goes wrong |
pageRequested | public void pageRequested(PageEvent p) throws Exception(Code) | | This method/event will get fired each time a page is requested by the browser before Html is generated and sent back.
Parameters: p - PageEvent throws: Exception - if anything goes wrong |
pageSubmitEnd | public void pageSubmitEnd(PageEvent p)(Code) | | This method occurs each time a page is submitted after submit values are copied to components.
Parameters: p - PageEvent |
pageSubmitted | public void pageSubmitted(PageEvent p)(Code) | | This method occurs each time a page is submitted before submit values are copied to components.
Parameters: p - PageEvent |
setCheckPageExpired | public void setCheckPageExpired(boolean check)(Code) | | Tells the page whether or not it should check whether the page is expired on each request
|
setCheckSessionExpired | public void setCheckSessionExpired(boolean check)(Code) | | Tells the page whether or not it should check whether the session is expired on each request
|
setNoCache | public void setNoCache(boolean noCache)(Code) | | If you want to have the browser cache this page instead of reloading it each time call this method with a true argument.
|
submitPerformed | public boolean submitPerformed(SubmitEvent e) throws Exception(Code) | | This method is used to signal that a submit button has been pressed, and that the user has intended
to submit the descendant class/page.
Parameters: e - SubmitEvent throws: Exception - if anything goes wrong true to continue processing events on the page or false to abort |
Methods inherited from com.salmonllc.jsp.JspController | public void assignComponentToField(String fieldName, HtmlComponent comp, boolean addToPage)(Code)(Java Doc) public void assignDataSourceToField(String fieldName, DataStoreBuffer ds)(Code)(Java Doc) public void assignPropertyExpression(String component, String propName, String expression, DataStoreBuffer dataStore)(Code)(Java Doc) public void autoBindComponents() throws Exception(Code)(Java Doc) public void clearAllPagesFromSession()(Code)(Java Doc) public void clearAllPagesFromSessionButCurrent()(Code)(Java Doc) public void clearInitializing()(Code)(Java Doc) public void clearPageFromSession()(Code)(Java Doc) public String convertExpressionOperators(String expression)(Code)(Java Doc) public synchronized int doGet(HttpServletRequest req, boolean pre) throws Exception(Code)(Java Doc) public synchronized int doPost(HttpServletRequest req, HttpServletResponse res) throws Exception(Code)(Java Doc) public void forward(String url) throws IOException, ServletException(Code)(Java Doc) public void generateBodyHtml(JspWriter p) throws IOException(Code)(Java Doc) public void generateCode(PrintWriter pw, String controllerName) throws IOException(Code)(Java Doc) public void generateScriptHtml(JspWriter p) throws java.lang.Exception(Code)(Java Doc) public void generateSessionKeepAliveHtml(JspWriter p) throws IOException(Code)(Java Doc) public boolean getAddExpireHeaders()(Code)(Java Doc) public HtmlFormComponent getBoundComponent(DataStoreBuffer dsb, String columnName)(Code)(Java Doc) public HtmlComponent getComponent(String name)(Code)(Java Doc) public Hashtable getComponentTable()(Code)(Java Doc) public DataStoreBuffer getDataSource(String name)(Code)(Java Doc) public DataStoreBuffer getDataSource(Class c)(Code)(Java Doc) public Hashtable getDataSourceTable()(Code)(Java Doc) public Enumeration getDataSources()(Code)(Java Doc) public boolean getDoPostRedirected()(Code)(Java Doc) public boolean getHideAllComponents()(Code)(Java Doc) public boolean getKeepOnSession()(Code)(Java Doc) public String getOnClick()(Code)(Java Doc) public String getOnLoad()(Code)(Java Doc) public String getOnLoadFunction()(Code)(Java Doc) public PageContext getPageContext()(Code)(Java Doc) public String getPageURL()(Code)(Java Doc) public String getPageURLNoQueryString()(Code)(Java Doc) public int getRefIndex()(Code)(Java Doc) public JspController getSecondaryController()(Code)(Java Doc) public int getSessionKeepAliveMinutes()(Code)(Java Doc) public String getSessionKey()(Code)(Java Doc) public String getStyle()(Code)(Java Doc) public Vector getValidators()(Code)(Java Doc) public String getWebAppName()(Code)(Java Doc) public void gotoSiteMapActionPage(String logicalName, String actionName, String additionalParms) throws IOException, ServletException(Code)(Java Doc) public void gotoSiteMapActionPage(String actionName, String additionalParms) throws IOException, ServletException(Code)(Java Doc) public void gotoSiteMapActionPage(String actionName) throws IOException, ServletException(Code)(Java Doc) public void gotoSiteMapPage(String logicalName) throws IOException, ServletException(Code)(Java Doc) public void gotoSiteMapPage(String logicalName, String additionalParms) throws IOException, ServletException(Code)(Java Doc) public void incrementRefIndex()(Code)(Java Doc) public void initialize() throws Exception(Code)(Java Doc) public void initializeContainers() throws Exception(Code)(Java Doc) public boolean isExpired()(Code)(Java Doc) public boolean isIncludeIDAfterPost()(Code)(Java Doc) public boolean isInitialized()(Code)(Java Doc) public boolean isInitializing()(Code)(Java Doc) public boolean isReferredByCurrentPage()(Code)(Java Doc) public boolean isRequestFromForward()(Code)(Java Doc) public void loadProperties()(Code)(Java Doc) protected boolean notifyListeners(int event, boolean pre) throws Exception(Code)(Java Doc) public void printVars(PrintWriter p) throws IOException(Code)(Java Doc) public void recordTimerActivity(String name, long timeInMillis)(Code)(Java Doc) public void replaceComponent(String name, HtmlComponent newComponent)(Code)(Java Doc) public void replaceDataSource(String name, DataStoreBuffer newDs)(Code)(Java Doc) public void sendPageRedirect() throws IOException(Code)(Java Doc) public void sendPageRedirect(String anchor) throws IOException(Code)(Java Doc) public void sendRedirect(String url) throws IOException(Code)(Java Doc) public void setAddExpireHeaders(boolean val)(Code)(Java Doc) public void setApplicationName(String name)(Code)(Java Doc) public void setCurrentRequest(HttpServletRequest r)(Code)(Java Doc) public void setCurrentResponse(HttpServletResponse r)(Code)(Java Doc) public void setDoPostRedirected(boolean dopostredirected)(Code)(Java Doc) public void setHideAllComponents(boolean hideAllComponents)(Code)(Java Doc) public void setIncludeIDAfterPost(boolean includeIDAfterPost)(Code)(Java Doc) public void setInitialized()(Code)(Java Doc) public void setKeepOnSession(boolean keep)(Code)(Java Doc) public void setOnBlur(String script)(Code)(Java Doc) public void setOnClick(String script)(Code)(Java Doc) public void setOnFocus(String script)(Code)(Java Doc) public void setOnKeydown(String script)(Code)(Java Doc) public void setOnLoad(String script)(Code)(Java Doc) public void setOrigApplicationName(String name)(Code)(Java Doc) public void setPageContext(PageContext cont)(Code)(Java Doc) public void setPageExpired(boolean exp)(Code)(Java Doc) public void setPageName(String name)(Code)(Java Doc) public void setRemoveFromQueryString(String val)(Code)(Java Doc) public void setSecondaryController(JspController cont)(Code)(Java Doc) public void setServerURL(String url)(Code)(Java Doc) public void setServletBaseURL(String url)(Code)(Java Doc) public void setSession(HttpSession s)(Code)(Java Doc) public void setSessionExpired(boolean exp)(Code)(Java Doc) public void setSessionKeepAliveMinutes(int keepAliveMinutes)(Code)(Java Doc) public void setSessionKey(String key)(Code)(Java Doc) public void setStyle(String style)(Code)(Java Doc)
|
|
|