struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffrey Bonevich <bonev...@telocity.com>
Subject Re: Tab Libraries? Bah!
Date Thu, 25 Apr 2002 00:29:51 GMT


Joseph Barefoot wrote:

>>Hm.  Seems to me that if you have done your configration correctly and
>>published the content that is available to the designer, they should
>>have no problem using URL-bases from your configuration content.  Maybe
>>I have jsut made it too easy on myself and the designers I have worked
>>with in the past.
>>
> 
> I believe we are talking about two different things here; I mean the kind of
> URL re-writing that attaches the sessionID in the event that the client
> browser has cookies disabled.  Nice of you to keep your designers in mind
> while architecting a site though--I think way too many programmers look at
> designers with disdain ("You can't write/read code?  Oh, the horror! ).


Yes, I was missing that point.  However, I can still accomplish this 
very easily:
<a href="{{config.requestURL}}/mypagehandler{{session.urlId}}">link</a>

Here config and session are objects (in this case a HashMap and an 
HttpSession), upon which a key or method call is made to provide the 
data.  In the case of session, our engine resolves "urlId" to one of 
three possibilities: (1) a map key (session.get("urlId")), (2) a getter 
method (so session.getUrlId()), or (3) an actual method call (so 
session.urlId()).  We also account for object adapters to direct the 
dynamic resoltion of the data; so the developer can provide an 
HttpSessionAdapter with an urlId method calling the actual 
session.getValue("urlId"), etc.  So, yes, maybe in this case the 
designer does need to remember to stick the {{session.urlId}} on the end 
of hrefs.

I suppose in JSP it could be comparable (but much less readable, with 
lots of context lookups and <%= ...%>).


> 
> 
>>Tag libraries are a good start, but JSP
>>is just HTML-in-your-servlets writ backward.  There was little attempt
>>to actually come up with something useful and interesting.
>>
> 
> Aha!  Something we can definitely agree upon!  :):)
> 
> 
> cheerful regards,
> Joe Barefoot
> 
> 
> 
> 


-- 
Jeffrey Bonevich
Ann Arbor, Michigan
bonevich@telocity.com
http://www.bonevich.com

Hwæt! Wë Gär-Dena   in geär-dagum,
peod-cyninga,       prym gefrünon,
hü ða aepelingas   ellen fremedon!


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message