掲示板

How to Embed JSF Contents in Liferay Dockbar

11年前 に Mohammed Ibrahim Ali によって更新されました。

How to Embed JSF Contents in Liferay Dockbar

New Member 投稿: 8 参加年月日: 09/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

<%
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
11年前 に David H Nebinger によって更新されました。

RE: How to Embed JSF Contents in Liferay Dockbar

Liferay Legend 投稿: 14914 参加年月日: 06/09/02 最新の投稿
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.
11年前 に Mohammed Ibrahim Ali によって更新されました。

RE: How to Embed JSF Contents in Liferay Dockbar

New Member 投稿: 8 参加年月日: 09/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.
thumbnail
11年前 に David H Nebinger によって更新されました。

RE: How to Embed JSF Contents in Liferay Dockbar

Liferay Legend 投稿: 14914 参加年月日: 06/09/02 最新の投稿
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.
11年前 に Mohammed Ibrahim Ali によって更新されました。

RE: How to Embed JSF Contents in Liferay Dockbar

New Member 投稿: 8 参加年月日: 09/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.
thumbnail
11年前 に David H Nebinger によって更新されました。

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

Liferay Legend 投稿: 14914 参加年月日: 06/09/02 最新の投稿
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
11年前 に Neil Griffin によって更新されました。

moved thread to Liferay Faces forum

Liferay Legend 投稿: 2655 参加年月日: 05/07/27 最新の投稿
moved thread to Liferay Faces forum