Foren

How to Embed JSF Contents in Liferay Dockbar

Mohammed Ibrahim Ali, geändert vor 11 Jahren.

How to Embed JSF Contents in Liferay Dockbar

New Member Beiträge: 8 Beitrittsdatum: 20.05.09 Neueste Beiträge
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, geändert vor 11 Jahren.

RE: How to Embed JSF Contents in Liferay Dockbar

Liferay Legend Beiträge: 14914 Beitrittsdatum: 02.09.06 Neueste Beiträge
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, geändert vor 11 Jahren.

RE: How to Embed JSF Contents in Liferay Dockbar

New Member Beiträge: 8 Beitrittsdatum: 20.05.09 Neueste Beiträge
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, geändert vor 11 Jahren.

RE: How to Embed JSF Contents in Liferay Dockbar

Liferay Legend Beiträge: 14914 Beitrittsdatum: 02.09.06 Neueste Beiträge
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, geändert vor 11 Jahren.

RE: How to Embed JSF Contents in Liferay Dockbar

New Member Beiträge: 8 Beitrittsdatum: 20.05.09 Neueste Beiträge
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, geändert vor 11 Jahren.

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

Liferay Legend Beiträge: 14914 Beitrittsdatum: 02.09.06 Neueste Beiträge
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, geändert vor 11 Jahren.

moved thread to Liferay Faces forum

Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
moved thread to Liferay Faces forum