On Thu, 02 Dec 2004 10:45:52 -0800, David Sean Taylor
<[EMAIL PROTECTED]> wrote:
> Craig McClanahan wrote:
>
>
>
> > David,
> >
> > The problem here is that page scope is not visible to JSF expressions
> > ... only request, session, and application are visible. The reason
> > for this is that JSF expressions can be evaluated programmatically, in
> > contexts where there is no JSP page, so there would be no way to
> > access a PageContext.
> >
> > Can <portlet:defineObjects> put things in other scopes instead? If
> > not, that's a suggestion you might want to take back to the portlet
> > spec expert group.
> >
>
> We are using the Pluto portlet tag lib, so yes, being a committer there,
> I can change it:
>
> public int doStartTag() throws JspException
> ....
> pageContext.setAttribute("renderResponse",
> renderResponse,
> PageContext.PAGE_SCOPE);
>
> Although the spec clearly states it should be on page scope, I guess it
> wouldn't hurt to be on request scope.
>
Unfortunately, there would be a very definite harm to doing this ...
applications depending on it would work in Pluto and fail in every
other JSR-168 compatible container :-(.
Craig
> One of my collegues (Stephan Hesmer) just tried this and tells me it
> also fails. Are we still misinterpreting something here:
>
>
>
> <%@ page session="false" %>
> <%@ page import="javax.portlet.*"%>
> <%@ page import="java.util.*"%>
> <%@ taglib uri='http://java.sun.com/portlet' prefix='portlet' %>
> <%@ taglib uri="http://java.sun.com/jstl/core" prefix='c' %>
> <%@ taglib uri='http://java.sun.com/jsf/html' prefix='h' %>
> <%@ taglib uri='http://java.sun.com/jsf/core' prefix='f' %>
> <portlet:defineObjects/>
> <%
> request.setAttribute("renderRequest",request.getAttribute("javax.portlet.request"));
> <<<<<< "javax.portlet.request" defined by the
> Portlet Spec
> %>
> <f:view>
> renderRequest#1: <h:outputText
> value='#{requestScope.renderRequest.portletMode}'/><br>
> renderRequest#2: <h:outputText
> value='#{renderRequest.portletMode}'/><br>
> javax.request.request: <h:outputText
> value='#{javax.portlet.request.portletMode}'/><br>
> JSTL: <c:out value="${renderRequest.portletMode}"/><br>
> </f:view>
>
> --
> David Sean Taylor
> Bluesunrise Software
> [EMAIL PROTECTED]
> [office] +01 707 773 4646
> [mobile] +01 707 529 9194
>