jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric W Hauser <ehau...@indiana.edu>
Subject Plugging in Implicit Objects
Date Wed, 21 Jan 2004 14:15:26 GMT
I've got some portlet projects coming up, and the one thing the bothers me
is that fact that EL expressions in JSPs are not easy to use.  A quick
background of the problem: Each portlet has its own PortletRequest,
PortletSession, and PortletContext objects which are just extensions of
HttpServletRequest, HttpSession, and ServletContext objects.  Accessing 
these objects from a JSP using requires a container specific tag that
makes them available in the page context.  I would like to be able to
access them using EL expressions.

I've been trying to come up with a workaround and came up with a couple of
solutions.  First, I could just define a tag (i.e.
<p:initPortletObjects/>) that would just make the attributes of these
objects available in a Map that is stored in the PageContext.  Then, they
called be accessed by ${pageScope.portletRequest.attribute}.  However, the
downside to doing this is that I would have to run this tag on every page
and it would be creating objects that may not get used.  My other option
was to build my own version of the tag libraries and add these as
implicit objects so that they could be resolved by the expression
evaluator.  

I was thinking that there should be an easier way to accomplish this, but
the spec doesn't define a way to plugin implicit objects.  I'm
sure there would be other instances were this could be useful.  Just
wondering if any had any thoughts/suggestions.

-------------------
Eric Hauser
ehauser@indiana.edu


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org


Mime
View raw message