views:

29

answers:

1

I'm trying to navigate through pages in icefaces portlet(Liferay) but I can't get it to work.

<navigation-rule>
<from-view-id>/AdmissionApplication/Application.iface</from-view-id>
<navigation-case>
<from-outcome>y</from-outcome>
<to-view-id>/StudentPage/StudentMainPage.iface</to-view-id>
</navigation-case>
</navigation-rule> 

and here is the button action

public String button1_action() {
//return null means stay on the same page
return "y";
}

I tried to put .jsp extension and .iface and many options I found in the forums put I can't get them to work. Could any body help me?

A: 

The navigation paths ought to be relative to the webapplication context, not to the domain context. It look like that /AdmissionApplication and /StudentPage points to two physically different webapplications. You can't forward from one to other using JSF navigation. You should then use h:outputLink (or whatever equivalent in IceFaces) instead, like so:

<h:outputLink value="/StudentPage/StudentMainPage.iface">

Another advantage is that this is more SEO and User friendly than commandlinks/buttons (which should be avoided for "plain vanilla" page-to-page navigation).

BalusC
I tried it but Liferay redirect me to the homepage!
Feras
I know nothing about your webpage structure. Just check if the generated URL is correct. It should be absolutely or relatively the same as the URL as you would enter raw in the browser address bar to access the page manually.
BalusC
It seems that There is a special way for rendering portlets extending genericportlet using portletUrl but I can't get it right!
Feras