3 Replies Latest reply on Sep 5, 2006 4:46 PM by pmuir

    How to directly invoke a seam action?

    acoe8

      How do I form a URL that invokes a seam action without having to have a page that I'm coming from?

      I can't do something like this: http://localhost:8080/application/searchAction.find.seam

      I've tried doing something like this:

      http://localhost:8080/application/destPage.seam?actionMethod=searchAction.find

      However, I sometimes get strange error messages, as if the destination page (destPage.xhtml) were getting processed before the "find" method was called.

        • 1. Re: How to directly invoke a seam action?
          pmuir

          I've never seen the actionMethod=searchAction.find syntax before. What version of Seam are you using?

          Seam uses JSF which is a component-framework not an action-framework, but can behave like an action framework using pages.xml. You should also consider the Seam Factory Pattern which provides an alternative (more JSFish IMO) way of doing much the same thing.

          • 2. Re: How to directly invoke a seam action?
            texan

            In this particular case, I'm loading a page from an tag, and I couldn't work out a clean way to do that with JSF. Is there a JSF tag that will render an IFRAME with a seam call?

            • 3. Re: How to directly invoke a seam action?
              pmuir

              I don't think it should affect either the factory pattern or pages.xml calling the pages as an iframe.

              i.e.

              <iframe src="myiframe.seam" />


              pages.xml (check the syntax, i might have it a bit wrong)
              <page view-id="myiframe.xhtml" action="#{searchAction.find}" />



              No, no JSF tag I'm aware of (the HTML tag does the job I guess).