3 Replies Latest reply on Dec 8, 2006 12:54 PM by christian.bauer

    Understanding Seam

      I just deployed my first simple Seam application, and have some questions about the generated HTML I see. I am wondering how each of the generated hidden fields and javascript in the output below contribute to Seam's functionality.

      How do each of these form fields help Seam do what it does? Seam is a wonderful tool, but I'd like to understand "how" it does what it does (on a high enough level that it might be explained in a couple of detailed replies to this post)...because right now it seems a bit "too" transparent and magical.

      <input type="hidden" name="registerForm_SUBMIT" value="1" />
       <input type="hidden" name="registerForm:_link_hidden_" />
       <script type="text/javascript"><!--
       function clear_registerForm() {
       var f = document.forms['registerForm'];
       f.elements['registerForm:_link_hidden_'].value='';
       f.target='';
       }
       clear_registerForm();
       //--></script>
       <input type="hidden" name="jsf_tree_64" id="jsf_tree_64" value="rO0ABXNyA=" />
       <input type="hidden" name="jsf_state_64" id="jsf_state_64" value="wcHBwcHh4" />
       <input type="hidden" name="jsf_viewid" id="jsf_viewid" value="/register.xhtml" />


      As an example of things I'm wondering: how do these fields store state, are these fields only used with client-side state-saving, how do these fields implement the whole notion of conversations and business processes, what is stored on the client (i.e. in these fields) versus the server, etc.

      I've read the manuals and tutorials, but there are still a lot of questions I have. Hopefully people who know can explain or people like me who do not can work through it to figure this all out!

      Thanks.

        • 1. Re: Understanding Seam
          pmuir

          The hidden fields and JS are JSF functionality. You'd be better off asking on the myfaces (unless your using the RI, in which case ask there).

          IMO The best way to get some detail on Seam is to have a look through the source code.

          I think you need to ask more specific questions - how does Seam work is quite general (there are already over 100 sides written in the reference manual on just that!)

          • 2. Re: Understanding Seam

            You're right, I need to ask a more specific question, so I'll start with the following:

            When using client-side state saving, where and how is the state saved on the client? Are all the components serialized to the client (is that what's basically in those hidden fields) or what? Does the server really store no state whatsoever about a particular client?

            (When I get into really detailed stuff like the meaning of each hidden field, I'll take it to the MyFaces forum, but for now I like it here... :)

            Thanks.

            • 3. Re: Understanding Seam
              christian.bauer

              This is really a MyFaces question, so please try their forum/mailinglist/whatever.