logic:iterate - editable table

2008-01-16 Thread Oliver Thoms
Hi,

I have searched the archive but havn't found any
solution for the following problem:

I have an array of entries to display, so I use the
logic:iterate tag.

But due to customer request, the data should not be
just displayed (bean:write) and afterwards edited by
the usual EDIT Button and an subsequent EditAction.

But the data should be displayed in html:text fields
and be editable directly in the table.

Since the Iterator is just a temporary reference to
the elements of the array for rendering, I can't
access the underlying objects after submit.

I thought about the indexId in the iterator an using
it in a scriplet in the 'onchange' parameter of the
html:text.
But this feels and looks realy nasty.


Any suggestions how to solve this elegantly?


   __  Ihre erste Baustelle? Wissenswertes 
für Bastler und Hobby Handwerker. www.yahoo.de/clever

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: logic:iterate - editable table

2008-01-16 Thread Otto, Frank
hi, 

you can use the attribute indexed=true in html:text tag.

or in complex cases:

logic:iterate name=myForm property=myList id=list indexId=loop
  html:text name=myForm property=%=myList[ + (loop.intValue()) + 
].myProperty%/
/logic:iterate


kind regards,

frank

-Ursprüngliche Nachricht-
Von: Oliver Thoms [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 16. Januar 2008 12:42
An: user@struts.apache.org
Betreff: logic:iterate - editable table


Hi,

I have searched the archive but havn't found any
solution for the following problem:

I have an array of entries to display, so I use the
logic:iterate tag.

But due to customer request, the data should not be
just displayed (bean:write) and afterwards edited by
the usual EDIT Button and an subsequent EditAction.

But the data should be displayed in html:text fields
and be editable directly in the table.

Since the Iterator is just a temporary reference to
the elements of the array for rendering, I can't
access the underlying objects after submit.

I thought about the indexId in the iterator an using
it in a scriplet in the 'onchange' parameter of the
html:text.
But this feels and looks realy nasty.


Any suggestions how to solve this elegantly?


   __  Ihre erste Baustelle? Wissenswertes 
für Bastler und Hobby Handwerker. www.yahoo.de/clever

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: AW: logic:iterate - editable table

2008-01-16 Thread Oliver Thoms

Hi,

vielen Dak für den Hint, ich erlaube mir, direkt
anzuschreiben:

ich nutze noch Struts 1.1 (ein Erbe einer großen
Firma)
Ich scheine mich echt blöd anzustellen:

Nutze ich den JAVA Typ ArrayList für meine Collection
dann funktioniert der Iterator, aber nicht das
indexed=true.

Nutze ich ein Object Array [] dann funktioniert noch
nichtmal der Iterator (vermute der kann nicht aus nem
Object Array gebildet werden) denn ich bekomme eine
Fehlermeldung die darauf schließen lässt dass die ID
des Iterators als Form gesucht wird (Can't find form
bean 'blabla' in any scope.)

Oder hab ich da was übersehen?!

Muss ich nen Wrapper schreiben der das ObjectArray als
ArrayList zurückliefert damit das JSP die rendern
kann?

Gruß,
Oliver





--- Otto, Frank [EMAIL PROTECTED] schrieb:

 hi, 
 
 you can use the attribute indexed=true in
 html:text tag.
 
 or in complex cases:
 
 logic:iterate name=myForm property=myList
 id=list indexId=loop
   html:text name=myForm property=%=myList[ +
 (loop.intValue()) + ].myProperty%/
 /logic:iterate
 
 
 kind regards,
 
 frank
 
 -Ursprüngliche Nachricht-
 Von: Oliver Thoms [mailto:[EMAIL PROTECTED]
 Gesendet: Mittwoch, 16. Januar 2008 12:42
 An: user@struts.apache.org
 Betreff: logic:iterate - editable table
 
 
 Hi,
 
 I have searched the archive but havn't found any
 solution for the following problem:
 
 I have an array of entries to display, so I use the
 logic:iterate tag.
 
 But due to customer request, the data should not be
 just displayed (bean:write) and afterwards edited by
 the usual EDIT Button and an subsequent EditAction.
 
 But the data should be displayed in html:text fields
 and be editable directly in the table.
 
 Since the Iterator is just a temporary reference to
 the elements of the array for rendering, I can't
 access the underlying objects after submit.
 
 I thought about the indexId in the iterator an using
 it in a scriplet in the 'onchange' parameter of the
 html:text.
 But this feels and looks realy nasty.
 
 
 Any suggestions how to solve this elegantly?
 
 
__  Ihre
 erste Baustelle? Wissenswertes für Bastler und Hobby
 Handwerker. www.yahoo.de/clever
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 



  Machen Sie Yahoo! zu Ihrer Startseite. Los geht's: 
http://de.yahoo.com/set

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: logic:iterate - editable table

2008-01-16 Thread Randy Burgess
I would check out the LazyActionForm for this which was added to Struts
1.2.6 and upwards in classic Struts.

http://www.niallp.pwp.blueyonder.co.uk/lazyactionform.html

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



 From: Oliver Thoms [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List user@struts.apache.org
 Date: Wed, 16 Jan 2008 12:41:41 +0100 (CET)
 To: user@struts.apache.org
 Subject: logic:iterate - editable table
 
 Hi,
 
 I have searched the archive but havn't found any
 solution for the following problem:
 
 I have an array of entries to display, so I use the
 logic:iterate tag.
 
 But due to customer request, the data should not be
 just displayed (bean:write) and afterwards edited by
 the usual EDIT Button and an subsequent EditAction.
 
 But the data should be displayed in html:text fields
 and be editable directly in the table.
 
 Since the Iterator is just a temporary reference to
 the elements of the array for rendering, I can't
 access the underlying objects after submit.
 
 I thought about the indexId in the iterator an using
 it in a scriplet in the 'onchange' parameter of the
 html:text.
 But this feels and looks realy nasty.
 
 
 Any suggestions how to solve this elegantly?
 
 
__  Ihre erste Baustelle? Wissenswertes
 für Bastler und Hobby Handwerker. www.yahoo.de/clever
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]