struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergio Sánchez González" <sergi...@gmail.com>
Subject Re: Form Notify after validation
Date Wed, 03 Dec 2008 14:35:36 GMT
Taking a look to this
https://issues.apache.org/struts/browse/WW-2860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

I understand the notify is going to be called anyway, either the
validation it's ok or not. Then the only way to avoid the notification
 is using javascript to validated the form, and submitting the call
from javascript too if it validates.


2008/12/2 Sergio Sánchez González <sergiosg@gmail.com>:
> I want to add validations to my forms. But the problem I have is in
> these forms I have notify actions, and this notifys should only be
> called if the validation is ok.
>
> for example:
>                <sx:submit targets="orders" notifyTopics="/closeNewOrder,/openOrders"
... />
>
> The form action:
>
>        <action name="CreateOrder" class="newOrderController"
> method="createOrder">
>
>             <result type="redirectAction">
>                <param name="actionName">listOrders</param>
>                </result>
>
>            <result name="input">OrderNewForm.jsp</result>
>            <result name="error">OrderNewForm.jsp</result>
>
>        </action>
>
> with closeNewOrder I hide the form and with openOrders I open a div
> with a list of orders. The point is that if the validation is not ok
> then the orders list shouldn't be opened.
>
> Any idea?
> Thanks!
>
> Sergio
>

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


Mime
View raw message