Announcement Announcement Module
Collapse
No announcement yet.
SWF, MyFaces, Facelets Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • SWF, MyFaces, Facelets

    Couple questions about getting these 3 technologies to work.

    1.) For view actions, do I need to specify the file extension in the view name? (.xhtml)

    2.) Should I use JSF backing beans or SWF scoped variables to track user data? Does it make a difference.

    3.) How to JSF action listeners factor into the SWF architecture? If I use SWF session variables, can my JSF action listeners get a reference to those variables to add data?

    I find the jsf example to simple. It doesn't handle any complex items that JSF provides.

  • #2
    I tried for a day and was unable to get facelets working.

    I tried for a day and was unable to get facelets working. It seems somehow the facelet view handler stops the things that would normally be run in webflow from running. Specifically the view from from flowExcecutionHolder never gets put into context on the state transition to a view.

    Comment


    • #3
      To respond to your question :

      1.) Yes, you have to use extension, however, on latest release, it seems that defining a ViewIdMapper should enable to remove this extension, but not yet tested.

      2.) SWF scoped variable are really the point which make SWF usefull since they have that scope flow which is between session (long scope) and request (short scope).

      3.) Rather than using JSF action listener, I would suggest to use actions defined in webflows. It is really more clear.

      We are using JSF, webflow and facelets. Use of facelets is really not an issue. The only problems are between JSF and webflow. We had some problems with complex tomahawk components (datatable etc.. ) specially when components use #{flowScope. ...} as value and tries to backup some properties (sort criteria). We had to take care that flowExecutionKey would always be transmitted correclty accross sorting/paginating links. Now almost everything is working correctly.

      Comment


      • #4
        what View do you use with facelets?

        Comment


        • #5
          I'm not sure to understand correctly your question.
          My webflow view states refer to xhtml files.

          Comment


          • #6
            No, I mean view handler - implementation of org.springframework.web.servlet.View.

            Comment


            • #7
              org.springframework.web.servlet.View refer to Spring MVC, I'm using JSF.

              Comment


              • #8
                Yes, but JSF requires some view technology, like jsp; you use Facelets.
                I don't know about SWF, but I have to configure ViewResolver in my application, and I don't know how to make it work with facelets.
                Do you have view resolver in your SWF app? can you send its bean definition here?
                Thanx

                Comment


                • #9
                  With JSF, the only view resolver I have to define in faces-config.xml is the view-hanlder parameter : "com.sun.facelets.FaceletViewHandler" which delegates rendering to facelets.

                  Comment

                  Working...
                  X