| java.lang.Object simpleorm.simplewebapp.core.WPage
All known Subclasses: simpleorm.simplewebapp.eg.simple.WUploadPage, simpleorm.simplewebapp.eg.database.WInitPage, simpleorm.simplewebapp.eg.simple.WCrudPage, simpleorm.simplewebapp.eg.simple.WListPage, simpleorm.simplewebapp.eg.simple.WTreePage, simpleorm.simplewebapp.eg.token.WTokenCrudPage, simpleorm.simplewebapp.eg.token.WTokenListPage, simpleorm.simplewebapp.eg.token.WRowCrudPage, simpleorm.simplewebapp.eg.token.WRowListPage, simpleorm.simplewebapp.eg.token.WTableListPage, simpleorm.simplewebapp.eg.simple.WManualListCrudPage, simpleorm.simplewebapp.eg.database.WTestPage, simpleorm.simplewebapp.eg.database.WDumpRawPage,
WPage | public class WPage (Code) | | The JSP Bean that contains the state for the current page, ie. menus, buttons and fields.
Normally extended by application specific beans for specific page.
Normally created by the WPageTag tag, but can be instantiated directly for unit tests.
The wPage JSP instance variable
should be Page JSP beanName scope as forwarded pages will have their own beanName
But must be Request scope so that idiot JSP Tablibs can still see them.
Note that the WPageTag always clobers any exiting RequestBean,
so they essentially do have page scope even though they are store on the request.
(Was called WPageBean (but not page scope) then WRequestBean (but really per page) and finally WPage.)
Most of the processing is done by WPageStructure which is one-to-one with this.
This class mainly contains the JSP visible methods.
|
pageContext | WPageContext pageContext(Code) | | Set by WWebeanTag to wrap the PageContext.
Remains null for unit tests outside the Web framework.
|
submitButton | WButton submitButton(Code) | | The button in the button bar that was pressed to submit the form.
Normally set by retrieveParameters but can be manually set for unit tests.
|
getFieldGroupsValues | public Collection<WFieldGroup> getFieldGroupsValues()(Code) | | This must be a one step method to work arround bugs in JSP/EL
|
getFields | public Map<String, WField> getFields()(Code) | | Used in jsp as ${wPage.fields.id.text}
Finds the given field in the current (or only) WPagelet.
Exception if not found (otherwise JSPs ignore!)
|
getListFieldValues | public Collection<WField> getListFieldValues()(Code) | | These are needed ${webBean.crudFields.options} does not work!
|
getPageName | public String getPageName()(Code) | | The name of the page, as stored in its WMenuItemGlobal.
|
getPagelet | public WPagelet getPagelet()(Code) | | getPageStructure().getCurrentPagelet()
|
getRowIndex | public int getRowIndex() throws Exception(Code) | | Row nr of the current row. Used to shade every other row in lists. First is 0.
|
isErroneous | public boolean isErroneous()(Code) | | |
isMultipart | public boolean isMultipart()(Code) | | |
logPage | public void logPage()(Code) | | Utility to dump page state to the debug log.
|
onInitialize | protected void onInitialize() throws Exception(Code) | | Used mainly to open DB connections.
Needs to be on Page, not Pagelet, so that all pagelets share the same connection, eg. in listCrud.
|
setSubmitButton | public void setSubmitButton(WButton submitButton)(Code) | | |
|
|