THere has been many mentions about Jelly "not converting my string into an array as expected"...
Same thing happens in j:forEach: people expect the list to be "naturally" separated by some spaces, commas, or whatever...
Everytime I read this I keep being frightened if such a feature would be introduced in Jelly... It would be very very unpredictable (suppose I am using this with the input of a user...).
In order for such a patch and several others to be applied, I would like to become convinced that one can do this in a way developers expect.
One way could be to have separators as extra attribute:
- this would work well for j:forEach
- it would solve the problem here except that "separator" or "separators" couldn't be a bean-property-name
Remember, though, that we would need a syntax for such separators, in particular if one wishes to express categorie of characters like "whitespace".
Anyone else with good ideas ? A global setting impacting BeanUtils ?
thanks
paul
On 5-May-04, at 20:16 Uhr, Geoffrey Arnold wrote:
Hi All.
I have been testing Jelly and JellySwing extensively and am encouraged by their potential as an Java alternative to Windows Forms .NET.
I recently came across a problem with tag attributes which correspond to arrays in JavaBeans. For example, given the following bean:
public class SampleBean { public String[] theArray; ... public String[] getTheArray() { return this.theArray; } public void setTheArray(String[] anArray) { this.theArray = anArray; } }
... I hoped to be able to set the value of "theArray" using XML similar to the following:
<jelly:useBean var="sampleBean" class="SampleBean" theArray="element1, element2, element3"/>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
