cancel
Showing results for 
Search instead for 
Did you mean: 

Navigation rules

krikke
Champ in-the-making
Champ in-the-making
Hello,

we are encountering problems with the navigation rules in Alfresco.
Our application has some custom jsp pages that are added into the alfresco.war with amp.
This application also has a custom login page and redirects after login to a custom home.jsp page rather then the dashboards/container.jsp page from Alfresco.

In the faces-config-custom.xml we added the following rules to manage this.

<navigation-rule>
    <description>
      The decision rule used by the NavigationHandler to determine which view must be displayed after the current
      view, login.jsp is processed.
    </description>
    <from-view-id>*</from-view-id>
    <navigation-case>
      <description>
        Indicates to the NavigationHandler that the browse.jsp view must be displayed if the Action referenced
        by a UICommand component on the login.jsp view returns the outcome "success".
      </description>
      <from-outcome>administration</from-outcome>
      <to-view-id>/jsp/browse/browse.jsp</to-view-id>
    </navigation-case>
</navigation-rule>

<navigation-rule>
   <description>
      The decision rule used by the NavigationHandler to determine which view must be displayed after the current
      view, login.jsp is processed.
   </description>
    <from-view-id>/jsp/login.jsp</from-view-id>
    <navigation-case>
      <description>userclient navigation case</description>
      <from-outcome>myalfresco</from-outcome>
      <to-view-id>/jsp/userclient/home.jsp</to-view-id>
    </navigation-case>
    <navigation-case>
      <description>userclient navigation case</description>
      <from-outcome>success</from-outcome>
      <to-view-id>/jsp/userclient/home.jsp</to-view-id>
    </navigation-case>
</navigation-rule>

The application works just fine :
- browse to http://localhost:8080/alfresco will bring us to http://localhost:8080/alfresco/faces/jsp/login.jsp
- after successfull login we are redirected to http://localhost:8080/alfresco/faces/jsp/userclient/home.jsp just like we want.
- everything works as long as we click the hyperlinks, however when we browse to http://localhost:8080/alfresco (root url) after a successfull login then we are automaticaly redirected to http://localhost:8080/alfresco/faces/jsp/dashboards/container.jsp
This is not what we want to achieve, it should go to http://localhost:8080/alfresco/faces/jsp/userclient/home.jsp

I have been looking for a solution for some time now, but I can not find a solution to fix it. Must be looking over it, or there is some kind of redirect that I am not aware of.

Any help would be much appriciated.

Christophe
1 REPLY 1

ivo_costa
Champ in-the-making
Champ in-the-making
Hi Christophe

you should look at the dialogs definitions.
I've found out the in some cases the redireccion is done through those and not throught the navigation rules and that maybe what's causing you troubles.

anyway… thank you for pointing that out, I'll check if I have that particular navigation problem too among all navigation changes I've made to my project