| java.lang.Object simpleorm.simplewebapp.core.WPageEvents simpleorm.simplewebapp.core.WPagelet
All known Subclasses: simpleorm.simplewebapp.dbute.WGenericCrudPagelet, simpleorm.simplewebapp.core.WPageletList,
WPagelet | public class WPagelet extends WPageEvents (Code) | | A page is composed of multiple pagelets that represent things like a Tree or a Crud section.
So a Tree/Crud page consists of two pagelets.
Simple HTML really works one page at a time, so pagelets are kept simple.
For example, the namespaces of their fields overlaps to be simple HTML field names.
If you are trying to do something too clever with pagelets try just using multiple pages.
See WPageEvents for details of how the events are fired and grouped together.
|
allFieldsStrict | Map<String, WField> allFieldsStrict(Code) | | This weird structure is needed so that JSPs will return
errors for ${wPage.fields.myFieldOopsxyz}
(Jsps will only access a Map, not a method with a parameter.)
|
name | String name(Code) | | Name of the pagelet, eg. "list" or "crud".
Used by tag libraries such as esgp:autoCrud to identify the correct the correct pagelet.
(Not the name of the page itself, eg. WCustomerPage.)
|
potentialSuccessUrl | String potentialSuccessUrl(Code) | | Where to redirect to if our form was successfully processed.
(Normally the List form that called the Crud form.)
See WPage.actualRedirectUrl.
|
WPagelet | public WPagelet(WPage wpage, String name)(Code) | | Registers itself with page.
Note that this MUST be in the constructor, not a separate
register() method, so that things like buttons can be conveniently added
to the page in constructors.
|
addField | public F addField(WFieldGroup group, F field)(Code) | | Adds field to the group AND the entire page.
|
debug | public void debug(String msg)(Code) | | Convenience logger().debug() method.
Be sure to use if loger().isDebug guards for anything effecient sensitive.
|
determineSuccessUrl | void determineSuccessUrl()(Code) | | |
getAllFieldValues | public Collection<WField> getAllFieldValues()(Code) | | The collection of fields; (strictness irrelevant).
|
getAllFieldsNull | public Map<String, WField> getAllFieldsNull()(Code) | | Get map of all fields.
get(key) on that map returns null if key not found, as normal.
cf.getAllFieldsStrict.
|
getFieldGroupsValues | public Collection<WFieldGroup> getFieldGroupsValues()(Code) | | This must be a one step method to work arround bugs in JSP/EL
|
getFieldStrict | public WField getFieldStrict(String shortName)(Code) | | Returns field named name, exception if not found.
Can be useful for generated fields, but normally just use
WField variables instead.
|
getPotentialSuccessUrl | public String getPotentialSuccessUrl()(Code) | | |
isErroneous | public boolean isErroneous()(Code) | | Indicates that an unhandled WValidationException was thrown by this pageLET.
Mainly used in onWasMaybeErroreous overrides.
|
nullAllFields | public void nullAllFields()(Code) | | Nulls all fields on this pagelet.
Called after successful crud submit.
Needed for ListPage where we don't actually
redirect.
|
retrieveParameters | protected void retrieveParameters()(Code) | | Does into crudFields
(Regardless of wheter the form wasSubmitted -- gets and posts.)
Determines non-submit referer.
|
setPotentialSuccessUrl | public void setPotentialSuccessUrl(String potentialSuccessUrl)(Code) | | |
validateFields | void validateFields() throws Exception(Code) | | Calls validators, building up errors List.
Multiple errors are supported, but only one per field.
|
wasSubmitted | public boolean wasSubmitted()(Code) | | True if the form has been submitted, and thus should be validated and then redirected etc.
|
|
|