2 Replies Latest reply on Mar 12, 2007 9:43 AM by tonyf

    EL Notation and Navigation from-action

    tonyf

      Hi all,
      My first post and I'm hoping somebody will be able to shed some light on an issue I am currently having with an application being developing using Seam-JSF-Facelets-IceFaces.

      The problem I'm having is that my redirects no longer work following the execution of methods in my Session Beans when the methods are called using some of my Custom Composite Components. I believe I have identified the problem as being due to the EL notation that I am using in my custom components not matching up with the notation that is being used in the paging.xml navigation rules.

      To try and be clearer, the notation for the method calls in say a navigation link would be of the form: action="#{bean[method]}". This method then returns a string that maps to the rules in my paging.xml in order to redirect. In the paging.xml the rule is defined as follows:
      <navigation from-action="#{bean.method}">
      <rule if-outcome="String">
      <redirect view-id="URL" />
      ...

      I know that the problem is that the 'from-action' and the 'action' are not matching because of the use of the different notations but I have to use the bracket notation in my composite components and the paging.xml doesn't seem to like it.

      Can anyone suggest a possible solution to this or let me know whether future releases of Seam will handle the bracket notation differently? As far as I understand they result in the same behaviour so shouldn't Seam treat them the same so that they match in the navigation rule? Thanks

        • 1. Re: EL Notation and Navigation from-action
          gavin.king

          You should be able to use #{bean[method]} in pages.xml.

          • 2. Re: EL Notation and Navigation from-action
            tonyf

            Thanks for the response Gavin. I'm just back to it now so I tried using the bracket notation within the pages.xml again but the redirects still are not working.

            From my understanding I thought that it should be possible to use the bracket notation too but as there seemed to be an issue I set up a test to try and ensure what I am seeing is due to the navigation rules failing to be matched. I setup a simple h:commandLink with an action defined with the bracket notation calling a method that should match with a straight-forward navigation rule, again with the from-action defined using the bracket notation. As expected the method was called successfully but the redirect did not fire which makes it seem as if the rule is not being matched...?

            I can't see how else I can proceed regarding this and so I was hoping that you might confirm for me that the bracket notation is actually permitted for the paging.xml and that it does result in a match? btw the version of Seam I am using is '1.2.0.Patch1'. Of course if you have any other suggestion, do let me know, thanks again.
            Tony