Re: Struts 2 and dynamics web page

2010-04-30 Thread Alex Rodriguez Lopez

This example proved helpful to me:

http://struts2inaction.com/SimpleAjax.html

In the end I ended up doing the same with jQuery:




You can get the selected option and pass as params to the called action.

The action has a result that is a jsp with just the content that will 
get loaded into the div (like a select).


Em 30-04-2010 05:02, Stephane Cosmeur escreveu:

Hello Struts 2 Users,

I would like to call an action when an envent onchange from a s:select
component is dispatched. According to the selected value I would like to
load data in a form in order to modify it after. To do that i would like to
call a Struts 2 action with AJAX, is it posible and is it the best solution
to perofrm it ?

In the JSP what should i do ?

Case 1: the action return a jsp page inside the main jsp page

@include page=form.jsp

Case 2 : the AJAX request refresh div by calling an action



Any help would be greatly appreciated







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



Struts 2 and dynamics web page

2010-04-29 Thread Stephane Cosmeur
Hello Struts 2 Users,

I would like to call an action when an envent onchange from a s:select
component is dispatched. According to the selected value I would like to
load data in a form in order to modify it after. To do that i would like to
call a Struts 2 action with AJAX, is it posible and is it the best solution
to perofrm it ?

In the JSP what should i do ?

Case 1: the action return a jsp page inside the main jsp page

@include page=form.jsp

Case 2 : the AJAX request refresh div by calling an action



Any help would be greatly appreciated




-- 
Stéphane Cosmeur
06 33 54 36 04