Hi,
I am using the velocity for UI purpose.when i am developing the velocity
pages i am using the macros. now i am validating the velocity page where i
am using the macro's those fields are not validating. I am using the
struts2.0.6 and tomcat6.0

. I am writing the macro in my velocity page.
#macro (stexttelfield $label1 $label2 $label3)
        <input type="text" name="$label1" size="4">-
        <input type="text" name="$label2" size="4">-
        <input type="text" name="$label3" size="4">
#end

And I am writing the validation.xml file
<!DOCTYPE validators PUBLIC
        "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
        "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd";>

<validators>
    <field name="username">
        <field-validator type="requiredstring">
            <message key="requiredstring"/>
        </field-validator>
         
    </field>
    <field name="password">
        <field-validator type="requiredstring">
            <message key="requiredstring"/>
        </field-validator>
    </field>
    <field name="password1">
        <field-validator type="requiredstring">
            <message key="requiredstring"/>
        </field-validator>
   
</validators>

The struts.xml file action is

<action name="Login" class="example.Login">
            <result type="velocity">example/Login.vm</result>
            <result type="redirect-action">Menu</result>
        </action>


But the macro fields are not recognize by validation.xml file. so please
suggest me the solution

Regards
suresh 
-- 
View this message in context: 
http://www.nabble.com/Please-sugest-how-to-do-the-macro-validation-in-velocity-tf3905513.html#a11073031
Sent from the Struts - User mailing list archive at Nabble.com.


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

Reply via email to