Re: How to write this elegantly in JSP/EL

2007-06-24 Thread ben short
And your not happ with just using... <%=com.libris4you.books.maintenancepanel.AuthorTabController.DATA_PHOTO_WIDTH%> On 6/24/07, Hassan Schroeder <[EMAIL PROTECTED]> wrote: On 6/23/07, Nikola Milutinovic <[EMAIL PROTECTED]> wrote: > The answer is simple, "imageUrl" is calculated in the contr

Re: How to write this elegantly in JSP/EL

2007-06-23 Thread Hassan Schroeder
On 6/23/07, Nikola Milutinovic <[EMAIL PROTECTED]> wrote: The answer is simple, "imageUrl" is calculated in the controller/servlet for each request. "com.libris4youDATA_PHOTO_HEIGHT" is a constant embedded in the Java code, where it belongs. And, here is another one: in your example "DATA_

Re: How to write this elegantly in JSP/EL

2007-06-23 Thread Nikola Milutinovic
> Also you talk about the DATA_PHOTO_HEIGHT and DATA_PHOTO_WIDTH > properties being static propertys of the AuthorController class. Why > not create a Constant object called PHOTO or something. make the > height and width proper static on that, then pass that into the model. > Then you can use the

Re: How to write this elegantly in JSP/EL

2007-06-23 Thread Nikola Milutinovic
> > > " width=" > > value="${DATA_PHOTO_WIDTH}"/>" /> > > > > (sigh) I feared as much. It is just that I hate JSTL tags inside another > > tag's attributes. > > Why would you use `src="${imageUrl}"` and then use the clumsy > 'c:out' form? What's wrong with `height="${DATA_PHOTO_HEIGHT}"`? The an

Re: How to write this elegantly in JSP/EL

2007-06-22 Thread ben short
Well you learn something new everyday, I wasn't aware that ${X} worked like Which doesn't seem that bad to me. With your spring setup you could also create an HandlerInterceptor [1] and add it to your url mapping, that adds the PHOTO object to the model after the controller has process the requ

Re: How to write this elegantly in JSP/EL

2007-06-22 Thread Hassan Schroeder
On 6/22/07, Nikola Milutinovic <[EMAIL PROTECTED]> wrote: > " width=" value="${DATA_PHOTO_WIDTH}"/>" /> (sigh) I feared as much. It is just that I hate JSTL tags inside another tag's attributes. Why would you use `src="${imageUrl}"` and then use the clumsy 'c:out' form? What's wrong with `he

Re: How to write this elegantly in JSP/EL

2007-06-22 Thread Nikola Milutinovic
Thank you all who responded. > I think the following should do you > > " width=" value="${DATA_PHOTO_WIDTH}"/>" /> (sigh) I feared as much. It is just that I hate JSTL tags inside another tag's attributes. > On 6/22/07, Johnny Kewl <[EMAIL PROTECTED]> wrote: > > > > Hi Nikola, never done it, bu

Re: How to write this elegantly in JSP/EL

2007-06-22 Thread ben short
t;Nikola Milutinovic" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Friday, June 22, 2007 10:46 AM Subject: How to write this elegantly in JSP/EL > Hi all. > > This is not really TC related, but more JSP and EL question, but I thought > I'd ask. > > I wo

Re: How to write this elegantly in JSP/EL

2007-06-22 Thread Johnny Kewl
relevent code in spring, and steal it ;) http://today.java.net/pub/a/today/2006/03/07/unified-jsp-jsf-expression-language.html - Original Message - From: "Nikola Milutinovic" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Friday, June 22, 2007 10:46 AM

Re: How to write this elegantly in JSP/EL

2007-06-22 Thread Rashmi Rubdi
On 6/22/07, Nikola Milutinovic <[EMAIL PROTECTED]> wrote: Hi all. This is not really TC related, but more JSP and EL question, but I thought I'd ask. I ask JSP, EL and JSTL questions here http://jakarta.apache.org/taglibs/ or http://forum.java.sun.com/forum.jspa?forumID=45 ---

How to write this elegantly in JSP/EL

2007-06-22 Thread Nikola Milutinovic
Hi all. This is not really TC related, but more JSP and EL question, but I thought I'd ask. I would like to have an elegant way of using constants from Java classes in EL. This is a relatively good illustration of what I am talking about. Take, for instance, a Spring controller. It has a metho