You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ashish Kulkarni <ku...@yahoo.com> on 2006/01/12 15:47:28 UTC

How to update part of JSP using AJAX and struts action class

Hi
I have a jsp where there are 2 drop down boxes,
I want to populate the value in second drop down box
depending on the selection of first dropdown box,
Suppose onClick event on first dropdown box i call a
struts Action  using AJAX, this Action class populates
the Form bean and sends it back to 
How can in ajax i can access this form bean, get the
data, once i get the data i can update drop down using
DHTML,
Is there some framework or tutorial for doing this.
I am populating form bean to make this application
workable in non AJAX supporting browser also, and all
my existing application is written this way and i dont
want to change a lot in it

Ashish

A$HI$H

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: How to update part of JSP using AJAX and struts action class

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Java Web Parts can do this:

http://javawebparts.sourceforge.net

And your in luck!  The cookbook comes with an example of doing precisely 
this.  Download it here:

http://sourceforge.net/project/showfiles.php?group_id=140728&package_id=167877&release_id=366815

Frank

Ashish Kulkarni wrote:
> Hi
> I have a jsp where there are 2 drop down boxes,
> I want to populate the value in second drop down box
> depending on the selection of first dropdown box,
> Suppose onClick event on first dropdown box i call a
> struts Action  using AJAX, this Action class populates
> the Form bean and sends it back to 
> How can in ajax i can access this form bean, get the
> data, once i get the data i can update drop down using
> DHTML,
> Is there some framework or tutorial for doing this.
> I am populating form bean to make this application
> workable in non AJAX supporting browser also, and all
> my existing application is written this way and i dont
> want to change a lot in it
> 
> Ashish
> 
> A$HI$H
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 
> .
> 

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com

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


Re: How to update part of JSP using AJAX and struts action class

Posted by Torgeir Veimo <to...@pobox.com>.
On Thu, 2006-01-12 at 06:47 -0800, Ashish Kulkarni wrote:
> Hi
> I have a jsp where there are 2 drop down boxes,
> I want to populate the value in second drop down box
> depending on the selection of first dropdown box,
> Suppose onClick event on first dropdown box i call a
> struts Action  using AJAX, this Action class populates
> the Form bean and sends it back to 
> How can in ajax i can access this form bean, get the
> data, once i get the data i can update drop down using
> DHTML,
> Is there some framework or tutorial for doing this.
> I am populating form bean to make this application
> workable in non AJAX supporting browser also, and all
> my existing application is written this way and i dont
> want to change a lot in it

DWR might help you; http://getahead.ltd.uk/dwr/

This example is not too far from what you're trying to do;
http://getahead.ltd.uk/dwr/examples/lists

-- 
Torgeir Veimo <to...@pobox.com>


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