incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Kienenberger" <mkien...@gmail.com>
Subject Re: Subform Validation
Date Fri, 20 Apr 2007 00:36:47 GMT
To do this with the Tomahawk subForm, you'd use actionFor="subFormA"
and you'd give the SubForm for A an id of "subFormA".   I think the
same method works for Trinidad, but the attribute name for
tr:commandButton might be different.

On 4/19/07, D. Cardon <my_trash_mail@yahoo.com> wrote:
> Hi,
>
> I have two compound components, A and B, which need to be validated separately.
>  So, I've placed each in its own subform.  Outside of these components, I have
> a 'submit' button, like this:
> <tr:form>
>   <!-- Component A -->
>   <tr:subform>
>      <tr:inputText value="#{backBean.itemName} required="true" />
>   </tr:subform>
>   <!-- Component B -->
>   <tr:subform default="true">
>      <tr:inputText value="#{backBean.entry} autoSubmit="true"
>           validator="#{backBean.entryValidator}" />
>   </tr:subform>
>   <!-- Submit Button -->
>   <tr:commandButton text="Submit" action="#{backBean.submit}" />
> </tr:form>
>
> Component B uses PPR and does its own validation correctly, but component A
> does not and should be validated when the submit button is pressed.  However,
> since the submit button does not reside inside of component A's subform, A is
> not validated and invalid data may be sent when the submit button is pressed.
>
> If I move A outside of its subform (so it's at the form level), then changing
> values in B results in the premature validation of A, which I don't want.
>
> How can I get A's validation to fire when the submit button is pressed?
>
> Thanks,
>
> --David
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>

Mime
View raw message