struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tudor Andrei Raneti <w0lfsh...@yahoo.com>
Subject [s2] design problem
Date Mon, 07 Dec 2009 08:03:59 GMT
i load up dataParams.jsp from main.jsp:
[code]  <c:when test="${param.dataParams == 'show' and param.data == null}">
    <s:action name="dataParams_input" executeResult="true"></s:action></c:when> 
[/code]
i map it in struts.xml:
[code]  <action name="dataParams_*" method="{1}" class="loto.action.DataParams">
   <result type="redirectAction">/jsp/main.jsp</result>
   <result name="input">/jsp/dataParams.jsp</result>
  </action>  [/code]
and set up a DataParams-validator.xml.
The problem starts when i submit dataParams.jsp 's form:
[code] <form action="dataParams" method="get"> [/code]
because it's supposed to validate while beeing loaded by main.jsp, but it displays alone not
included in main.jsp when it displays errors.
The key to this problem is what should i write in <form action="????????????" to make this
work the way i aim?

Further thoughts:
If i dataParams action doesn't get called when dataParams submits, the struts 2 xml validation
doesn't fire. 
dataParams.jsp is supposed to be always included in main.jsp though, showing errors or not,

but if i call main action, the struts 2 xml validation is always bypassed by the input action.

dataParams bypasses validation the first time because it doesn't need to validate when first
shown (like in HelloWorld), should i validate from start and live with it? 
Maybe action chaining would do it? I don't know... 


      

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


Mime
View raw message