7 Replies Latest reply on Apr 22, 2007 11:22 PM by Tony Herstell

    Disable butons till the screen renders

    Tony Herstell Master

      How do I disable all buttons and links before the whole page has rendered?
      When the page renders; if I get in there and press a button before the page has completely rendered I get Seam to crash. 100% every time!

        • 1. Re: Disable butons till the screen renders
          Tony Herstell Master

          Perhaps I could avoid the problem if we can delay sending the response till Seam has completely rendered the response? - Is this possible instead?

          • 2. Re: Disable butons till the screen renders
            Jim Hazen Expert

            You might be able to set the default Facelet or JSP flush size to something large enough to keep everything in memory until your entire paged had finished rendering. However you apparently have large pages that take a long time to render, so it's probably not desirable to do this.

            If you're able to reproduce the problem, and it sounds like you can, you might want post it here or in JIRA. Someone may find a way of at least preventing Seam from crashing.

            Or you could take a look at the exception type, and supply custom navigation to an error page asking your impatient users to allow the page to fully render before they start clicking on stuff. :)

            • 3. Re: Disable butons till the screen renders
              Tony Herstell Master

              Perhaps I can explain why it takes so long to render (although if you had a busy server you could get it for any site... anyhow!).

              I have a main screen (Wizard) that has about 7 steps you have to do.

              I was required to go "free flight" mode in that any step of the wizard could be done at any time... so teh main page has ticks/crosses to show how you are progressing.

              Each step, in itself, can contain a number of steps (this got me round using javascript to show/hide bits which really messes up JSF and is really against the JSF paradigm anyhow!).

              So I shield parts of the monolith by using s:fragment...

              JSF seems to still render all the bits shielded by s:fragments anyhow!! So I have The Mother of all Pages being rendered.. pulling in about 14 other .xhtml pages built on top of a couple of nested templates!

              :(

              • 4. Re: Disable butons till the screen renders
                Tony Herstell Master

                Thanks for the suggestion CptnKirk. The more suggestions the merrier.

                • 5. Re: Disable butons till the screen renders
                  Tony Herstell Master

                  If you want to see the problem hop over to http://gaming.homeip.net:8080/clickstream

                  go to set up an advertising campaign and click ANY steps on the left hand side.

                  While the page is still rendering click any of the buttons that comes up...

                  you get (something like):

                  /WEB-INF/pages/advertisingCampaignWizard/sideProgressMenu.xhtml @28,66 rendered="#{advertisingCampaignController.adTypeComplete}": Exception getting value of property adTypeComplete of base of type : org.javassist.tmp.java.lang.Object_$$_javassist_7

                  IF you wait till the page has COMPLETELY finished (This really means COMPLETELY!) then hit a button it works better!!

                  The whole site is a mockup... so ignore the bad grafix!

                  Also, I have not joined the dark site... its not for JunkMail, Nigerian Scams, etc. of any kind.

                  :)

                  • 6. Re: Disable butons till the screen renders
                    Christian Bauer Master

                    Caused by: org.jboss.seam.NoConversationException: no long-running conversation for @Conversational bean: advertisingCampaignController

                    So my guess would be that the conversation id is not propagated into the click. Don't know exactly why that would happen. I also recommend that you turn off client-side state saving, because the megabytes of viewroot state that you serialize to the browser into the hidden form fields is most likely what is causing the flushing of the render buffer. (I don't know where that buffer is and how to tune it though.)

                    • 7. Re: Disable butons till the screen renders
                      Tony Herstell Master

                      There are a LOT of other exceptions before the one listed on the screen.
                      I will try your suggestion and hope it works...
                      Now need to RTFM to find out how!