6 Replies Latest reply on Oct 11, 2007 8:55 AM by pmuir

    EntityHome wire() and isWired()

    terryb


      can anyone please tell, how can these be used? I haven't been able to find any reference on these.

        • 1. Re: EntityHome wire() and isWired()
          tynor

          I posted some info I gleaned from scratching my head with the source code at:

          http://www.jboss.com/index.html?module=bb&op=viewtopic&t=116420

          and have logged JIRA's for improved docs at:

          http://jira.jboss.com/jira/browse/JBSEAM-1841
          and
          http://jira.jboss.com/jira/browse/JBSEAM-1842

          • 2. Re: EntityHome wire() and isWired()
            christian.bauer

            Generate an application with seam-gen and generate entities from a database with some many-to-one etc. relationships. This is what these methods are there for.

            • 3. Re: EntityHome wire() and isWired()
              tynor

              As Pete said in another thread earlier today:

              seam-gen is a tool for quickly bootstrapping an application - it's not supposed to generate code you put straight into production.


              From my perspective as a Seam user (not a Seam committer), good documentation on how the Seam-gen'd classes and facelets work is pretty essential. They are the defacto way that Seam apps are constructed. The Seam propaganda encourages new projects to use Seamgen.

              But the reality is that the generated files are really just a starting point for adaptation to a working application. As it is, there is scarce info about how the dozens of functions in EntityHome and EntityList are intended to be used and extended. Most of the functions don't even have javadoc.

              The Seam reference manual has gotten quite a bit better from 1.2.1 to 2.0.0 (e.g. I found the sequence diagram for authentication quite enlightening) -- but I still don't see good examples of how the seamgen'd classes work and how they are expected to be extended (isWired(), wire(), getDefinedId(), etc.). None of the supplied examples use a seam-gen bootstrapped architecture, so we're left with no docs and no examples...


              • 4. Re: EntityHome wire() and isWired()
                atao

                Below what I found. There are maybe other uses.

                About wire():
                Used in files {entity}Edit.page.xml to manage M2O link.

                About isWired():
                ATM, only used in edit page with "save" button, to disable it

                • 5. Re: EntityHome wire() and isWired()
                  terryb

                  Thanks guys, it's been a great help. For anyone else interested, follow links in tynor's posts above.

                  • 6. Re: EntityHome wire() and isWired()
                    pmuir

                    Yes, we know we need some big improvements in the docs in some areas - this is one. We just quite a few hours in which to do them!