Java Doc for HtmlPage.java in  » J2EE » Sofia » com » salmonllc » html » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » Sofia » com.salmonllc.html 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.salmonllc.html.HtmlPageBase
      com.salmonllc.html.HtmlPage

All known Subclasses:   com.salmonllc.jsp.JspController,
HtmlPage
abstract public class HtmlPage extends HtmlPageBase implements Serializable(Code)
This type is the superclass for every page in the HTML Framework. The developer creating the page should override the initialize method. In this method you should create and place any HTMLComponents that will reside in the page plus any other required initialization. The rest of the custom code in the page will be handled via listeners.


Field Summary
final public static  intFORMTYPE_MULTIPART
    
final public static  intFORMTYPE_URLENCODED
    
final protected static  intGET_EVENT
    
final protected static  intPOST_EVENT
    
final public static  StringTRANSACTION_TOKEN_KEY
    
protected  Hashtable_htmlTable
    
protected  String_script
    
protected  Hashtable_scriptTable
    
protected  String_token
    
protected  Vector_vnavbars
    


Method Summary
public  voidadd(HtmlComponent comp)
    
 voidaddApplet(HtmlApplet a)
    
public  voidaddHtml(String name, String html)
     Adds a named piece of HTML to the end of your page.
public  voidaddNavBar(JspNavBar jspNavBar)
    
public  voidaddPageListener(PageListener p)
     Adds a new listerner to this page to handle custom page events events.
public  voidaddPopup(HtmlPopup popup)
     Adds a HtmlPopup to a page.
public  voidaddPropertyExpression(Object comp, String propertyName, DataStoreBuffer ds, DataStoreExpression propExpression)
     This method will add a property expression to the Page. The propExpression will be evaluated by the processPropertyExpression method for the current row in the datastore
Parameters:
  comp - The component to set the property for
Parameters:
  propertyName - The name of the property to set.
public  voidaddPropertyExpression(Object comp, String propertyName, DataStoreBuffer ds, String expression)
     This method will add a property expression to the page.
public  voidaddPropertyExpression(Object comp, String propertyName, DataStoreEvaluator expEval)
     This method will add a property expression to the page.
public  voidaddScript(String name, String script)
     Add a named piece of javascript to your page for this request.
public  voidapplySkin(Skin skin, boolean doSetTheme)
     Applies the skin to the page.
public  voidcancelRunThread()
     This method cancels the thread running in the page.
public  voidclearCurrentPageReferer()
     Use this method to clear the last page referred flag.
public  voidclearFormComponents()
    
public  voidclearPortletException()
    
public  voidclearPropertyExpressions()
    
public  voiddisplayPortletException(String ex)
     Displays an error message in the portlet instead of the content.
public  voiddisplayPortletException(String ex, String font)
     Displays an error message in the portlet instead of the contentg.
public static  voidexecutePropertyMethod(Object comp, Method meth, DataStoreEvaluator eval, int row)
     This method is used by components in the framework to process property expressions and shouldn't be called directly.
public synchronized  voidgenerateHTML(PrintWriter p)
    
public  voidgenerateImage(String compName, String imageName, OutputStream out)
     This method will generat and image from a component in the page and send it to the output stream.
protected  StringgenerateToken()
     Generate a new transaction token, to be used for enforcing a single request for a particular transaction.
public  StringgetActivelinkColor()
    
public  VectorgetApplets()
    
public  StringgetBackground()
    
public  StringgetBackgroundColor()
    
public  StringgetBaseTag()
     This method sets the contents of the base tag in the html head tag.
public  booleangetBooleanParameter(String name)
     This method tries to get a the string parameter passed into this function from the URL.
public  EnumerationgetComponents()
     This method will return a list of all components in the page (including subcomponents).
public  HtmlSubmitButtongetDefaultButton()
     Use this method to find out which button will be clicked when the enter key is pressed.
public  StringgetDocumentType()
     This method gets the page DOCTYPE type string.
public  booleangetEncodeURLs()
    
public  intgetFormType()
     This method gets the form type.
public  booleangetGenerateFormTag()
     This method gets whether or not the page will generate a form tag.
public  StringgetHoverLinkColor()
    
public  ImageGeneratorgetImageGenerator(String compName)
     This method will get an image generator from a component in the page.
public  intgetIntParameter(String name, int defaultValue)
     This method tries to get the integer value from the parameter in the URL called passed into this method.
public  intgetIntParameter(String name)
     This method tries to get the integer value from the parameter in the URL called passed into this method.
protected  StringgetLastReferer()
     This method was created in VisualAge.
protected  JspFormgetLastSubmitForm()
    
public  intgetLeftMargin()
     This method returns the left margin for the page or -1 if no margin is set.
public  StringgetLinkColor()
    
public  intgetMarginHeight()
     This method returns the margin height for the page or -1 if no margin is set.
public  intgetMarginWidth()
     This method returns the margin width for the page or -1 if no margin is set.
public  StringgetMetaTag()
     This method gets the contents of the meta tag in the html head tag.
public  VectorgetNavBarsVector()
    
public  StringgetOnLoad()
     This method gets the java script to be executed when the page is loaded.
public  StringgetParameter(String name, String defaultValue)
     Use this method to get a parameter from the HTTP Request.
public  StringgetParameter(String name)
     Use this method to get a parameter from the HTTP Request.
public  HtmlLookUpComponentgetPopupLookupComponent()
     Obtains the lookup component that called this page.
public  intgetPopupLookupComponentRow()
     Obtains the lookup component row that called this page.
public  SalmonPortletExceptiongetPortletException()
    
public static  StringBuffergetRequestURL(javax.servlet.http.HttpServletRequest req)
     This method is basically copy of the same method in HttpUtils, but it fixes the following bug: if the server port in the request is the default, it would be converted to ":0" instead of the empty string.
public  intgetRightMargin()
     This method returns the right margin for the page or -1 if no margin is set.
public  ExceptiongetRunThreadException()
     This method will return the exception thrown by the current run thread.
public  intgetRunThreadPercentComplete()
     This method will return a number between 0 and 100 to indicate the percent the process in the run thread is complete.
public  intgetRunThreadStatus()
     This method will return the status of the currently running page thread (started by the run thread method).
public  SiteMapgetSiteMap()
    
public  StringgetSiteMapActionURL(String logicalName, String actionName, String additionalParms, boolean javaScriptOK)
    
public  StringgetSiteMapActionURL(String logicalName, String actionName)
    
public  StringgetSiteMapEntryNameForPage()
    
public  StringgetSiteMapURL(String logicalName)
    
public  StringgetSiteMapURL(String logicalName, String additionalParms, boolean javaScriptOK)
    
public  HtmlComponentgetSubPage(String name)
     This method returns the component that represents the subpage.
public  StringgetSubPageMimeType(String name)
     This method returns the mime type of the component that represents the subpage.
public  HtmlComponentgetSubmitComponent()
     This method returns the component that submitted the page.
 StringgetSubmitJavaScript(HtmlComponent comp, String url, HtmlInlineFrame frame)
     This method was created in VisualAge.
public  StringgetTextColor()
    
public  StringgetTitle()
     This method gets the title of the page.
public  HtmlContainergetTopContainer()
     This method will return a the container that holds all the components in the page.
public  intgetTopMargin()
     This method returns the top margin for the page or -1 if no margin is set.
public  booleangetUseIFrames()
     This method returns true if the browser supports iFrames.
public  StringgetVisitedLinkColor()
    
public  voidhandlePortletException(Exception ex, boolean logEx, boolean throwEx, String displayHTML)
     Portlet errors have to bubble up through so many layers and wrapped exceptions that they very often aren't recognizable to the portlet itself.
public  booleanisExpired()
    
public  booleanisHtmlAdded(String name)
     Check if a named HTML snippet is part of the page.
public  booleanisReferredByCurrentPage()
     Use this method to find out how this page was envoked.
public  booleanisScriptAdded(String name)
     Check if a named script is part of the page.
public  booleanisTokenValid()
     Return true if there is a transaction token stored in the user's current session, and the value submitted as a request parameter with this action matches it.
public  booleanisWMLMaintained()
    
public  voidloadProperties()
    
protected  booleannotifyListeners(int event, boolean pre)
    
public synchronized  voidprocessParms(boolean iFrameSubmit)
     This method will process the parms from a post for every component in the page.
protected  voidprocessPropertyExpressions()
     This method was created in VisualAge.
public  voidregisterImageGenerator(String key, ImageGenerator gen)
    
public  voidregisterSubPage(String name, HtmlComponent comp)
     This method allows you to specify particular components in the page to be treated as sub pages.
public  voidregisterSubPage(String name, HtmlComponent comp, String mimeType)
     This method allows you to specify particular components in the page to be treated as sub pages.
public  voidremove(HtmlComponent comp)
     Removes an html component from this page.
public  voidremovePageListener(PageListener p)
     This method removes a listener from the list of listeners that will be notified when a page event is fired.
public  voidresetComponents()
     This method will clear out any pending events for all the components in this page.
public  voidresetToken()
     Reset the saved transaction token in the user's session.
public  voidsaveToken()
     Save a new transaction token in the user's current session, creating a new session if necessary.
public  voidscrollToItem(String itemName)
     This method will cause a page to scroll to an anchor.
public  voidsetActiveLinkColor(String value)
    
public  voidsetBackground(String value)
    
public  voidsetBackgroundColor(String value)
    
public  voidsetBaseTag(String value)
     This method sets the contents of the base tag in the html head tag.
public  voidsetDefaultButton(HtmlSubmitButton button)
     Use this method to specify which button will be clicked when the enter key is pressed.
public  voidsetDocumentType(String sDocumentType)
     Use this method to specify the DOCTYPE of the page.
public  voidsetEncodeURLs(boolean encodeURLs)
    
public  voidsetFormType()
    
public  voidsetFormType(int type)
     This method sets the form type.
public  voidsetGenerateFormTag(boolean gen)
     This method sets whether or not the page will generate a form tag.
public  voidsetHoverLinkColor(String value)
    
public  voidsetLeftMargin(int margin)
     This method sets the left margin for the page or -1 to clear it.
public  voidsetLinkColor(String value)
    
public  voidsetMarginHeight(int height)
     This method sets the margin height for the page or -1 to clear it.
public  voidsetMarginWidth(int width)
     This method sets the margin width for the page or -1 to clear it.
public  voidsetMetaTag(String value)
     This method sets the contents of the meta tag in the html head tag.
public  voidsetOnLoad(String value)
     This method sets the java script to be executed when the page is loaded.
public  voidsetRightMargin(int margin)
     This method sets the right margin for the page or -1 to clear it.
public  voidsetTextColor(String value)
    
public  voidsetTitle(String title)
     This method sets the title of the page.
public  voidsetTopMargin(int margin)
     This method sets the top margin for the page or -1 to clear it.
public  voidsetVisitedLinkColor(String value)
    
public  voidsetWMLMaintained(boolean isWmlMaintained)
     Sets whether the page is a WML page or not.
public  voidstartRunThread(PageRunThread r, int pageRefreshInterval)
     Use this method to run a process in a thread.
public  StringtoHex(byte buffer)
     Convert a byte array to a String of hexadecimal digits and return it.
protected  StringtrimUrl(String url, PortletInfo info)
     Use this method to trim the url used in isReferedByCurrentPage().
protected  StringtrimUrl(String url)
     Use this method to trim the url used in isReferedByCurrentPage().
public  voidwriteNamedHtml(Writer pw)
    
public  voidwriteNamedScripts(Writer pw)
    
public  voidwriteScript(String script)
     This method was created in VisualAge.

Field Detail
FORMTYPE_MULTIPART
final public static int FORMTYPE_MULTIPART(Code)



FORMTYPE_URLENCODED
final public static int FORMTYPE_URLENCODED(Code)



GET_EVENT
final protected static int GET_EVENT(Code)



POST_EVENT
final protected static int POST_EVENT(Code)



TRANSACTION_TOKEN_KEY
final public static String TRANSACTION_TOKEN_KEY(Code)



_htmlTable
protected Hashtable _htmlTable(Code)



_script
protected String _script(Code)



_scriptTable
protected Hashtable _scriptTable(Code)



_token
protected String _token(Code)



_vnavbars
protected Vector _vnavbars(Code)





Method Detail
add
public void add(HtmlComponent comp)(Code)
Adds a new html component to this page
Parameters:
  comp - com.salmonllc.html.HtmlComponent



addApplet
void addApplet(HtmlApplet a)(Code)



addHtml
public void addHtml(String name, String html)(Code)
Adds a named piece of HTML to the end of your page. If the HTML with that name is already on the page, it will be replaced. Usually used to support a named script.
Parameters:
  name -
Parameters:
  HTML -



addNavBar
public void addNavBar(JspNavBar jspNavBar)(Code)



addPageListener
public void addPageListener(PageListener p)(Code)
Adds a new listerner to this page to handle custom page events events.



addPopup
public void addPopup(HtmlPopup popup)(Code)
Adds a HtmlPopup to a page. Creation date: (3/27/01 11:12:03 AM)
Parameters:
  popup - com.salmonllc.html.HtmlPopup The popup to be added to the page.



addPropertyExpression
public void addPropertyExpression(Object comp, String propertyName, DataStoreBuffer ds, DataStoreExpression propExpression) throws NoSuchMethodException, DataStoreException(Code)
This method will add a property expression to the Page. The propExpression will be evaluated by the processPropertyExpression method for the current row in the datastore
Parameters:
  comp - The component to set the property for
Parameters:
  propertyName - The name of the property to set. The component must have a corresponding setProperty method or this method will throw a NoSuchMethodException
Parameters:
  ds - The datastore to use for the evaluation
Parameters:
  propExpression - com.salmonllc.html.PropertyExpression The instance of PropertyExpression that should do the evaluating.
exception:
  java.lang.NoSuchMethodException - The exception description.
exception:
  com.salmonllc.sql.DataStoreException - The exception description.



addPropertyExpression
public void addPropertyExpression(Object comp, String propertyName, DataStoreBuffer ds, String expression) throws NoSuchMethodException, DataStoreException(Code)
This method will add a property expression to the page. The property expression will automatically set a property value with the results of the passed expression for the current row in the datastore.
Parameters:
  comp - The component to set the property for
