This content has been marked as final.
Show 3 replies
-
1. Re: Need a portlet that display
theute May 7, 2008 5:16 AM (in response to sky2rain)Did you even read the portlet spec ?
-
2. Re: Need a portlet that display
pmn92 May 7, 2008 9:23 AM (in response to sky2rain)In your jsp layout you can use the following :
<div id='dashboardnav'> <p:region regionName='dashboardnav' regionID='dashboardnav'/> </div>
But this generates an html/ javascript error.
In addition, this is undocumented. It it adds a few things related to the dashboard thing. A similar thing is used for the navigation tabs.
You can write a portlet with no decoration (empty renderers) to produce the DIVs you need and use CSS styles to place it on the page.
To write your own portlet you can start with examples. -
3. Re: Need a portlet that display
je.a.le May 13, 2008 11:08 AM (in response to sky2rain)"sky2rain" wrote:
Someone please help tell how to write a simple portlet that shows "loged in as : username"; we are frustrated by the lack of docs. Please simply point out which packages are needed to import in order to do this and we can handle the rest. Thanks a million!!
the answer is actually in the doc...
http://docs.jboss.com/jbportal/v2.2/javadoc/javax/portlet/PortletRequest.html#getRemoteUser()
which could translate into :public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException { //..... String login = request.getremoteUser(); request.setAttribute("login", login ); ..... }
and use el into your jsp ${login}
If null : not yet logged.
If you need more information than login, you should call mbean ; there're posts in the forum archives.