Mike,
I haven't used subForm before and I'm not sure if i understand how to
use it for implementing the validation logic here. If i put each
h:inputText in its own subForm wouldn't that make each field
independent from the others? How would i submit all of the fields at
once, convert their values but skip required validation (per request
basis) and update model?
Here's what kind of behavior the user should see:
- When the user asks the system to show a list of available values for
a field, all of the other non-empty, syntactically correct (i.e.
conversion goes fine) field values should also be updated to the
model. Any of the other field values can potentially affect the list
of items shown in the picker popup.
- When the user asks the system to produce a report, all field values
should be updated to the model. Normal conversion and validation
(including checking required component values) should take place
The form currently looks something like this:
<h:form>
<!-- Input text field with a select item picker popup link. The form
can have 1 to n of these -->
<h:inputText required="true"/>
<h:commandLink
actionListener="#{reportSelectionHandler.startSelectParameterValues}">
<h:graphicImage url="foo.gif"/>
<t:updateActionListener
property="#{reportSelection.reportParameterName}" value="foo"/>
</h:commandLink>
<h:inputText required="false"/>
<h:commandLink
actionListener="#{reportSelectionHandler.startSelectParameterValues}">
<h:graphicImage url="foo.gif"/>
<t:updateActionListener
property="#{reportSelection.reportParameterName}" value="bar"/>
</h:commandLink>
<h:commandButton value="get report"
actionListener="#{reportSelectionHandler.fetchReport}"/>
</h:form>
marko
Mike Kienenberger wrote:
It sounds like you could dump the special request value and just use a
subForm around your text field and select item picker icon, couldn't
you? This should get you back to "mainstream" JSF validation
processing.
Is the required map only used for getting around the icon picking
issue? If so, you should be able to dump it as well.