|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.stripes.tag.DefaultPopulationStrategy
public class DefaultPopulationStrategy
Default implementation of the form input tag population strategy. First looks to see if there is a parameter with the same name as the tag submitted in the current request. If there is, it will be returned as a String[] in order to support multiple-value parameters.
If there is no value in the request then an ActionBean bound to the current form will be looked for. If the ActionBean is found and the value is non-null it will be returned. If no value can be found in either place, null will returned.
Constructor Summary | |
---|---|
DefaultPopulationStrategy()
|
Method Summary | |
---|---|
protected Configuration |
getConfiguration()
Accessor for the configuration supplied when the population strategy is initialized. |
Object |
getValue(InputTagSupport tag)
Implementation of the interface method that will follow the search described in the class level JavaDoc and attempt to find a value for this tag. |
protected Object |
getValueFromActionBean(InputTagSupport tag)
Helper method that will check to see if there is an ActionBean present in the request, and if so, retrieve the value for this tag from the ActionBean. |
protected Object |
getValueFromTag(InputTagSupport tag)
Helper method that will retrieve the preferred value set on the tag in the JSP. |
protected String[] |
getValuesFromRequest(InputTagSupport tag)
Helper method that will check the current request for user submitted values for the tag supplied and return them as a String[] if there is one or more present. |
void |
init(Configuration configuration)
Called by the Configuration to configure the component. |
protected boolean |
isFormInError(InputTagSupport tag)
Helper method that will check to see if the form containing this tag is being rendered as a result of validation errors. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultPopulationStrategy()
Method Detail |
---|
public void init(Configuration configuration) throws Exception
init
in interface ConfigurableComponent
configuration
- the Configuration object being used by Stripes
Exception
- should be thrown if the component cannot be configured well enough to use.protected Configuration getConfiguration()
public Object getValue(InputTagSupport tag) throws StripesJspException
getValue
in interface PopulationStrategy
tag
- the form input tag whose value to populate
StripesJspException
protected String[] getValuesFromRequest(InputTagSupport tag) throws StripesJspException
tag
- the tag whose values to look for
StripesJspException
protected Object getValueFromActionBean(InputTagSupport tag) throws StripesJspException
tag
- the tag whose values to look for
StripesJspException
protected Object getValueFromTag(InputTagSupport tag)
tag
- the tag that is being repopulated
protected boolean isFormInError(InputTagSupport tag) throws StripesJspException
tag
- the tag that is being repopulated
StripesJspException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |