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.

Craig McClanahan


On Thu, 02 Dec 2004 08:58:33 -0800, David Sean Taylor
<[EMAIL PROTECTED]> wrote:
> Im trying to write a portlet with MyFaces
> 
> The portlet api's <portlet:defineObjects> defines the page context
> variable 'renderRequest' shown below.
> 
> Using ${renderRequest.porletMode} works fine.
> However '#{renderRequest.portletMode} fails
> 
> Is this a bug or am I making a wrong assumption 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/>
> <f:view>
>      <h:outputText value='#{renderRequest.portletMode}'/><br>   <-- FAILS
>      <c:out value="${renderRequest.portletMode}"/>           <-- SUCCEEDS
> </f:view>
>

Reply via email to