Hello,
I am making a registration procedure that works with some logic based on the
choices the customer makes on a previous page

<logic:equal name="LogonForm" property="customertype" scope="session"
value="business">
    <span class="label"><label><bean:message
key="text.data.label.bill_vat_number"/></label></span>
    <html:text property="bill_vat_nr" styleId="bill_vat_nr" />
</logic:equal>

Problem description :
When a customer is of customertype 'business' the field bill_vat_nr is
showed on the page and is required when a customer is not of customertype
'business' the field bill_vat_nr is not showed on the page and theirfor is
not required

I tried to use a standard struts validator implementation
<field property="bill_vat_nr" depends="required">
    <arg0 key="text.data.label.bill_vat_number"/>
    <arg1 key="${dummy}"/>
</field>

I first thought about using the requiredif implementation. Problem is that I
only get it to work with elements from the same form.

The result :
The bill_vat_nr is required even if it has been left out of the form by
struts logic

My question :
Is their a way to combine struts logic and the validator framework? Do I
have to write a custom validator that does some kind of introspection on the
jsp? Or are their validators that are used for that purpose? What would be
the best solution to tackle this problem?

Tnx in advance
Alexander Craen


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to