I have a field I want to require only if the bean
it exists inside exists (is not null).

I cannot use validwhen because I am using struts 1.1.

I tried to use requiredif like this

        <form name="/ChargeTypeStore">
                <field property="chargeTypeDTO.name"
depends="requiredif">
                        <arg0 key="LeaseChargeTypeDTO.name"/>
                        <var>
                                <var-name>field[0]</var-name>
                                <var-value>chargeTypeDTO</var-value>
                        </var>
                        <var>
                                <var-name>fieldTest[0]</var-name>
                                <var-value>NOTNULL</var-value>
                        </var>
                </field>
        </form>

but I get

org.apache.commons.beanutils.NestedNullException:
Null property value for 'chargeTypeDTO'

I want to require chargeTypeDTO.name if and only if
chargeTypeDTO is not null.  Can I do this in struts 1.1?
Thanks,
Dan


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

Reply via email to