Re: Problem with logic:iterate and List of Strings

2006-06-14 Thread Florian Barth

I tried to do it with your piece of code, but that didn't quite work
I think one solution would be to write a StringWrapper with a 
String-Value and the according getter/setter (e.g. getVal, setVal) and 
fill the list with this StringWrappers instead of Strings, so name="stringWrapper" value = "val" /> will work
But I really dislik changing my data-structure because of some 
"gui-problems"

Ideas anyone ? ;)

Florian Barth schrieb:

The list of strings is actually part of an ActionForm.
On load of display I kinda like to decompose the list to a bunch of 
text-fields, that are recomposed to a list of string on submit



   


I'll try this, maybe the value of the String could be added by value = 
${s}, right?


Thank you

Dave Newton schrieb:

Florian Barth wrote:

Looks very nice, but the textfield accesses the getter and setter of
the LabelValueBean
that is returned from the StrinBean. My Bean just returns the the
String-object that has
actually no getter and setter for it's value.


Let me get this straight: you're iterating over a list of strings and
you want to create a textbox for each one, but they're not linked to an
ActionForm bean?


  


If they're not fields in an ActionForm I'm not sure how you're going to
be able to use the Struts form beans.

Dave



-
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]



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



Re: Problem with logic:iterate and List of Strings

2006-06-14 Thread Florian Barth

The list of strings is actually part of an ActionForm.
On load of display I kinda like to decompose the list to a bunch of 
text-fields, that are recomposed to a list of string on submit



   


I'll try this, maybe the value of the String could be added by value = 
${s}, right?


Thank you

Dave Newton schrieb:

Florian Barth wrote:

Looks very nice, but the textfield accesses the getter and setter of
the LabelValueBean
that is returned from the StrinBean. My Bean just returns the the
String-object that has
actually no getter and setter for it's value.


Let me get this straight: you're iterating over a list of strings and
you want to create a textbox for each one, but they're not linked to an
ActionForm bean?


  


If they're not fields in an ActionForm I'm not sure how you're going to
be able to use the Struts form beans.

Dave



-
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]



Re: Problem with logic:iterate and List of Strings

2006-06-14 Thread Dave Newton
Florian Barth wrote:
> Looks very nice, but the textfield accesses the getter and setter of
> the LabelValueBean
> that is returned from the StrinBean. My Bean just returns the the
> String-object that has
> actually no getter and setter for it's value.

Let me get this straight: you're iterating over a list of strings and
you want to create a textbox for each one, but they're not linked to an
ActionForm bean?


  


If they're not fields in an ActionForm I'm not sure how you're going to
be able to use the Struts form beans.

Dave



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



Re: Problem with logic:iterate and List of Strings

2006-06-14 Thread Florian Barth
I actually found the page you were mentioning before. But that doesn't 
resolve my problem:
In  "Dynamic Indexes for Indexed Properties" there is an example for 
using a text-field

to alter a String value:




Looks very nice, but the textfield accesses the getter and setter of the 
LabelValueBean
that is returned from the StrinBean. My Bean just returns the the 
String-object that has

actually no getter and setter for it's value.

I hope that could clarify myy problem ;)

Greetings,

Florian

Zitat von Rahul Akolkar <[EMAIL PROTECTED]>:

[Zitattext verstecken]
On 6/13/06, Florian Barth <[EMAIL PROTECTED]> wrote:
Hi folks!
I'm having a little problem with a jsp.
My FormBean has a List of Strings as value.
Now I would like to iterate over the elements of that list, creating a
text-field for every element the list contains.
At the moment I can online write out the elements using this code-snippet:




Just putting in  doesn't work,
because the str-String-Object doesn't have getter or setter for it's
value, so I didn't find an substitute for fooBar that works. I pretty
sure that there is an easier way than writing a wrapper for String with
getter and setter.


http://struts.apache.org/struts-action/struts-taglib/indexedprops.html

-Rahul

I searched the Mailing-List and googled around a bit, but didn't find
something useful.

Hope you can help me,

Thank you very much,

Regards,
Florian

-
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]



Re: Problem with logic:iterate and List of Strings

2006-06-13 Thread Rahul Akolkar

On 6/13/06, Florian Barth <[EMAIL PROTECTED]> wrote:

Hi folks!
I'm having a little problem with a jsp.
My FormBean has a List of Strings as value.
Now I would like to iterate over the elements of that list, creating a
text-field for every element the list contains.
At the moment I can online write out the elements using this code-snippet:




Just putting in  doesn't work,
because the str-String-Object doesn't have getter or setter for it's
value, so I didn't find an substitute for fooBar that works. I pretty
sure that there is an easier way than writing a wrapper for String with
getter and setter.




http://struts.apache.org/struts-action/struts-taglib/indexedprops.html

-Rahul



I searched the Mailing-List and googled around a bit, but didn't find
something useful.

Hope you can help me,

Thank you very much,

Regards,
Florian



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



Problem with logic:iterate and List of Strings

2006-06-13 Thread Florian Barth

Hi folks!
I'm having a little problem with a jsp.
My FormBean has a List of Strings as value.
Now I would like to iterate over the elements of that list, creating a 
text-field for every element the list contains.

At the moment I can online write out the elements using this code-snippet:




Just putting in  doesn't work, 
because the str-String-Object doesn't have getter or setter for it's 
value, so I didn't find an substitute for fooBar that works. I pretty 
sure that there is an easier way than writing a wrapper for String with 
getter and setter.


I searched the Mailing-List and googled around a bit, but didn't find 
something useful.


Hope you can help me,

Thank you very much,

Regards,
Florian


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