4 Replies Latest reply on Aug 9, 2007 12:48 PM by pmuir

    chaining jsf request

    hexxter

      Hello Forum,

      since my other post got no replys I try it with a shorter question:

      Is it possible to chain jsf requests an seam still works? (Call/Include another jsf page from within java code in the first jsf page)

      Thanks & regards,

      Florian

        • 1. Re: chaining jsf request
          pmuir

          Why not use facelets ui:include?

          • 2. Re: chaining jsf request
            hexxter

            Hi Pete,

            (this may be totally wrong now because I still don't really understand jsf, but)

            I'd like to change what's included dynamically. My webapp should be multidomain/multilingual in a way that I can say: includeTemplate( 'article' ) and depending on my context it would include e.g. "article_page1_en_US_top.jsf".

            I'm sorry if this is a trivial problem in jsf which I simply didn't understand but I'm trying to evaluate if I can use jsf/seam/ejb3 for my project while I haven't worked with neither of them by now.

            Regards,

            Florian

            • 3. Re: chaining jsf request
              monkeyden

              You could use the same files, but with locale specific ResourceBundles.

              • 4. Re: chaining jsf request
                pmuir

                 

                <ui:include src="#{template.getTemplate('article')}" />


                @Name("template")
                public class Template {
                
                 public String getTemplate(String name) {
                 return calculateViewId(name);
                 }
                }


                Obviously, you have to write calculateViewId to build your viewId on the fly.

                If it's just for i8ln of strings, then monkeyden's is the correct solution.