You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by faisalloe <fa...@gmail.com> on 2007/06/19 14:10:20 UTC
Spring velocity form reload issue!!!!!
what i m trying to do, spring displays a form, when click on submit it should
display the same form but added attribute value in request object.i tried
but its not working hope any one drag out error from it.
<entry key="/successLogin.htm">
<ref bean="searchForm" />
</entry>
-------------------------------------------------------------------
<bean id="searchForm"
class="com.rim.admin.controlers.SearchFormControle r">
<property name="sessionForm">
<value>true</value>
</property>
<property name="commandName">
<value>searchForm</value>
</property>
<property name="commandClass">
<value>com.rim.admin.model.Search</value>
</property>
<property name="validator">
<ref bean="searchFormValidator" />
</property>
<property name="formView">
<value>search1</value> <!-- its my velocity file resolver is already
setteled no worries about this-->
</property>
<property name="successView">
<value>successLogin.htm</value> <!-- again comming on same form-->
</property>
</bean>
--------------------------------------------------------------
SearchFormControler
--------------------
public ModelAndView onSubmit(
HttpServletRequest request,
HttpServletResponse response,
Object command,
BindException errors) throws ServletException, Exception {
Search form = (Search)command;
ArrayList list = new ArrayList();
TestTO o = new TestTO();
o.setEmail("sdf@gmail.com");
o.setName("fsdfsdf");
list.add(o);
return new ModelAndView(getSuccessView(),"lists",o);
}
------------------- VM ---------------------------
#foreach($list in $lists)
$list.getEmail()
#end
--------------------------------------------------
it does not display any data any idea ?
--
View this message in context: http://www.nabble.com/Spring-velocity-form-reload-issue%21%21%21%21%21-tf3945949.html#a11193288
Sent from the Velocity - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org
Re: Spring velocity form reload issue!!!!!
Posted by Will Glass-Husain <wg...@gmail.com>.
Hi faisalloe,
We can wait to see if anyone on this list has hit a similar problem, but
since this is Spring MVC-specific you might have more luck in the Spring
forums.
best,
WILL
On 6/19/07, faisalloe <fa...@gmail.com> wrote:
>
>
> what i m trying to do, spring displays a form, when click on submit it
> should
> display the same form but added attribute value in request object.i tried
> but its not working hope any one drag out error from it.
>
>
> <entry key="/successLogin.htm">
> <ref bean="searchForm" />
> </entry>
> -------------------------------------------------------------------
> <bean id="searchForm"
> class="com.rim.admin.controlers.SearchFormControle r">
> <property name="sessionForm">
> <value>true</value>
> </property>
> <property name="commandName">
> <value>searchForm</value>
> </property>
> <property name="commandClass">
> <value>com.rim.admin.model.Search</value>
> </property>
>
> <property name="validator">
> <ref bean="searchFormValidator" />
> </property>
>
> <property name="formView">
> <value>search1</value> <!-- its my velocity file resolver is already
> setteled no worries about this-->
> </property>
>
> <property name="successView">
> <value>successLogin.htm</value> <!-- again comming on same form-->
> </property>
>
> </bean>
>
> --------------------------------------------------------------
> SearchFormControler
> --------------------
> public ModelAndView onSubmit(
> HttpServletRequest request,
> HttpServletResponse response,
> Object command,
> BindException errors) throws ServletException, Exception {
> Search form = (Search)command;
>
> ArrayList list = new ArrayList();
> TestTO o = new TestTO();
> o.setEmail("sdf@gmail.com");
> o.setName("fsdfsdf");
> list.add(o);
>
> return new ModelAndView(getSuccessView(),"lists",o);
> }
>
> ------------------- VM ---------------------------
> #foreach($list in $lists)
> $list.getEmail()
> #end
> --------------------------------------------------
>
> it does not display any data any idea ?
> --
> View this message in context:
> http://www.nabble.com/Spring-velocity-form-reload-issue%21%21%21%21%21-tf3945949.html#a11193288
> Sent from the Velocity - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>
--
Forio Business Simulations
Will Glass-Husain
wglass@forio.com
www.forio.com