for struts 2, 

    1 html page have 2 forms at different panel, each form have its own 
textfield for input and submit button as well.

the problem:
    when 1 form's textfield validation trigger, but error message display at 
both form's texfield place.
   in other words, 
      <s:fielderror/>
      <s:actionerror/>
  can not associate with its embed form, how to solve that?
  is that struts2 bug?

tks in advance

john

*************************************************************

source code  

    <s:form action="XAction" >
       <s:textfield name="name">
         <s:fielderror/>
         <s:actionerror/>
       <s:submit value="x_submit"/>
     </s:form>
 
     <s:form action="YAction" >
       <s:textfield name="age">
         <s:fielderror/>
         <s:actionerror/>
       <s:submit value="y_submit"/>
     </s:form>

   for XAction-validation.xml
         <validators> 
     <field name="name"> 
         <field-validator type="requiredstring">
           <param name="trim">true</param>
           <message key="errors.required" /> 
     </field-validator>
    </field>
     </validators>

  for YAction-validation.xml
         <validators> 
     <field name="age"> 
         <field-validator type="requiredstring">
           <param name="trim">true</param>
           <message key="errors.required" /> 
     </field-validator>
    </field>
     </validators> 

Reply via email to