I've had situations where resolving the name dynamically has been VERY important (think of a generic configuration editor -- say, something that edits a .properties file).
As for inconsistencies, those should be addressed. Could you compile a list of the ones you've found and open a bug? -Pat -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Patterson Sent: Monday, November 24, 2003 2:17 AM To: [EMAIL PROTECTED] Subject: Re: [OS-webwork] OGNL madness - evaluated tag attributes Is this standard going to be followed for every attribute? Currently, it seems that certain attributes are exempt and it is difficult to predict which. For example, when setting params with <ww:param> on the BeanTag the name is evaluated whereas on the URLTag it is not. This is due to the ParamTag not evaluating the 'name' attribute but leaving it to the ParametisedTag to override the addParam() method. ie public void addParam(String key, Object value) { OgnlUtil.setProperty(findString(key), value, bean, getStack().getContext()); } If it is decided that all attributes are to be evaluated then this should be made consistent by moving the evaluation code into the ParamTag. Otherwise, if this "selective evaluation" is to be kept then I suggest some naming standard is used and well documented. Personally I had no problems with the old WW2 practice of not evaluating 'name' attributes. I have to struggle to think of a situation where evaluating any 'name' attribute is useful. But I can understand those who think that this practice was inconsistent. John. ----- Original Message ----- From: "Jason Carreira" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 24, 2003 4:36 AM Subject: RE: [OS-webwork] OGNL madness - evaluated tag attributes <ww:property value="'firstHalf' + secondHalf"/> I have to agree that the ${} syntax makes this easier.... Especially where you want to put in single quotes (see the indexed property example I just added tonight) and yet... It's too much to change. > -----Original Message----- > From: Drew McAuliffe [mailto:[EMAIL PROTECTED] > Sent: Sunday, November 23, 2003 11:30 PM > To: [EMAIL PROTECTED] > Subject: RE: [OS-webwork] OGNL madness - evaluated tag attributes > > > What about > > <ww:property value="firstHalf${secondHalf}"/> > > ? The advantage of the velocity-style escaped syntax is that > it allows for more flexibility, so that the whole thing > doesn't have to get evaluated. > > Also, what about tags where what could be displayed might be > evaluated in some cases, but might not in others? How can you > build that logic into the framework so it knows whether to be > evaluated or not? I think the question is not whether we > should always evaluate or not, because that question has been > answered already by use of the "triple-quoting"; it has been > decided that it is more flexible to allow for values to be > passed into tag attributes that _can_ be evaluated against > the stack but don't always have to be. I agree with that > approach. The question I'm raising is regarding the way the > syntax of those values is structured. I just don't like the > triple-quote approach. > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of boxed > Sent: Sunday, November 23, 2003 2:02 PM > To: [EMAIL PROTECTED] > Subject: Re: [OS-webwork] OGNL madness - evaluated tag attributes > > Drew McAuliffe wrote: > > >I agree, and I think that it should be the ${} syntax. The reason I > >like the optional syntax is solely for backwards compatibility. > > > > > I don't see why you are using java if you prefer that way of > writing personally. > > Let's compare the alternaitves: > <ww:property value="name"/> > <ww:property value="${name}"/> > > Am I wrong in assuming that simple usage of the variables is > the most common thing in the WW EL? Because if it is then > implementing a more verbose syntax for it is > counterproductive. The rule of thumb is to make the most > common actions simple and intuitive and there is nothing > intuitive about the ${} syntax. > > Anders Hovmöller > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us > help YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork