cancel
Showing results for 
Search instead for 
Did you mean: 

navigation problem

friedman30
Champ in-the-making
Champ in-the-making
Hi,

I've added an UIActionLink component to the properties page. since i wanted the component to show in some cases (only for multilingual fields), i did not create it in the .jsp but in the java code.

i used this code to create the component:
   protected final static Class ACTION_CLASS_ARGS[] = {javax.faces.event.ActionEvent.class};
           UIActionLink uiActionLink = new UIActionLink();
            uiActionLink.setAction(new ConstantMethodBinding("dialog:editMultilingualProperties"));
            MethodBinding actionListener = context.getApplication().createMethodBinding("#{EditMultilingualPropertiesBean.setupAction}", ACTION_CLASS_ARGS);
            uiActionLink.setActionListener(actionListener);
             uiActionLink.setId("multilingual_action_link");
             uiActionLink.setImage("/images/icons/multilingual_marker.gif");
             uiActionLink.setImmediate(true);
             uiActionLink.setRendered(true);
             uiActionLink.setParent(control.getParent());
             uiActionLink.setValue("Edit Multilingual Values");
             uiActionLink.setShowLink(false);

I've registered the backing bean at faces-config-beans.xml:
<managed-bean>
      <description>
         Bean for editing multilingual properties
      </description>
      <managed-bean-name>EditMultilingualPropertiesBean</managed-bean-name>                   <managed-bean-class>com.company.alfresco.web.bean.EditMultilingualPropertiesBean</managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
   </managed-bean>

Added a navigation case to faces-config-navigation.xml:
<navigation-rule>
      <from-view-id>/jsp/*</from-view-id>
      <navigation-case>
         <from-outcome>editMultilingualProperties</from-outcome>
         <to-view-id>/jsp/dialog/edit-file.jsp</to-view-id>
      </navigation-case>
</navigation-rule>

The component renders fine, but when action is fired - nothing happens - the page is re-rendered and that's it  :?

The code never gets to my backing bean….

What am i doing wrong here???  :shock:

Thanks,

Dror
2 REPLIES 2

kevinr
Star Contributor
Star Contributor
Is your backing bean specified correctly?
<managed-bean-class>com.company.alfresco.web.bean.EditMultilingualPropertiesBean</managed-bean-class>

i.e. is that the correct fully qualified class name?

Does you setupAction() method get called at all?

Thanks,

Kevin

friedman30
Champ in-the-making
Champ in-the-making
I just solved the problem  :wink:

Thanks

Dror