Author: thomas.heute(a)jboss.com
Date: 2008-06-27 06:42:24 -0400 (Fri, 27 Jun 2008)
New Revision: 11166
Modified:
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFUserContext.java
Log:
- Requires Principal scope attributes
Modified:
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFUserContext.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFUserContext.java 2008-06-27
00:39:53 UTC (rev 11165)
+++
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFUserContext.java 2008-06-27
10:42:24 UTC (rev 11166)
@@ -28,7 +28,8 @@
import javax.faces.context.FacesContext;
-import org.jboss.portal.common.NotYetImplemented;
+import org.jboss.portal.common.invocation.AttributeResolver;
+import org.jboss.portal.common.invocation.resolver.PrincipalAttributeResolver;
import org.jboss.portal.common.util.Tools;
import org.jboss.portal.portlet.spi.UserContext;
@@ -42,9 +43,12 @@
/** . */
private final FacesContext faces;
- public JSFUserContext(FacesContext faces)
+ private AttributeResolver principalAttributeResolver;
+
+ public JSFUserContext(JSFServerContext ctx, FacesContext faces)
{
this.faces = faces;
+ this.principalAttributeResolver = new
PrincipalAttributeResolver(ctx.getClientRequest());
}
public String getId()
@@ -69,12 +73,12 @@
public Object getAttribute(String arg0)
{
- throw new NotYetImplemented();
+ return principalAttributeResolver.getAttribute(arg0);
}
public void setAttribute(String arg0, Object arg1)
{
- throw new NotYetImplemented();
+ principalAttributeResolver.setAttribute(arg0, arg1);
}
}
Show replies by date