Forums de discussion

Tabs in JSF portlets

jussi ss seppala, modifié il y a 15 années.

Tabs in JSF portlets

New Member Publications: 8 Date d'inscription: 15/05/08 Publications récentes
Hi,
There is a thread in a forum which says how you can make tabs in JSF-based portlets:

http://www.liferay.com/web/guest/community/forums/-/message_boards/message/531864
https://www.liferay.ca/web/guest/community/forums/-/message_boards/message/498475#_19_message_498475

Those tell you that you can make tabs easily just by specifying ul element class="tabs". This didn't work for me but I managed to get tabs visible by using the following code in my jsf page:

<div class="tabs">
<li><a href="/WEB-INF/first.jsp">First</a></li>
<li><a href="/WEB-INF/second.jsp">Second</a></li>
</div>

But what is still missing is how should I define contents of the tabs correctly. Previous sample only shows the tabs but href links don't work. So how should I define them? Note that I'm using JSF!

So far I haven't used tabs and all navigation has been defined in faces-config.xml. That style seems quite nice and easy to maintain. But is there a way how I could take advantage of faces-config.xml definitions and liferay tabs?

(There is also very good document about Liferay tabs located in http://wiki.liferay.com/index.php/Creating_Tabs_in_Liferay_Portlets but too bad that it does not tell how to do that using JSF techniques.)
jussi ss seppala, modifié il y a 15 années.

RE: Tabs in JSF portlets

New Member Publications: 8 Date d'inscription: 15/05/08 Publications récentes
Hi!

I still haven't found a solution for this. So probably using tabs in JSF pages is impossible.

Rgds,
Jussi
thumbnail
Tobias Amon, modifié il y a 15 années.

RE: Tabs in JSF portlets

Liferay Master Publications: 546 Date d'inscription: 08/08/07 Publications récentes
Hi,

no, tabs in JSF is not impossible. But you need an additional library which brings a "Tab"-tag to JSF.

This could be either Apache MyFaces (with tomahawk) or IceFaces.

Both work really good.
thumbnail
Lari Tuominen, modifié il y a 15 années.

RE: Tabs in JSF portlets

Expert Publications: 283 Date d'inscription: 07/11/07 Publications récentes
Hi,

I Agree! In ICEFaces you can use, for instance, panelTabs inside panelTabSet.

- Lari