|
From: <jue...@we...> - 2004-12-08 21:20:11
|
It's already committed to the main branch, so will be in 1.1.3 :-) =20 Thanks for the suggestion! =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von Rob Butler Gesendet: Mi 08.12.2004 22:08 An: spr...@li... Betreff: Re: [Springframework-developer] Re: [Springframework-user] = Velocity Tools and Spring MVC GREAT! Will this make it into 1.1.3? Thanks j=FCrgen, your efforts are greatly appreciated. Rob --- j=FCrgen h=F6ller [werk3AT] <jue...@we...> wrote: > OK, I'll add an "attributes" property of type > java.util.Properties and an "attributesMap" property > of type java.util.Map to UrlBasedViewResolver. The > first can be populated via <value> or <props>; the > latter is meant to be populated via <map> but also > allows specifying direct entries like <property > name=3D"attributesMap[key1]"><value>myValue</value></property>. >=20 > "attributesCSV" doesn't make too much sense on a > ViewResolver, as it's really just meant for view > definitions in properties file (read by > ResourceBundleViewResolver). For this reason, I'm > not keen on introducing it on UrlBasedViewResolver. >=20 > Juergen >=20 > > ________________________________ > > Von: > spr...@li... im > Auftrag von Rob Butler > Gesendet: Di 07.12.2004 20:44 > An: spr...@li... > Betreff: Re: [Springframework-user] Velocity Tools > and Spring MVC > > > > Actually, things may not be as clear as I thought. > > > > I understand your argument of allowing > > > Spring-managed placeholders; that's why I > pointed > > > out the "attributes" support. AbstractView's > > > "attributes" and "attributesCSV" are indeed just > > > suitable for String values, but "attributesMap" > > > allows any Object as value: You could define > inner > > > beans of type java.lang.Integer or the like > there, > > > to get values of specific types. The problem of > > > getting special types for map values is not > > > restricted to VelocityView; it's the same for > any > > > other type of Spring-defined bean, so needs a > > > generic solution. > > Ok, I agree with everything above. But here's the > problem. I can add an attribute to a view, but if I > have 30 views in my application, and I want the same > property exposed to all 30 views, I then must define > 30 view beans in my spring config (yuck!). There is > currently no way to set attributes in a view > resolver > so that the attributes are added to all views > created > by that resolver. > > Can you add a setAttributes(Properties prop), > setAttributesMap(Map), and a > setAttributesCSV(String) > method to the > org.springframework.web.servlet.view.UrlBasedViewResolver > class? This would then allow you to add properties > to > the view resolver, so the properties are then > available in all views created by the resolver. > Since > this is a base view resolver, the functionality > would > be available to all other view technologies too, so > it > is a generic solution. > > Thanks. > Rob > > > =20 > __________________________________ > Do you Yahoo!? > Yahoo! Mail - 250MB free storage. Do more. Manage > less. > http://info.mail.yahoo.com/mail_250 > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT > Products from real users. > Discover which products truly live up to the hype. > Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > Springframework-user mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-user > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT > Products from real users. > Discover which products truly live up to the hype. > Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > =20 __________________________________ Do you Yahoo!? All your favorites on one personal page - Try My Yahoo! http://my.yahoo.com ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |