struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colin Sampaleanu <co...@Bspark.com>
Subject RE: Property lookup
Date Fri, 01 Sep 2000 22:10:52 GMT
I think if you want to handle dynamic forms properly (there is already a
thread discussing this in the dev group), then for any of the form elements
tags it is sometimes very very handy (or vital) have the 'property' and
'value' element be runtime evaluated... We've already had to do this for at
least a few of them (text, checkbox, etc.)

Allowing the property to be dynamic means when I am looping I can build up
the name of the property I am interested in, via an expression. Allowing
value to be dynamic means I can get the value from somewhere else, as
opposed to having to get it out of the named property or use a fixed value.
I also do not think it is always reasonable to assume that the property name
should be the same name that is used as the form submit name. I am
potentially getting the value from one bean with one name, but want to
submit it up as another name, for the form bean handling thsi submit. Now if
the value field was dynamic the getting could also be done that way, but I
would prefer to specify the source bean and property name, and also have
another attribute that allowed me to override the name it was submitted as
(the HTML form element 'name' attribute).



-----Original Message-----
From: Craig R. McClanahan [mailto:Craig.McClanahan@eng.sun.com]
Sent: August 30, 2000 8:05 PM
To: struts-user@jakarta.apache.org
Subject: Re: Property lookup


Frank Nguyen wrote:

> Is it because of performance reasons that the property <rtexprvalue> is
set
> to false for almost all
> the attributes of the Struts tags?  I actually have to change a few of
them
> to true, including the one for
> the struts:message.key property.
>

Yes; however, the impact should be rather small in general.  I tend to be a
little conservative about things like that, but I'm certainly open to
suggestion on which tags should allow runtime expressions for which
attributes.

The <struts:message key="xxx"/> tag was just fixed.  Are there other tags in
particular that you think should allow runtime expressions (or that you've
changed in your own copy of Struts and might be globally useful)?

Craig


>
> ----- Original Message -----
> From: "Craig R. McClanahan" <Craig.McClanahan@eng.sun.com>
> To: <struts-user@jakarta.apache.org>
> Sent: Wednesday, August 30, 2000 4:45 PM
> Subject: Re: Property lookup
>
> > Stanley Santiago wrote:
> >
> > > In trying to use the struts:message tag, I ran into a situation where
> > > the value for the
> > > key attribute is generated at run time.
> > >
> > > for example...
> > > <struts:message key="<%= foo %>" />
> > >
> > > This is not supported currently but probably a useful feature to have.
> > >
> >
> > That certainly makes sense.  I just checked in a change to the
struts.tld
> > file to enable this, which will show up in tonight's nightly build.
> >
> > >
> > > Stan
> >
> > Craig McClanahan
> >
> >
> > ====================
> > See you at ApacheCon Europe <http://www.apachecon.com>!
> > Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
> > Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
> >                                     Applications to Tomcat
> >
> >
> >

--
====================
See you at ApacheCon Europe <http://www.apachecon.com>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat


Mime
View raw message