|
From: Ken K. <kk...@kk...> - 2003-07-12 16:28:19
|
Eliminating repetitive code in the jsp's is something I'd very much like
to see. Alef: thanks for your contribution, it looks like it will help.
I've been in the process lately of refactoring Petclinic's Clinic
implementation along with code tightening and documentation improvements
and am just about ready to commit the changes. I WILL commit these
changes sometime later today. A couple of jsp's have minor changes.
Alef: If you would like to make the changes to the jsp's, please go
ahead. If not, I'll do it. Please let me know if you will be doing it.
Regards,
Ken
jürgen höller [werk3AT] wrote:
>I've introduced support for EL on tag attributes yesterday, already committed. Thanks for the idea and the prototype, Alef! I hope you are satisfied with the integration. You're very welcome to try it out :-)
>
>There's a new ExpressionEvaluationsUtils class now in com.interface21.web.util, taking a String argument value and parsing it to Object, String, int, or boolean. It will just attempt EL evaluation if the value starts with "${", else it will simply parse the value with standard means.
>
>All of Spring's tags use this class now for all attributes, simply delegating to the respective ExpressionEvaluationsUtils method in each setter. This means that all attributes still accept normal String values as before (like <i21:bind path="person.name">), but also EL expressions (like <i21:bind path="${bindPath}">).
>
>For EL evaluation, ExpressionEvaluationsUtils depends on Jakarta's JSTL implementation (standard.jar). It doesn't have a runtime dependency if just parsing normal String values though, as it delegates EL evaluation to an inner class that will just get loaded in case of actual EL expressions. So you'll just need the Jakarta JSTL implementation in your classpath if you actually use EL attribute values on tags.
>
>BTW, our AopProxy uses a similar mechanism to avoid a runtime dependency on CGLIB. If just proxying interfaces, it will use standard J2SE proxies. Only if you try to proxy a class itself, it will invoke CGLIB by delegating to a respective inner class.
>
>Finally, we should adapt PetClinic to use EL expressions on its bind tags. Alef has already shown the way in the prototype that he sent. Ken, what do you think? Would you like Alef to do this?
>
>Juergen
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: jürgen höller [werk3AT]
> Gesendet: Fr 11.07.2003 08:13
> An: al...@jt...; spr...@li...
> Cc:
> Betreff: Re: [Springframework-developer] Tags using expression language??
>
>
>
> Alef,
>
> I've just browsed your code - this looks very interesting! It makes iterating such repetitive form fields like in the petclinic much easier. I'll have a look at the implementation details, and if everything works out I'll add a clean room version to the main source tree promptly.
>
> I wonder if we could make that work with any JSTL implementation, not just the Jakarta one, although I wouldn't mind a dependency on the latter for this feature.
>
> Cool stuff :-)
>
> Juergen
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Alef Arendsen [mailto:al...@jt...]
> Gesendet: Di 08.07.2003 19:43
> An: jürgen höller [werk3AT]; spr...@li...
> Cc:
> Betreff: RE: [Springframework-developer] Tags using expression language??
>
>
>
> Ok, here we go...
>
> Like you said, at first glance, it does not look like the i21:bind tag
> needs expressionalization (hmmm, nice huh ;-). However, in the petclinic
> demo app I'm seeing a lot of input.jsps in the jsp/fields directory.
> These are things I'm hoping to solve using for instance EL-based tags...
> Attached you'll find a reworked version of the ownerForm. It does not
> use the JSPs from the fields directory anymore, but uses only one
> input.jsp that uses the bindstatus object to create the input field.
>
> Ok, it's still all rough and reworking the tags is a little bit more
> work than the 15 minutes I spent on it now, but maybe you're getting the
> idea.
>
> Consequences for adding / reworking the tags:
>
> 1. dependency on jakarta-jstl-1.0.3 (jakarta.apache.org/taglib -->
> standard).
> 2. dependency on jstl-1.0.3 (java.sun.com)
> 3. In case you want to have both version in there, an extending class
> for each tag
> 4. For each tag, a BeanInfo class
> 5. I wasn't able to use the EvalHelper from jakarta, so I copied it
> (hmmm... not so nice, is it ;-)
>
> Probably I don't have time this week or something to refactor them to be
> all EL-based... Just let me know if you'd like it.
>
> Well, that's it for now, still discovering really cool features and
> already running out (brain)memory to think up everything I could do with
> Spring ;-)
>
> Cheers,
>
> Alef
>
>
> NHS^隊[){([jJ뢺kyƮ^اj+x:0Zuڕg*)jw`z֟盢0
> Z(~(W(}iT)~{
> +ׯzZ)zXX*kxuޖ^X(~zwilqzlX)ߣ))~{
> +ׯzZ)
>
>?????????????????????????????????????????ӆ+?^?隊[)?{(??[??ڭ?(~?+??鮊Y?ڦ??j?h??^??-?x?????:0?Zw?jU?l????݁?Z~??n?$?0???j???(???W???(}?i?_???????????????????????????????????*k?x?????ׯzZ)z???X??X??*k?x?????ׯzZ)z???l??.?ǟ???w???i????+-??(??~??{??b????+-?w???k?x?????ׯzZ)
>
>
>
>
|