Liferay is a Gartner Magic Quadrant Leader for the Sixth Year! Find out why

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Jan Bub
permissionsURL
June 25, 2012 5:45 AM
Answer

Jan Bub

Rank: Junior Member

Posts: 78

Join Date: March 2, 2011

Recent Posts

Hi,

I need to have the ability to edit the Permsssion of objects by the users. Therefor I was happy to the Life liferay-security:permissionsURL tag. I only can genreate a textlink with that but I want to use the url inside a button, Is it possible to use a button or image instead of the Text?
Neil Griffin
RE: permissionsURL
June 25, 2012 7:42 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2291

Join Date: July 26, 2005

Recent Posts

Currently the liferay-security:permissionsURL JSF component only supports generating an anchor hyperlink. In order to get the URL though, you could try something like this in a JSF managed-bean:

1FacesContext facesContext = FacesContext.getCurrentInstance();
2String family = "com.liferay.faces.portal.PermissionsURL";
3String rendererType = "com.liferay.faces.portal.PermissionsURLRenderer";
4PermissionsURLRenderer permissionsURLRenderer = (PermissionsURLRenderer) facesContext.getRenderKit().getRenderer(family, rendererType);
5PermissionsURL permissionsURLComponent = new PermissionsURL();
6permissionsURLComponent.setRedirect("http://..."); // put your redirect url here
7permissionsURLComponent.setModelResource("com.liferay.portal.model.User"); // example model-resource FQCN
8String permissionsURL = permissionsURLRenderer.getPermissionsURL(facesContext, permissionsURLComponent);
Jan Bub
RE: permissionsURL
June 25, 2012 8:01 AM
Answer

Jan Bub

Rank: Junior Member

Posts: 78

Join Date: March 2, 2011

Recent Posts

It works. emoticon
Neil Griffin
RE: permissionsURL
June 25, 2012 8:17 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2291

Join Date: July 26, 2005

Recent Posts

Glad to hear it. emoticon
Jan Bub
RE: permissionsURL
June 27, 2012 4:30 AM
Answer

Jan Bub

Rank: Junior Member

Posts: 78

Join Date: March 2, 2011

Recent Posts

With the code above it is possible to load the "Permission Editor Site" for the entity.

I noticed that there is a difference beetween the LiferayFaces RC1 and the RC2-Snapshot because of the URLRendering. To using this code inside an action (e.g. with commandButton) it is nessesary to have the RC2-SANPshot otherwise a ClassCastException is thrown. (More details)


I still have a little problem. After loading the site for editing the permission and than using the "back to page" link I got a ViewExpiredException if I try to do something.
If I safe the permissions before going back there is no problem.The go back links are diffrent.

Before Saving
http://localhost:8080/web/guest/ebook-management?p_p_id=86&p_p_lifecycle=0&p_p_state=normal&p_p_state_rcv=1&_86_modelResource=Book&_86_portletResource=ebookmanagement_WAR_ebookmanagementportlet&_86_struts_action=%2Fportlet_configuration%2Fedit_permissions&_86_resourcePrimKey=1302

after Saving

http://localhost:8080/web/guest/ebook-management?p_p_id=86&p_p_lifecycle=0&p_p_state=normal&p_p_state_rcv=1
Neil Griffin
RE: permissionsURL
June 27, 2012 6:49 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2291

Join Date: July 26, 2005

Recent Posts

When you get a chance, please paste the stacktrace for the ViewExpiredException. Thx.
Jan Bub
RE: permissionsURL
June 27, 2012 8:30 AM
Answer

Jan Bub

Rank: Junior Member

Posts: 78

Join Date: March 2, 2011

Recent Posts

Here it is:
  115:29:55,296 ERROR [ExceptionHandlerAjaxImpl:57] viewId:/html/booksManagement/mainView.xhtml - Ansicht /html/booksManagement/mainView.xhtml konnte nicht wiederhergestellt werden.
  2javax.faces.application.ViewExpiredException: viewId:/html/booksManagement/mainView.xhtml - Ansicht /html/booksManagement/mainView.xhtml konnte nicht wiederhergestellt werden.
  3    at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:205)
  4    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
  5    at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116)
  6    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
  7    at com.liferay.faces.bridge.lifecycle.LifecycleWrapper.execute(LifecycleWrapper.java:35)
  8    at com.liferay.faces.bridge.BridgePhaseResourceImpl.execute(BridgePhaseResourceImpl.java:111)
  9    at com.liferay.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:106)
 10    at javax.portlet.faces.GenericFacesPortlet.doBridgeDispatch(GenericFacesPortlet.java:700)
 11    at javax.portlet.faces.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:291)
 12    at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:118)
 13    at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:71)
 14    at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:93)
 15    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 16    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
 17    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 18    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
 19    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
 20    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
 21    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 22    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
 23    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
 24    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
 25    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
 26    at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:634)
 27    at com.liferay.portlet.InvokerPortletImpl.invokeResource(InvokerPortletImpl.java:746)
 28    at com.liferay.portlet.InvokerPortletImpl.serveResource(InvokerPortletImpl.java:503)
 29    at com.liferay.portal.action.LayoutAction.processPortletRequest(LayoutAction.java:941)
 30    at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:664)
 31    at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:244)
 32    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
 33    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
 34    at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:174)
 35    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
 36    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
 37    at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
 38    at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:533)
 39    at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:510)
 40    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 41    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
 42    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 43    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
 44    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
 45    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
 46    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
 47    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
 48    at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:201)
 49    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
 50    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
 51    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
 52    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
 53    at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:240)
 54    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
 55    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
 56    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
 57    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
 58    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
 59    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 60    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
 61    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
 62    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
 63    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
 64    at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:135)
 65    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 66    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
 67    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 68    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
 69    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
 70    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
 71    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
 72    at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:123)
 73    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
 74    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
 75    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
 76    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
 77    at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:201)
 78    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
 79    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
 80    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
 81    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
 82    at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:241)
 83    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
 84    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
 85    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
 86    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
 87    at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:55)
 88    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
 89    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
 90    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
 91    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
 92    at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:240)
 93    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
 94    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
 95    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
 96    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
 97    at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83)
 98    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
 99    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
100    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
101    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
102    at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:80)
103    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
104    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
105    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
106    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
107    at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:208)
108    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
109    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
110    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
111    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184)
112    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
113    at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
114    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
115    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
116    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164)
117    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
118    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164)
119    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
120    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184)
121    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
122    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
123    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
124    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
125    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
126    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
127    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
128    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
129    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
130    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
131    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
132    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
133    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
134    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
135    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300)
136    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
137    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
138    at java.lang.Thread.run(Thread.java:662)
Neil Griffin
RE: permissionsURL
June 27, 2012 8:53 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2291

Join Date: July 26, 2005

Recent Posts

I realize that you are not using the liferay-security:permissionsURL component tag directly for your use-case, but can you try the following in your Facelet view and let me know what happens? I just tried it and it worked.

1<liferay-security:permissionsURL
2        modelResource="com.liferay.portal.model.User"
3        modelResourceDescription="Current User"
4        resourcePrimKey="#{liferay.user.userId}">
5    <h:outputText value="Permissions" />
6</liferay-security:permissionsURL>
Jan Bub
RE: permissionsURL
June 29, 2012 1:36 AM
Answer

Jan Bub

Rank: Junior Member

Posts: 78

Join Date: March 2, 2011

Recent Posts

I've got the same problem. emoticon
Neil Griffin
RE: permissionsURL
June 29, 2012 3:46 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2291

Join Date: July 26, 2005

Recent Posts

What component suite are you using? ICEfaces/PrimeFaces/RichFaces?

The <liferay-security:permissionsURL ... /> example I pasted above works fine with a plain JSF2 portlet.
Jan Bub
RE: permissionsURL
June 29, 2012 7:00 AM
Answer

Jan Bub

Rank: Junior Member

Posts: 78

Join Date: March 2, 2011

Recent Posts

I use it with a lot of primefaces components.
Neil Griffin
RE: permissionsURL
June 29, 2012 7:22 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2291

Join Date: July 26, 2005

Recent Posts

