Tuesday, May 22, 2007

Pluto and creation of UserInfo Map

Pluto throws a NullPointerException if there is an attribute defined in your portlet.xml that it does not recognize. Happened to me because I generally have the non-standard attribute "user.name" which is the way to get a GridSphere user's username (as opposed to PortletRequest.getRemoteUser()).

3 comments:

Unknown said...

Your posts seem to indicate that you have facelets working in a portlet. I have tried that but find that all of my literal text gets duplicated on a render request when another portlet in the portal has activity. It would be in interested in how you got JSF/Facelet portlets to work.

Marcus Christie said...

First off, my libraries are MyFaces 1.1.4 (using MyFacesGenericPortlet), Facelets 1.1.11, portal frameworks are GridSphere 2.1.5 and Pluto 1.1.x. Not doing much special besides. I just put a ui:composition tag around the content of the portlet and Facelets nicely extracts that chunk for the mark up. I wouldn't mind taking a look at what you have if you have your code posted somewhere, but I have to say I've never experienced what you are describing.

Unknown said...

I am using JSF RI 1.2, facelets 1.1.12 (I tried 1.1.11 as well), Pluto, and the jsf-porlet bridge from java.net.
For the really simple facelet below, the word View appears in the portlet initially. If I select another portlet, the subsequent render request on my portlet will can View View to be displayed.
(I removed the brackets from the xhtml so that I could post it)
div xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
ui:composition
View
/ui:composition
/div