views:

5

answers:

0

having an action function that looks like this:

public String action(){
    return "success"
}

and this in my faces-config.xml:

<navigation-rule>
       <navigation-case>
            <from-outcome>success</from-outcome>
            <to-view-id>/Page2.iface</to-view-id>
     </navigation-case>
    </navigation-rule>

I have tried all extension combinations .iface and .jsp and navigation didn't work.

I read about a bug in liferay that doesn't allow navigation and I applied the work-around:

in portlet.xml: I put 2.0 instead of 1.0 for the version:

<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd  http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"&gt;

I have also added this at the end of portlet.xml:

<container-runtime-option>
    <name>javax.portlet.escapeXml</name>
    <value>false</value>
    </container-runtime-option>

Still Navigation didn't work.

I changed my function to an action listener function as follows:

 public void navigate(ActionEvent e){

        FacesContext facesContext = FacesContext.getCurrentInstance();
        facesContext.getApplication().getNavigationHandler().handleNavigation(facesContext, null, "success");


    }

without the return String as someone suggested on liferay forums. Still nothing happened!

Can someone please help me. I am stuck here!