Fórum

How to Embed JSF Contents in Liferay Dockbar

Mohammed Ibrahim Ali, modificado 11 Anos atrás.

How to Embed JSF Contents in Liferay Dockbar

New Member Postagens: 8 Data de Entrada: 20/05/09 Postagens Recentes
Hello All;
I want to embed jsf prime mega menu in liferay dockbar. I did that by adding the following code to "view.jsp" in docbar folder

<%
String content;
try {
request.setAttribute(WebKeys.RENDER_PORTLET_RESOURCE, Boolean.TRUE);
String queryString = "";

content = com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processPortlet(application, request, response, renderRequest, renderResponse,
"DockMenu_WAR_FABS-Portal", queryString, false);
} finally {
request.removeAttribute(WebKeys.RENDER_PORTLET_RESOURCE);
}

if (pageContext != null) {
pageContext.getOut().print(content);
}
%>


but the menu appears as normal portlet below the dockbar as seen in the attached image


How to to embed this jsf menu in the dock bar normally like "Add" and "Manage" portlets.
My Environment is:
1- Liferay 6.1.
2- Netbeans 7.1.
3- Glassfish 3.1.
4- Primefaces 3.2.
5- JSF 2.0.

Thank You in advance.
thumbnail
David H Nebinger, modificado 11 Anos atrás.

RE: How to Embed JSF Contents in Liferay Dockbar

Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
You will find difficulty putting jsf content into the Liferay dockbar.

Instead, I would just use the magic of CSS to place your rendered content into the dockbar.
Mohammed Ibrahim Ali, modificado 11 Anos atrás.

RE: How to Embed JSF Contents in Liferay Dockbar

New Member Postagens: 8 Data de Entrada: 20/05/09 Postagens Recentes
Thank you David for reply but there are two points:
1- I need to use jsf so the content of the rendered data pass through my application logic, security, custom controls and etc...
2- I do not how to use CSS to achieve all the above.
Thank You.
thumbnail
David H Nebinger, modificado 11 Anos atrás.

RE: How to Embed JSF Contents in Liferay Dockbar

Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
Sounds like you have something to learn then. Research the position attribute of CSS. Your logic still remains your own, you're just using CSS to place the instance somewhere else on the page rather than within your portlet frame.
Mohammed Ibrahim Ali, modificado 11 Anos atrás.

RE: How to Embed JSF Contents in Liferay Dockbar

New Member Postagens: 8 Data de Entrada: 20/05/09 Postagens Recentes
Thank you David, but I did not fully understand, is it possible to place the portlet content in the main page directly without a portlet?emoticon:
Thanks a gain.
thumbnail
David H Nebinger, modificado 11 Anos atrás.

RE: How to Embed JSF Contents in Liferay Dockbar (Resposta)

Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
Dude, it's called absolute positioning of a div...

Within your portlet, you have a div in which all of your jsf and stuff operates.

With absolute positioning, the browser is going to move it somewhere else on the page.

Your code doesn't know that it's been moved, it just works.

You can't be thinking so one-dimensionally....
thumbnail
Neil Griffin, modificado 11 Anos atrás.

moved thread to Liferay Faces forum

Liferay Legend Postagens: 2655 Data de Entrada: 27/07/05 Postagens Recentes
moved thread to Liferay Faces forum