Foren

Faces Portlet with .xhtml and .jsp

Prathamesh Gaddam, geändert vor 11 Jahren.

Faces Portlet with .xhtml and .jsp

New Member Beiträge: 7 Beitrittsdatum: 07.11.11 Neueste Beiträge
Hi,

Using seam framework we worked on rendering *.jsp within facelets using <iframe>. Is it feasible to display/render *.jsp using FacesPortlet / facelets? The requirement is to merge the openxava 4.4 and jsf 2.0 application/projects. The requirement is somewhat similar to link

Any related guidance/clarification will be helpful.

Thank you in advance.

Regards

Environment:
- Liferay 6.0 with Tomcat Bundle
- OpenXava 4.4.1
- Eclipse IDE
thumbnail
David H Nebinger, geändert vor 11 Jahren.

RE: Faces Portlet with .xhtml and .jsp

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
Not sure what you're actually asking for here...

You can create portlets based upon facelets (.xhtml) directly. You could also use JSP for your rendering method.
Prathamesh Gaddam, geändert vor 11 Jahren.

RE: Faces Portlet with .xhtml and .jsp

New Member Beiträge: 7 Beitrittsdatum: 07.11.11 Neueste Beiträge
Let me put our requirement in another words. We need to use *.jsp and *.xhtml rendered through single JSF portlet. Example. Menu is built using JSF component with facelet and on select/click need to load/render either JSF(*.xhtml) or JSP (*.jsp). All these to be shown within single portlet.
thumbnail
Juan Gonzalez P, geändert vor 11 Jahren.

RE: Faces Portlet with .xhtml and .jsp

Liferay Legend Beiträge: 3089 Beitrittsdatum: 28.10.08 Neueste Beiträge
Guess this isn't possible. AFAIK you have to choose between Facelets renderer or JSP per webapp.

Perhaps you can create your own renderer and customize its behaviour....
thumbnail
Neil Griffin, geändert vor 11 Jahren.

RE: Faces Portlet with .xhtml and .jsp

Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
Are your JSPs JSF views or do they simply render an HTML fragment?
Prathamesh Gaddam, geändert vor 11 Jahren.

RE: Faces Portlet with .xhtml and .jsp

New Member Beiträge: 7 Beitrittsdatum: 07.11.11 Neueste Beiträge
The JSPs are towards OpenXava without any JSF stuff.

Say, part of the application is implemented using Openxava portlets and other using JSF( & facelets) within single portlet.
Now we need a common menu/navigation with can invoke Openxava portlets each on community page OR render an view/xhtml in JSF portlet.

Let me know for any further details.
thumbnail
Neil Griffin, geändert vor 11 Jahren.

RE: Faces Portlet with .xhtml and .jsp

Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
If I understand your requirements correctly, then I think the answer is yes. You can try this by putting your OpenXava portlets on a separate/hidden portal page, and using an <iframe> inside your Facelet XHTML view that invokes the portlet with the "exclusive" WindowState, which is a vendor-specific feature of Liferay Portal.

For example:

<iframe src="http://localhost:8080/web/guest/myhiddenportalpage?p_p_id=openxavademo_WAR_myportlet&amp;p_p_lifecycle=0&amp;p_p_state=exclusive&amp;p_p_state_rcv=1&amp;p_p_col_id=column-1&amp;p_p_col_count=1"></iframe>
Prathamesh Gaddam, geändert vor 11 Jahren.

RE: Faces Portlet with .xhtml and .jsp

New Member Beiträge: 7 Beitrittsdatum: 07.11.11 Neueste Beiträge
Thank you, Neil !

Was not aware how to deal with url in liferay. Now it is working with some modifications. The way we used it as:

Template.xhtml

<iframe width="100%" height="400px" src="#{liferay.portalURL.concat('/widget/group/sfc/hidden/-/Addresses_WAR_oneportlet')}"></iframe> &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The url fragments describes as:&lt;br /&gt;&lt;strong&gt;sfc&lt;/strong&gt; - community&lt;br /&gt;&lt;strong&gt;hidden&lt;/strong&gt; - hidden page&lt;br /&gt;&lt;strong&gt;/-/&lt;/strong&gt; - ?&lt;br /&gt;&lt;strong&gt;Addresses_WAR_oneportlet&lt;/strong&gt; - openxava portlet add to hidden page&lt;br /&gt;&lt;br /&gt;Note: &lt;br /&gt;        The url pattern was copied from the &amp;#39;Manage Page&amp;#39;  option from liferay from the snippet/script generated to share the portlet/widget.&lt;br /&gt;        We have merged the folder structure of the OpenXava and Liferay JSF plugins towards development and/or deployment.
thumbnail
Neil Griffin, geändert vor 11 Jahren.

RE: Faces Portlet with .xhtml and .jsp

Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
My pleasure Prathamesh -- thanks for using Liferay.