You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by fea jabi <zy...@hotmail.com> on 2006/08/08 21:50:58 UTC

validation of two form properties

have form properties a and b

have to validate that property b is an integer, greater than 0 and also 
greater than form property a.

<field property="b" depends="integer,validwhen">
                <msg name="integer" key="errors.notvalid"/>
                <msg name="validwhen" key="errors.notvalid"/>
                <var>
                    <var-name>test</var-name>
                    <var-value>( (*this* >= 0) and (*this* >= a) 
)</var-value>
                </var>
            </field>

tried using the above. but not working. getting error message even when the 
form property is greater than zero and greater than a.

what is missing here? Thanks.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Using variable of a tag in a scriplet...how to??

Posted by Gaet <ga...@free.fr>.
Hi all the list,

I need to use the variable defined in a collection tag in a scriptlet....and
I can't get it work!
I'm trying some codes and I don't understand why the following doesn't work,
could you help me please?


<layout:collection name="employeesVector" id="employeeRow">
        <!-- Try to define a local variable -->
        <bean:define id="EmployeeLocaleVar" name="employeeRow"/>

        <!-- try to use my variable to get a value in a HashMap -->
        <%= myHashMap.get(employeeVar.getId())) %>

</layout:collection

The webservser message is :
    "Cannot find bean cptbleLstadhRow in any scope"


If you can help, it would be great!
Thank you, at least, to take time to read me

Gaet


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: validation of two form properties

Posted by fea jabi <zy...@hotmail.com>.
can someone help me wih this please? Thanks.


>From: "fea jabi" <zy...@hotmail.com>
>Reply-To: "Struts Users Mailing List" <us...@struts.apache.org>
>To: user@struts.apache.org
>Subject: validation of two form properties
>Date: Tue, 08 Aug 2006 15:50:58 -0400
>
>have form properties a and b
>
>have to validate that property b is an integer, greater than 0 and also 
>greater than form property a.
>
><field property="b" depends="integer,validwhen">
>                <msg name="integer" key="errors.notvalid"/>
>                <msg name="validwhen" key="errors.notvalid"/>
>                <var>
>                    <var-name>test</var-name>
>                    <var-value>( (*this* >= 0) and (*this* >= a) 
>)</var-value>
>                </var>
>            </field>
>
>tried using the above. but not working. getting error message even when the 
>form property is greater than zero and greater than a.
>
>what is missing here? Thanks.
>
>_________________________________________________________________
>Express yourself instantly with MSN Messenger! Download today - it's FREE! 
>http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org