Are you using p:commandButton in order to invoke the hyperlink that shows the Permissions UI?
Jan Bub
RE: permissionsURL
July 3, 2012 6:37 AM
Answer

Jan Bub

Rank: Junior Member

Posts: 78

Join Date: March 2, 2011

Recent Posts

Hey Neil,
I'v just use the permissionURL-Tag to genrate the link but I use it in a p:dateTable and in there are other p:commandButtons in it. The link to get the permissionView is just the following.
1
2<liferay-security:permissionsURL
3                        modelResource="Book"
4                        modelResourceDescription="Book"
5                        resourcePrimKey="#{book.bookId}">
6                        <h:outputText value="TEST"></h:outputText>
7                        
8</liferay-security:permissionsURL>


A picture can say more than words.
Attachment

Attachments: table.png (27.0k)
Neil Griffin
RE: permissionsURL
July 3, 2012 7:19 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2291

Join Date: July 26, 2005

Recent Posts

Hi Jan,

Thanks for the picture! It was very helpful. Can you paste the URL of the TEST link, and also the URL of the "Go Back" link that is causing the problem?

Thanks,

Neil
Jan Bub
RE: permissionsURL
July 6, 2012 12:16 AM
Answer

Jan Bub

Rank: Junior Member

Posts: 78

Join Date: March 2, 2011

Recent Posts

Here they are.

TESTLink:
http://localhost:8080/web/guest/ebook-management?p_p_id=86&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&p_p_col_id=column-2&p_p_col_count=1&_86_struts_action=%2Fportlet_configuration%2Fedit_permissions&_86_portletResource=ebookmanagement_WAR_ebookmanagementportlet&_86_modelResource=Book&_86_modelResourceDescription=Book&_86_resourcePrimKey=1501

Go Back Link:
http://localhost:8080/web/guest/ebook-management?p_p_id=86&p_p_lifecycle=0&p_p_state=normal&p_p_state_rcv=1&_86_modelResource=Book&_86_portletResource=ebookmanagement_WAR_ebookmanagementportlet&_86_modelResourceDescription=Book&_86_struts_action=%2Fportlet_configuration%2Fedit_permissions&_86_resourcePrimKey=1501
Neil Griffin
RE: permissionsURL
July 6, 2012 8:46 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2291

Join Date: July 26, 2005

Recent Posts

OK I reproduced the problem and I think I have an answer for you.

Try adding a "redirect" attribute to your liferay-security:permissionsURL tag, like this:

 1[b]<portlet:renderURL var="currentPageRenderURL" />[/b]
 2<liferay-security:permissionsURL
 3                        modelResource="Book"
 4                        modelResourceDescription="Book"
 5                        [b]redirect="#{currentPageRenderURL}"[/b]
 6                        resourcePrimKey="#{book.bookId}">
 7                        <h:outputText value="TEST"></h:outputText>
 8                        
 9</liferay-security:permissionsURL>


You will also need to add the following namespace at the top of your Facelet view:

1[b]xmlns:portlet="http://java.sun.com/portlet_2_0"[/b]
Jan Bub
RE: permissionsURL
July 6, 2012 11:05 AM
Answer

Jan Bub

Rank: Junior Member

Posts: 78

Join Date: March 2, 2011

Recent Posts

Neil, your support is invaluable. I will test it after the weekend and let you know abaout the results.
Neil Griffin
RE: permissionsURL
July 6, 2012 11:11 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2291

Join Date: July 26, 2005

Recent Posts

My pleasure Jan, enjoy the weekend! Love to know how it works out when you get a chance to try it.
Jan Bub
RE: permissionsURL
July 16, 2012 1:49 AM
Answer

Jan Bub

Rank: Junior Member

Posts: 78

Join Date: March 2, 2011

Recent Posts

It's working fine. Thank you again.
Christophe Noel
RE: permissionsURL
January 15, 2015 2:48 AM
Answer

Christophe Noel

Rank: Regular Member

Posts: 100

Join Date: September 28, 2012

Recent Posts

Hello,

Just to report that in FAces 3.2.4-ga5 the renderer is now : com.liferay.faces.portal.renderkit.PermissionsURLRenderer