struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paweł Wielgus <poulw...@gmail.com>
Subject Re: form question
Date Wed, 08 Sep 2010 07:29:49 GMT
Hi Daniel,
yes You can,
link that will enter the page is:
/myaction!input
so input method will be called
and saving data is:
/myaction
that way validation errors will only show up when standard /myaction is called.

Best greetings,
Paweł Wielgus.


2010/9/8 Daniel Rindt <drindt@visetics.com>:
> Hello,
>
> i created an action what is displaying a form. This form also shows the
> input errors. The action implements the Preparable Interface to provide
> collections to display. My save method is in the same action class.
>
> Is it possible to have a mapping for just one action name, what is
> caring about display the form and save the values and also show
> validation error messages?
>
> I experiment since hours to achive that. Here are my mappings:
> === 8< ===
> <action name="displayRegform" class="action.Register" method="input">
>  <result name="input">/registration/registrationForm.jsp</result>
>  <result name="success"
> type="redirectAction">registrationSuccessfulThankYou                    </result>
> </action>
> <action name="displayRegform" class="action.Register" method="add">
>  <result name="input">/registration/registrationForm.jsp</result>
>  <result name="success"
> type="redirectAction">registrationSuccessfulThankYou                    </result>
> </action>
> <action name="registrationSuccessfulThankYou">
>        <interceptor-ref name="basicStackHibernate" />
> <result>/registration/registrationSuccessThankYou.jsp</result>
> </action>
> === 8< ===
>
> TIA
> Daniel
>

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


Mime
View raw message