Hi there,

Actually when you are looking at the stuff done in the JSTL
all three ways pretty much work, because it contains a
scripting language ;).

Are there any plans on integrating it within Struts? I like 
both libraries very much, and I recall a discussion was going
on a while ago about it?

If it is done this would make it is either:

  1. property = "all I want to write"
 
  2. property = "<%= java expression %>"

  3. property = "${myRadios[param.index]}"
  
  (here with 'index' as a request variable ;))

Manfred.
 
> -----Original Message-----
> From: Arnaud HERITIER [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, July 17, 2002 10:29 AM
> To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
> Subject: RE: Indexed Properties - soluce :-)
> 
> 
> All suggestions are welcome Eddie.
> 
> Your idea and your argumentations are good, but your proposed 
> solution doesn't work :-(
> 
> Explanations :
> 
> In a taglib property you can use either a string value or a 
> RunTime Expression (if allowed in the TLD).
> 
> If you use a string you have something like :  property="all 
> I want to write"
> 
> If you use a RT Expr you have something like : 
> property="<%=java expression%>"
> 
> The tag libraries interpreter verify if the content of the 
> property begins with <%= and ends with %> . In this case it 
> suppose that it is a RT Expr and values it. In all other case 
> it supposes that the content is a string.
> 
> With your suggestion, property="myRadios[<%= index %>]" the 
> tag libraries interpretor see that there's not <%= at the 
> begining and %> at the end. Then it passes the value 
> "myRadios[<%= index %>]" as a string to the taglib.
> 
> When the taglib get the content of property, it will analize 
> it and see that it is a indexed property because of [..] but 
> won't be able to interpret it and will launch an exception like :
> 
> java.lang.IllegalArgumentException: Invalid indexed property 
> 'myRadios[<%=index%>]'
> 
> However, it is important to say that your advice is totally 
> good if you want to use a dynamic value in standard html tag.
> 
> I you have another idea to clean my code, don't hesitate to 
> propose it.
> 
> 
> Arnaud.
> 

<<attachment: winmail.dat>>

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

Reply via email to