Forums de discussion

Faces Portlet with .xhtml and .jsp

Prathamesh Gaddam, modifié il y a 11 années.

Faces Portlet with .xhtml and .jsp

New Member Publications: 7 Date d'inscription: 07/11/11 Publications récentes
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, modifié il y a 11 années.

RE: Faces Portlet with .xhtml and .jsp

Liferay Legend Publications: 14919 Date d'inscription: 02/09/06 Publications récentes
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, modifié il y a 11 années.

RE: Faces Portlet with .xhtml and .jsp

New Member Publications: 7 Date d'inscription: 07/11/11 Publications récentes
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, modifié il y a 11 années.

RE: Faces Portlet with .xhtml and .jsp

Liferay Legend Publications: 3089 Date d'inscription: 28/10/08 Publications récentes
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, modifié il y a 11 années.

RE: Faces Portlet with .xhtml and .jsp

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
Are your JSPs JSF views or do they simply render an HTML fragment?
Prathamesh Gaddam, modifié il y a 11 années.

RE: Faces Portlet with .xhtml and .jsp

New Member Publications: 7 Date d'inscription: 07/11/11 Publications récentes
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, modifié il y a 11 années.

RE: Faces Portlet with .xhtml and .jsp

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
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, modifié il y a 11 années.

RE: Faces Portlet with .xhtml and .jsp

New Member Publications: 7 Date d'inscription: 07/11/11 Publications récentes
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, modifié il y a 11 années.

RE: Faces Portlet with .xhtml and .jsp

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
My pleasure Prathamesh -- thanks for using Liferay.