Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Mohammed Ibrahim Ali
How to Embed JSF Contents in Liferay Dockbar
3. Mai 2012 07:20
Antwort

Mohammed Ibrahim Ali

Rang: New Member

Nachrichten: 8

Eintrittsdatum: 20. Mai 2009

Neue 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
 1
 2<%
 3String content;
 4try {
 5request.setAttribute(WebKeys.RENDER_PORTLET_RESOURCE, Boolean.TRUE);
 6String queryString = "";
 7
 8content = com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processPortlet(application, request, response, renderRequest, renderResponse,
 9"DockMenu_WAR_FABS-Portal", queryString, false);
10} finally {
11request.removeAttribute(WebKeys.RENDER_PORTLET_RESOURCE);
12}
13
14if (pageContext != null) {
15pageContext.getOut().print(content);
16}
17%>


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.
David H Nebinger
RE: How to Embed JSF Contents in Liferay Dockbar
3. Mai 2012 07:38
Antwort

David H Nebinger

Community Moderator

Rang: Liferay Legend

Nachrichten: 11793

Eintrittsdatum: 1. September 2006

Neue 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
RE: How to Embed JSF Contents in Liferay Dockbar
6. Mai 2012 00:56
Antwort

Mohammed Ibrahim Ali

Rang: New Member

Nachrichten: 8

Eintrittsdatum: 20. Mai 2009

Neue 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.
David H Nebinger
RE: How to Embed JSF Contents in Liferay Dockbar
6. Mai 2012 08:36
Antwort

David H Nebinger

Community Moderator

Rang: Liferay Legend

Nachrichten: 11793

Eintrittsdatum: 1. September 2006

Neue 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
RE: How to Embed JSF Contents in Liferay Dockbar
7. Mai 2012 01:34
Antwort

Mohammed Ibrahim Ali

Rang: New Member

Nachrichten: 8

Eintrittsdatum: 20. Mai 2009

Neue 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.
David H Nebinger
RE: How to Embed JSF Contents in Liferay Dockbar
7. Mai 2012 05:38
Antwort

David H Nebinger

Community Moderator

Rang: Liferay Legend

Nachrichten: 11793

Eintrittsdatum: 1. September 2006

Neue 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....