Superficially it appears that it would "un-clutter" things because it would mean less tags, but there's no "reliable" way to know that a value is to be taken as a nested property. The dot delimiter is not enough, because in most nested cases there is no dot, as it's relative to the parent tag. This means that there has to be an extra property in the tag like...
property-values="true" ...or similar, and it's not like we want to feel the civil uprising if we made it the default logic. So it's already making the markup more messy just to turn it on. Then add the scope and name details to get your bean, and not only does it add an extra property to the tag, but it also has to be adapted on the inside for every property for every tag. That makes the inside more messy also. Implementing it is not a simple change to PropertyUtils, but to every tag for every property that you want to use the ability. Then add it to the nested tags (because they have to take the value of the property and evaluate the qualified nested version), and the effort has to be duplicated yet again. In my opinion, the cleanest and most intuitive solution for all parties is to leave the tags to do what they do best, and that would include the define tag. Arron. Johan Compagner wrote: >I know i can do 2 define to get the maxRows and startCounter >i do it now because there is not other way but it clutters the view >and is a bit annoying to constantly define things. > >Nested everywhere for every tag where you can define a bean would be >so much nicer and the jsp code would be much cleaner to read.. >And it is a small modification for BeanUtils (or PropertyUtils) >The only thing it needs to do is first check if there is a nested delimiter >if so then try to find the first in the specific scope (if any) >then do it the "current" way. > >johan > >----- Original Message ----- >From: "Arron Bates" <[EMAIL PROTECTED]> >To: "Struts Developers List" <[EMAIL PROTECTED]> >Sent: Thursday, February 21, 2002 1:19 PM >Subject: Re: Nested properties everywhere.... > > >>The tags use direct values or beans themselves to provide values for >>offsets and such. Would be quite a bit of work to get them all to work >>off bean properties instead, and there's the added decision of telling >>the tag that it is to use the values of properties rather than bean refs >>and values. >> >>The nested tags are the same in this regard, as the rely on the original >>tag to do its thang. When the original tags get the ability, the nested >>tags will get the ability, but of course they'll add the ability to have >>the property relative to the current nested bean level. >> >>You can get around it though, by using the bean define, working on a >>property to get a value into a bean reference, then use the bean name >>for the offsets and such. And of course, when using the nested tags, the >>bean define will be nested, so it's not like it can't be done. The >>define tag can also put beans into whatever scope which is one of the >>things that you're after. >> >>Arron. >> >> >>Johan Compagner wrote: >> >>>Hi, >>> >>>I really would like to see that i can type nested properties everywhere. >>>so every parameter of a tag that can map to a bean in the whatever scope >>>should be able to use nested tags.. >>> >>>So to give an example: >>> >>><logic:iterate id="obj" name="listbean.list" scope="request" >>>offset="listbean.startCounter" length="listbean.maxRows"> >>> >>>ofcouse i could also do this in the above example but it is just a case >>> >what > >>>should be possible. >>><logic:iterate id="obj" name="listbean" property="list" scope="request" >>>offset="listbean.startCounter" length="listbean.maxRows"> >>> >>> >>>This really cleans up the jsp code and is very readable. >>> >>>Or can i use the new nested tags feature for this?? >>>But this does not work: >>> >>><nested:root name="listbean"> >>><nested:iterate id="obj" property="list" scope="request" >>>offset="startCounter" length="maxRows"> >>> >>>but that doesn't seem to work. >>> >>>johan >>> >>> >>> >>> >>> >>>-- >>>To unsubscribe, e-mail: >>> ><mailto:[EMAIL PROTECTED]> > >>>For additional commands, e-mail: >>> ><mailto:[EMAIL PROTECTED]> > >> >> >>-- >>To unsubscribe, e-mail: >> ><mailto:[EMAIL PROTECTED]> > >>For additional commands, e-mail: >> ><mailto:[EMAIL PROTECTED]> > >> > > > >-- >To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