Parameters:
  propertyName - The name of the property to set. The component must have a corresponding setProperty method or this method will throw a NoSuchMethodException
Parameters:
  ds - The datastore to use for the evaluation
Parameters:
  expression - java.lang.String The datastore expression to evaluate
exception:
  java.lang.NoSuchMethodException - The exception description.
exception:
  com.salmonllc.sql.DataStoreException - The exception description.



addPropertyExpression
public void addPropertyExpression(Object comp, String propertyName, DataStoreEvaluator expEval) throws NoSuchMethodException, DataStoreException(Code)
This method will add a property expression to the page. The property expression will automatically set a property value with the results of the passed expression.
Parameters:
  comp - The component to set the property for
Parameters:
  propertyName - The name of the property to set. The component must have a corresponding setProperty method or this method will throw a NoSuchMethodException
exception:
  java.lang.NoSuchMethodException - The exception description.
exception:
  com.salmonllc.sql.DataStoreException - The exception description.



addScript
public void addScript(String name, String script)(Code)
Add a named piece of javascript to your page for this request. If a script with that name is already on the page, it will be replaced. This method is useful for different components that want to share some javascript functions. The first component on the page can add the script and subsequent components can check if the script already exists before adding it again.
Parameters:
  key - The name of the script
Parameters:
  script - The script to add



applySkin
public void applySkin(Skin skin, boolean doSetTheme)(Code)
Applies the skin to the page. This method is called from the framework and should not be called directly. Instead use setSkin(Skin sk)



cancelRunThread
public void cancelRunThread()(Code)
This method cancels the thread running in the page.



clearCurrentPageReferer
public void clearCurrentPageReferer()(Code)
Use this method to clear the last page referred flag. This will allow a submit button on the page to cause a page refresh on the next request by changing the result of isRequestedByCurrentPage to false.



clearFormComponents
public void clearFormComponents()(Code)
This method will set the value for all form components on a page to null



clearPortletException
public void clearPortletException()(Code)
Clears the last portlet exception that occurred



clearPropertyExpressions
public void clearPropertyExpressions()(Code)
This method will remove all property expressions from the list



displayPortletException
public void displayPortletException(String ex)(Code)
Displays an error message in the portlet instead of the content.
Parameters:
  ex - The message to display



displayPortletException
public void displayPortletException(String ex, String font)(Code)
Displays an error message in the portlet instead of the contentg.
Parameters:
  ex - The message to display
Parameters:
  font - The font from the properties file to use



executePropertyMethod
public static void executePropertyMethod(Object comp, Method meth, DataStoreEvaluator eval, int row)(Code)
This method is used by components in the framework to process property expressions and shouldn't be called directly.



generateHTML
public synchronized void generateHTML(PrintWriter p) throws Exception(Code)
This method will generate the html for each component in the page



generateImage
public void generateImage(String compName, String imageName, OutputStream out) throws IOException(Code)
This method will generat and image from a component in the page and send it to the output stream.
Parameters:
  compName - The full name for the component that will generate the image
Parameters:
  imageName - The name of the image
Parameters:
  out - The output stream to write to



generateToken
protected String generateToken()(Code)
Generate a new transaction token, to be used for enforcing a single request for a particular transaction.



getActivelinkColor
public String getActivelinkColor()(Code)
This method gets the active link color for the page



getApplets
public Vector getApplets()(Code)
Returns the list of applets on this page



getBackground
public String getBackground()(Code)
This method returns the url of a background image for the page



getBackgroundColor
public String getBackgroundColor()(Code)
This method gets the background color for the page



getBaseTag
public String getBaseTag()(Code)
This method sets the contents of the base tag in the html head tag.



getBooleanParameter
public boolean getBooleanParameter(String name)(Code)
This method tries to get a 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 parameter that should be used boolean - returns false if the parameter does not exist



getComponents
public Enumeration getComponents()(Code)
This method will return a list of all components in the page (including subcomponents).



getDefaultButton
public HtmlSubmitButton getDefaultButton()(Code)
Use this method to find out which button will be clicked when the enter key is pressed.



getDocumentType
public String getDocumentType()(Code)
This method gets the page DOCTYPE type string.



getEncodeURLs
public boolean getEncodeURLs()(Code)
This method will return false if the page is to skip URL encoding for links within it



getFormType
public int getFormType()(Code)
This method gets the form type. Valid values are FORMTYPE_URLENCODED and FORMTYPE_MULTIPART.



getGenerateFormTag
public boolean getGenerateFormTag()(Code)
This method gets whether or not the page will generate a form tag.



getHoverLinkColor
public String getHoverLinkColor()(Code)
This method gets the hover link color for the page



getImageGenerator
public ImageGenerator getImageGenerator(String compName)(Code)
This method will get an image generator from a component in the page.
Parameters:
  compName - The full name for the component that will generate the image



getIntParameter
public int getIntParameter(String name, int defaultValue)(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 parameter that should be used
Parameters:
  defaultValue - - value to use if the parameter does not exist int - returns the passed default value if the parameter does not exist



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 parameter that should be used int - returns -1 if the parameter does not exist



getLastReferer
protected String getLastReferer()(Code)
This method was created in VisualAge.



getLastSubmitForm
protected JspForm getLastSubmitForm()(Code)



getLeftMargin
public int getLeftMargin()(Code)
This method returns the left margin for the page or -1 if no margin is set. int



getLinkColor
public String getLinkColor()(Code)
This method gets the link color for the page



getMarginHeight
public int getMarginHeight()(Code)
This method returns the margin height for the page or -1 if no margin is set. int



getMarginWidth
public int getMarginWidth()(Code)
This method returns the margin width for the page or -1 if no margin is set. int



getMetaTag
public String getMetaTag()(Code)
This method gets the contents of the meta tag in the html head tag.



getNavBarsVector
public Vector getNavBarsVector()(Code)



getOnLoad
public String getOnLoad()(Code)
This method gets the java script to be executed when the page is loaded.



getParameter
public String getParameter(String name, String defaultValue)(Code)
Use this method to get a parameter from the HTTP Request. The requested parameter or the passed default value if the parameter is not found
Parameters:
  name - The name of the parameter to search for
Parameters:
  defaultValue - The value to use if the parameter is missing



getParameter
public String getParameter(String name)(Code)
Use this method to get a parameter from the HTTP Request. The requested parameter or null if the parameter is not found
Parameters:
  name - The name of the parameter to search for



getPopupLookupComponent
public HtmlLookUpComponent getPopupLookupComponent()(Code)
Obtains the lookup component that called this page.



getPopupLookupComponentRow
public int getPopupLookupComponentRow()(Code)
Obtains the lookup component row that called this page.



getPortletException
public SalmonPortletException getPortletException()(Code)
Returns the last portlet exception that occurred



getRequestURL
public static StringBuffer getRequestURL(javax.servlet.http.HttpServletRequest req)(Code)
This method is basically copy of the same method in HttpUtils, but it fixes the following bug: if the server port in the request is the default, it would be converted to ":0" instead of the empty string. java.lang.StringBuffer
Parameters:
  req - HttpServletRequest



getRightMargin
public int getRightMargin()(Code)
This method returns the right margin for the page or -1 if no margin is set. int



getRunThreadException
public Exception getRunThreadException()(Code)
This method will return the exception thrown by the current run thread. If the status of the the thread is not PageRunThread.STATUS_ERROR the method will return null.



getRunThreadPercentComplete
public int getRunThreadPercentComplete()(Code)
This method will return a number between 0 and 100 to indicate the percent the process in the run thread is complete. If the thread is not set the method will return -1.



getRunThreadStatus
public int getRunThreadStatus()(Code)
This method will return the status of the currently running page thread (started by the run thread method). Valid Return Values are PageRunThread.STATUS_NOT_STARTED, PageRunThread.STATUS_RUNNING, PageRunThread.STATUS_COMPLETED, PageRunThread.STATUS_CANCELED and PageRunThread.STATUS_NOT_SET



getSiteMap
public SiteMap getSiteMap()(Code)
Returns the site map for the application



getSiteMapActionURL
public String getSiteMapActionURL(String logicalName, String actionName, String additionalParms, boolean javaScriptOK)(Code)
Returns the url for a specified logical site map entry action
Parameters:
  logicalName - The name of the entry in the site map
Parameters:
  actionName - The name of the action for the site map entry
Parameters:
  additionalParms - Any additional parameters that need to be appended to the url
Parameters:
  javaScriptOK - True if the URL can contain javascript (for popup windows), False to just contain the location of the page/file The absolute url to the page



getSiteMapActionURL
public String getSiteMapActionURL(String logicalName, String actionName)(Code)
Returns the url for a specified logical site map entry action
Parameters:
  logicalName - The name of the entry in the site map
Parameters:
  actionName - The name of the action for the site map entry The absolute url to the page



getSiteMapEntryNameForPage
public String getSiteMapEntryNameForPage()(Code)
Returns the name of a site map entry by doing a reverse lookup uisng the page's url



getSiteMapURL
public String getSiteMapURL(String logicalName)(Code)
Returns the url for a specified logical site map entry
Parameters:
  logicalName - The name of the entry in the site map The absolute url to the page



getSiteMapURL
public String getSiteMapURL(String logicalName, String additionalParms, boolean javaScriptOK)(Code)
Returns the url for a specified logical site map entry
Parameters:
  logicalName - The name of the entry in the site map
Parameters:
  additionalParms - Any additional parameters that need to be appended to the url
Parameters:
  javaScriptOK - True if the URL can contain javascript (for popup windows), False to just contain the location of the page/file The absolute url to the page



getSubPage
public HtmlComponent getSubPage(String name)(Code)
This method returns the component that represents the subpage.
Parameters:
  name - java.lang.String the name of the subpage component.



getSubPageMimeType
public String getSubPageMimeType(String name)(Code)
This method returns the mime type of the component that represents the subpage.
Parameters:
  name - java.lang.String the name of the subpage component.



getSubmitComponent
public HtmlComponent getSubmitComponent()(Code)
This method returns the component that submitted the page.



getSubmitJavaScript
String getSubmitJavaScript(HtmlComponent comp, String url, HtmlInlineFrame frame)(Code)
This method was created in VisualAge. java.lang.String
Parameters:
  comp - com.salmonllc.html.HtmlComponent
Parameters:
  url - java.lang.String



getTextColor
public String getTextColor()(Code)
This method gets the text color for the page



getTitle
public String getTitle()(Code)
This method gets the title of the page.



getTopContainer
public HtmlContainer getTopContainer()(Code)
This method will return a the container that holds all the components in the page.



getTopMargin
public int getTopMargin()(Code)
This method returns the top margin for the page or -1 if no margin is set. int



getUseIFrames
public boolean getUseIFrames()(Code)
This method returns true if the browser supports iFrames.



getVisitedLinkColor
public String getVisitedLinkColor()(Code)
This method gets the visited link color for the page



handlePortletException
public void handlePortletException(Exception ex, boolean logEx, boolean throwEx, String displayHTML) throws SalmonPortletException(Code)
Portlet errors have to bubble up through so many layers and wrapped exceptions that they very often aren't recognizable to the portlet itself. Rather then throwing a portlet exception directly, you can use this method to make sure the exception bubbles up to the portlet unchanged.
Parameters:
  ex - The exception to handle
Parameters:
  logEx - True to log the exception to the Sofia message log
Parameters:
  throwEx - True to throw the exception to the portal, false to just not render the portlet
Parameters:
  displayHTML - An HTML String to display in the Portlet or null to not display anything
throws:
  Exception -



isExpired
public boolean isExpired()(Code)
This method will indicate whether the page submitting a request is the current one or has been retrieved from the browsers cache



isHtmlAdded
public boolean isHtmlAdded(String name)(Code)
Check if a named HTML snippet is part of the page.
Parameters:
  name - The name for the script to find true if the script is in the page



isReferredByCurrentPage
public boolean isReferredByCurrentPage()(Code)
Use this method to find out how this page was envoked. If it was invoked from itself (via a submit button) the method will return true.



isScriptAdded
public boolean isScriptAdded(String name)(Code)
Check if a named script is part of the page.
Parameters:
  name - The name for the script to find true if the script is in the page



isTokenValid
public boolean isTokenValid()(Code)
Return true if there is a transaction token stored in the user's current session, and the value submitted as a request parameter with this action matches it. Returns false under any of the following circumstances:
  • No session associated with this request
  • No transaction token saved in the session
  • No transaction token included as a request parameter
  • The included transaction token value does not match the transaction token in the user's session



isWMLMaintained
public boolean isWMLMaintained()(Code)
This method returns true if the page represents a wml page



loadProperties
public void loadProperties()(Code)



notifyListeners
protected boolean notifyListeners(int event, boolean pre) throws Exception(Code)



processParms
public synchronized void processParms(boolean iFrameSubmit) throws Exception(Code)
This method will process the parms from a post for every component in the page.



processPropertyExpressions
protected void processPropertyExpressions()(Code)
This method was created in VisualAge.



registerImageGenerator
public void registerImageGenerator(String key, ImageGenerator gen)(Code)



registerSubPage
public void registerSubPage(String name, HtmlComponent comp)(Code)
This method allows you to specify particular components in the page to be treated as sub pages. These sub pages will have their own URL which is a combiniation of the page's url and the name specified. For example a page called Page1 with a subpage called comp1 would have a URL of http://host/servet/AppServer/application/Page1/Comp1. When a subpage is called, only the Html for the specified component will be generated and sent back to the browser.
Parameters:
  name - java.lang.String The name of the subcomponent from the URL
Parameters:
  comp - com.salmonllc.html.HtmlComponent The component to generate the Html



registerSubPage
public void registerSubPage(String name, HtmlComponent comp, String mimeType)(Code)
This method allows you to specify particular components in the page to be treated as sub pages. These sub pages will have their own URL which is a combiniation of the page's url and the name specified. For example a page called Page1 with a subpage called comp1 would have a URL of http://host/servet/AppServer/application/Page1/Comp1. When a subpage is called, only the Html for the specified component will be generated and sent back to the browser.
Parameters:
  name - java.lang.String The name of the subcomponent from the URL
Parameters:
  comp - com.salmonllc.html.HtmlComponent The component to generate the Html
Parameters:
  mimeType - com.salmonllc.html.HtmlComponent The mime type of the component to send back to the browser



remove
public void remove(HtmlComponent comp)(Code)
Removes an html component from this page.
Parameters:
  comp - The component to remove



removePageListener
public void removePageListener(PageListener p)(Code)
This method removes a listener from the list of listeners that will be notified when a page event is fired.



resetComponents
public void resetComponents()(Code)
This method will clear out any pending events for all the components in this page. Use this method if you reset or re-retrieve a datastore in the page.



resetToken
public void resetToken()(Code)
Reset the saved transaction token in the user's session. This indicates that transactional token checking will not be needed on the next request that is submitted.



saveToken
public void saveToken()(Code)
Save a new transaction token in the user's current session, creating a new session if necessary.



scrollToItem
public void scrollToItem(String itemName)(Code)
This method will cause a page to scroll to an anchor.
Parameters:
  itemName - The full name of the anchor to scroll to



setActiveLinkColor
public void setActiveLinkColor(String value)(Code)
This method sets the active link color for the page



setBackground
public void setBackground(String value)(Code)
This method sets the url of a background image for the page



setBackgroundColor
public void setBackgroundColor(String value)(Code)
This method sets the background color for the page



setBaseTag
public void setBaseTag(String value)(Code)
This method sets the contents of the base tag in the html head tag.



setDefaultButton
public void setDefaultButton(HtmlSubmitButton button)(Code)
Use this method to specify which button will be clicked when the enter key is pressed.
Parameters:
  button - The button to click.



setDocumentType
public void setDocumentType(String sDocumentType)(Code)
Use this method to specify the DOCTYPE of the page. This is printed as the first line of the page.
Parameters:
  sDocumentType - String to be printed as the first line



setEncodeURLs
public void setEncodeURLs(boolean encodeURLs)(Code)
This method sets whether or not links in the page will use URL Encoding (rewriting the URL with the sessionid for devices that don't support cookies)



setFormType
public void setFormType()(Code)
This method sets the form type depending on the components in the page



setFormType
public void setFormType(int type)(Code)
This method sets the form type. Valid values are FORMTYPE_URLENCODED and FORMTYPE_MULTIPART.



setGenerateFormTag
public void setGenerateFormTag(boolean gen)(Code)
This method sets whether or not the page will generate a form tag.



setHoverLinkColor
public void setHoverLinkColor(String value)(Code)
This method sets the hover link color for the page



setLeftMargin
public void setLeftMargin(int margin)(Code)
This method sets the left margin for the page or -1 to clear it.



setLinkColor
public void setLinkColor(String value)(Code)
This method sets the link color for the page



setMarginHeight
public void setMarginHeight(int height)(Code)
This method sets the margin height for the page or -1 to clear it.



setMarginWidth
public void setMarginWidth(int width)(Code)
This method sets the margin width for the page or -1 to clear it.



setMetaTag
public void setMetaTag(String value)(Code)
This method sets the contents of the meta tag in the html head tag.



setOnLoad
public void setOnLoad(String value)(Code)
This method sets the java script to be executed when the page is loaded.



setRightMargin
public void setRightMargin(int margin)(Code)
This method sets the right margin for the page or -1 to clear it.



setTextColor
public void setTextColor(String value)(Code)
This method sets the text color for the page



setTitle
public void setTitle(String title)(Code)
This method sets the title of the page.



setTopMargin
public void setTopMargin(int margin)(Code)
This method sets the top margin for the page or -1 to clear it.



setVisitedLinkColor
public void setVisitedLinkColor(String value)(Code)
This method sets the visited link color for the page



setWMLMaintained
public void setWMLMaintained(boolean isWmlMaintained)(Code)
Sets whether the page is a WML page or not.



startRunThread
public void startRunThread(PageRunThread r, int pageRefreshInterval)(Code)
Use this method to run a process in a thread. The page will be refreshed at pageRefreshInterval seconds and allow you to display a progress bar.



toHex
public String toHex(byte buffer)(Code)
Convert a byte array to a String of hexadecimal digits and return it.
Parameters:
  buffer - The byte array to be converted



trimUrl
protected String trimUrl(String url, PortletInfo info)(Code)
Use this method to trim the url used in isReferedByCurrentPage(). It looks for the third '/' and a '?' and gives you back the middle



trimUrl
protected String trimUrl(String url)(Code)
Use this method to trim the url used in isReferedByCurrentPage(). It looks for the third '/' and a '?' and gives you back the middle



writeNamedHtml
public void writeNamedHtml(Writer pw) throws IOException(Code)
Framework method, do not call directly



writeNamedScripts
public void writeNamedScripts(Writer pw) throws IOException(Code)
Framework method, do not call directly



writeScript
public void writeScript(String script)(Code)
This method was created in VisualAge.
Parameters:
  script - java.lang.String



Fields inherited from com.salmonllc.html.HtmlPageBase
final public static String APPLICATION_ALIAS_SESSION_KEY(Code)(Java Doc)
final public static int BROWSER_DREAMWEAVER(Code)(Java Doc)
final public static int BROWSER_MICROSOFT(Code)(Java Doc)
final public static int BROWSER_NETSCAPE(Code)(Java Doc)
final public static int BROWSER_OS_MAC(Code)(Java Doc)
final public static int BROWSER_OS_OTHER(Code)(Java Doc)
final public static int BROWSER_OS_WINDOWS(Code)(Java Doc)
final public static String LANGUAGE_SESSION_KEY(Code)(Java Doc)
protected String _subPageNameValue(Code)(Java Doc)
protected boolean _useDisabledAttribute(Code)(Java Doc)
final protected static boolean debug(Code)(Java Doc)

Methods inherited from com.salmonllc.html.HtmlPageBase
public void applySkin(Skin skin, boolean doSetTheme)(Code)(Java Doc)
public void clearDefaultSkin(boolean forAllApps)(Code)(Java Doc)
public void clearLanguagePreferences()(Code)(Java Doc)
public void clearPageFromSession()(Code)(Java Doc)
public void clearPageFromSession(String pageName)(Code)(Java Doc)
public static void displayError(String error, Exception e, PrintWriter p)(Code)(Java Doc)
abstract public void generateHTML(PrintWriter p) throws Exception(Code)(Java Doc)
public String getApplicationName()(Code)(Java Doc)
public int getBrowserOS()(Code)(Java Doc)
public float getBrowserSubVersion()(Code)(Java Doc)
public int getBrowserType()(Code)(Java Doc)
public int getBrowserVersion()(Code)(Java Doc)
public String getContentType()(Code)(Java Doc)
public HttpServletRequest getCurrentRequest()(Code)(Java Doc)
public HttpServletResponse getCurrentResponse()(Code)(Java Doc)
public boolean getDisableRedirect()(Code)(Java Doc)
public boolean getForwardPerformed()(Code)(Java Doc)
public boolean getGenerateFullHTML()(Code)(Java Doc)
public boolean getHistoryFixUp()(Code)(Java Doc)
public LanguagePreferences getLanguagePreferences()(Code)(Java Doc)
public String getOrigApplicationName()(Code)(Java Doc)
public String getPageName()(Code)(Java Doc)
public Props getPageProperties()(Code)(Java Doc)
public PortletInfo getPortletInfo()(Code)(Java Doc)
public String getServerURL()(Code)(Java Doc)
public String getServletBaseURL()(Code)(Java Doc)
public String getServletPath()(Code)(Java Doc)
public HttpSession getSession()(Code)(Java Doc)
public Skin getSkin()(Code)(Java Doc)
public String getSubPageName()(Code)(Java Doc)
public boolean getUseDisabledAttribute()(Code)(Java Doc)
abstract public void initialize() throws Exception(Code)(Java Doc)
public boolean isRequestFromPortlet()(Code)(Java Doc)
public boolean isSessionExpired()(Code)(Java Doc)
public void loadProperties()(Code)(Java Doc)
abstract public void processParms(boolean iFrameSubmit) throws Exception(Code)(Java Doc)
public void resetApplicationAlias()(Code)(Java Doc)
public void setApplicationAlias(String applicationAlias)(Code)(Java Doc)
public void setApplicationName(String name)(Code)(Java Doc)
public void setContentType(String contentType)(Code)(Java Doc)
public void setCurrentRequest(ActionRequest r)(Code)(Java Doc)
public void setCurrentRequest(HttpServletRequest r)(Code)(Java Doc)
public void setCurrentResponse(HttpServletResponse r)(Code)(Java Doc)
public void setCurrentResponse(ActionResponse res, ActionRequest req)(Code)(Java Doc)
public void setDefaultSkin(Skin skin, boolean forAllApps)(Code)(Java Doc)
public void setDisableRedirect(boolean bRedirect)(Code)(Java Doc)
public void setForwardPerformed(boolean forwardPerformed)(Code)(Java Doc)
public void setGenerateFullHTML(boolean gen)(Code)(Java Doc)
public void setHistoryFixUp(boolean ok)(Code)(Java Doc)
public void setLanguagePrefrence(LanguagePreferences pref)(Code)(Java Doc)
public void setOrigApplicationName(String name)(Code)(Java Doc)
public void setPageName(String name)(Code)(Java Doc)
public void setPortletInfo(PortletInfo info)(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 setSkin(Skin skin)(Code)(Java Doc)
public void setSubPageName(String name)(Code)(Java Doc)
public void setUpLanguagePreferences()(Code)(Java Doc)
public void setUseDisabledAttribute(boolean useDisabledAttribute)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.