File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts-Ajax Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts-Ajax Problem" Watch "Struts-Ajax Problem" New topic

Struts-Ajax Problem

RoshaniG Gopal
Ranch Hand

Joined: May 15, 2006
Posts: 180
Hi all,
I am using platform: Struts 1.2.9, JDK 1.4, Tomcat 5.0.30

Basic Problem:
A JSP has a row which contains different elements (Textbox, combo box, checkbox, etc). A button is given to provide the �Add Row� functionality. It creates a dynamic row that is a replica of the same row.

There is a triple-combo-box (third based on second and second based on first) in the row. Currently I am using JS to populate but the second dynamic row gives a problem and the values are not populated in the desired manner.

I plan to use Ajax for the same.

SampleCodeProblem:I made a sample code for which i have this problem.
Generally most the available examples use �id� <input type=�text� .. id=��>. The tags for Struts do not support id. <html:text name=�� >. Span tag may be use for differentiating Ajax returns.

When I use Span tag and I use:

<html:text name=�abc� property=�xyz�>

The tomcat server gives an error for the bean not found, whereas the bean exists and the proper getXXX() and setXXX() are there in the Form class. The example in question is not giving any problem when I want to display any text/image etc. It works fine. When ever I put any tag inside <span> which requires a user input it throws an exception.

Kindly help me solve the problem.

Regards,<br />Roshani
I agree. Here's the link:
subject: Struts-Ajax Problem
It's not a secret anymore!