my dog learned polymorphism*
The moose likes Struts and the fly likes Indexed properties, multiple rows submission using struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Indexed properties, multiple rows submission using struts " Watch "Indexed properties, multiple rows submission using struts " New topic
Author

Indexed properties, multiple rows submission using struts

Suresh Appagundi
Ranch Hand

Joined: Sep 22, 2003
Posts: 44
Hi

First thing is, i want to display multiple rows in the JSP for example 5 employee records such that each row says about one employee.

Now i change some data in some rows or all 5 rows in the Form and submit.

How i need to handle this in My action form. I mean how can i use the collection object to store all this 5 employee rows and give back to Action class.

Please give me example, which gives all the struts components, like how the JSP contents should be, ActionForm and Action class.

If there is any link, where i can find some examples, let me know

very urgent.

thanks
in advance
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
It still boggles my mind when people as for others to do their work. There's a wonderful page on the Struts website about indexed properties. I suggest you go find it.


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
Chris Rickey
Greenhorn

Joined: Nov 30, 2004
Posts: 2
Have you found any good examples of the indexed properties? Unlike the previous poster, I have read the indexed properties documentation on the struts site and found it to be an abortion.

I have been trying for days to get indexed properties to work they way it seems they should, but there is something I am missing.

I have an object, call it ParentClass. It has properties key (getKey, setKey) and child (getChild, setChild) which is of type ChildClass.
There is another object, call it ChildClass. It also has a property key (getKey, setKey). Each parent has one and only one child.

I have an ActionForm that has property Parents which is a List.

I have an action that finds the Parents I want and puts them in a list and, on my ActionForm, setParents(listOfParents).

So far, so good.

Now, in my JSP, when I try to loop over the parents via
<c:forEach var="aParent" items="${ActionForm.parents}">

I want to set a hidden html field via
<html:hidden property="key" indexed="true"/>

And I want to set a html text field to the child key via
<html:text property="child.key" index="true"/>

But I get an error " No getter method for property key of bean org.apache.struts.taglib.html.BEAN".

Where am I going wrong?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Indexed properties, multiple rows submission using struts
 
Similar Threads
INNERHTML
validation with struts and tiles
Transferring table data using struts
How Struts will identify Class (with get / set methods) associated with it
Problem with IndexId attribute