フォーラム

ホーム » Liferay Faces » Liferay Faces - English

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Mohammed Ibrahim Ali
How to Embed JSF Contents in Liferay Dockbar
2012/05/03 7:20
答え

Mohammed Ibrahim Ali

ランク: New Member

投稿: 8

参加年月日: 2009/05/20

最近の投稿

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
2012/05/03 7:38
答え

David H Nebinger

ランク: Liferay Legend

投稿: 7252

参加年月日: 2006/09/01

最近の投稿

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
2012/05/06 0:56
答え

Mohammed Ibrahim Ali

ランク: New Member

投稿: 8

参加年月日: 2009/05/20

最近の投稿

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
2012/05/06 8:36
答え

David H Nebinger

ランク: Liferay Legend

投稿: 7252

参加年月日: 2006/09/01

最近の投稿

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
2012/05/07 1:34
答え

Mohammed Ibrahim Ali

ランク: New Member

投稿: 8

参加年月日: 2009/05/20

最近の投稿

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
2012/05/07 5:38
答え

David H Nebinger

ランク: Liferay Legend

投稿: 7252

参加年月日: 2006/09/01

最近の投稿

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