struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Markert <>
Subject Re[2]: Question about the form tag
Date Wed, 16 Jul 2003 12:58:31 GMT
Hello Nadja,


NS> Hello,

>>sounds like you are using many html:form action=""
>>maybe in an iterate?
>>or maybe I am not understanding the problem?

NS> Okay, let me try to explain my problem a bit better. I can search for a
NS> certain kind of object in my application. Those object get displayed on a
NS> page - first only titles. If you click on the titles a more detailed view
NS> of the object appears, including a few form elements (checkboxes and a
NS> hidden field containing the objects id) and buttons. The buttons have
NS> different functionality - one is there for to allow people to change the
NS> object. The checkboxes mark the pages of the object data form that should
NS> be displayed (if none are being checked all will get displayed when the
NS> object is supposed to be changed). 

NS> Since I can find more than one object, I display a list of them on this
NS> page, I've mentioned. More than one of the objects can be opened in the
NS> more detailed view - therefore there will be more than one form with the
NS> exact same action and the same buttons and the same names for fields...

NS> Now, when I have more than one object in a detailed view - and therefore
NS> have more than one form - and I click a button I have to make sure that the
NS> right form gets submitted or I will get the wrong data... And so far I only
NS> ever got the data of the very first form in the page at that moment.

Lets try to understand what Struts is doing behind the scenes. Your
request gets submitted and it will contain a lot of parameters.
Actually it will contain parameters with the same name. For form1 it
is name, for form2 it is again name. And so on. Now Struts tries to
put this into your action form. It grabs one parameter (the first one)
and populates your form. If this is correct (depends on your jsp) a
solution would be to use indexed props.

NS> Is that more understandable now?

NS> Greetings,
NS> Nadja

NS> ---------------------------------------------------------------------
NS> Nadja  Senoucci
NS> Universitaet Hamburg
NS> Zentrum für Molekulare Neurobiologie
NS> Service-Gruppe EDV
NS> Falkenried 94
NS> 20251 Hamburg
NS> Germany
NS> Tel.:040 - 428 - 03 - 6619
NS> Fax.:040 - 428 - 03 - 6621

NS> ---------------------------------------------------------------------
NS> To unsubscribe, e-mail:
NS> For additional commands, e-mail:


+------- Quality leads ---------------------------------------+
| Dirk Markert            |
| Dr. Markert Softwaretechnik AG                              |
| Joseph-von-Fraunhofer-Str. 20                               |
| 44227 Dortmund                                              |
+---------------------------------->>>>>>> to success! <<<<<<-+

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message