Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Jitender Dhiman
Links in JSF portlet
24. Januar 2013 01:26
Antwort

Jitender Dhiman

Rang: Junior Member

Nachrichten: 29

Eintrittsdatum: 21. September 2012

Neue Beiträge

Hi, I am new to liferay ..

I want to create link of other page in my JSF portlet.
I am using :

<portlet:renderURL var="kpage">
<portlet:param name="hm" value="/kpage.xhtml" />
</portlet:renderURL>

<h:outputLink value="#{kpage}">s</h:outputLink>


But it does not works..

both pages are in views folder.
Neil Griffin
RE: Links in JSF portlet
24. Januar 2013 14:40
Antwort

Neil Griffin

LIFERAY STAFF

Rang: Liferay Legend

Nachrichten: 2223

Eintrittsdatum: 26. Juli 2005

Neue Beiträge

Do you want to simply navigate to a different JSF view in the same portlet? If so then you can do something like this:

1<h:commandButton action="/kpage.xhtml" value="Click Me" />


The usage of portlet:renderURL would be more appropriate for re-rendering the current portal page.
Jitender Dhiman
RE: Links in JSF portlet
24. Januar 2013 22:18
Antwort

Jitender Dhiman

Rang: Junior Member

Nachrichten: 29

Eintrittsdatum: 21. September 2012

Neue Beiträge

Thanks Neil.

but for commandlink we have to use form also..

Can we make links without creating form...?
Neil Griffin
RE: Links in JSF portlet
29. Januar 2013 13:01
Antwort

Neil Griffin

LIFERAY STAFF

Rang: Liferay Legend

Nachrichten: 2223

Eintrittsdatum: 26. Juli 2005

Neue Beiträge

The h:commandButton and h:commandLink component tags must be surrounded by h:form in order to work. This is because the JSF lifecycle has to be executed in order to execute the NavigationHandler which transitions to the next viewId.