Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SectionStackSection getting frozen when clicked for second time

    Hi folks,

    I had posted yesterday that im unable to use buttons embedded under decoratedstackpanel in Firefox, so one of the member asked me to use the smart API's rather than combining gwtapi with smart, so did I use the SectionStack with SectionstackSection as below, it works in Firefox and Chrome however it hangs after 2 clicks, is this a known issue? Any help would be grately appreciated. I've faced the same problem with both SMART 2.1 and SMART 2.2


    //A_stack consists of Ibuttons one below the other
    SectionStack leftSideLayout = new SectionStack();
    leftSideLayout.setWidth("15%");
    leftSideLayout.setShowResizeBar(true);
    leftSideLayout.setVisibilityMode(VisibilityMode.MULTIPLE);
    leftSideLayout.setAnimateSections(true);


    SectionStackSection analysisSection = new SectionStackSection("Analysis");
    analysisSection.setExpanded(false);
    analysisSection.setItems(A_stack);
    analysisSection.setCanCollapse(true);
    leftSideLayout.addSection(analysisSection);


    SectionStackSection aboutSection = new SectionStackSection("About");
    aboutSection.setExpanded(false);
    aboutSection.setItems(A_stack);
    aboutSection.setCanCollapse(true);
    leftSideLayout.addSection(aboutSection);


    SectionStackSection projectSection = new SectionStackSection("Project");
    projectSection.setExpanded(false);
    projectSection.setItems(A_stack);
    projectSection.setCanCollapse(true);
    leftSideLayout.addSection(projectSection);

    mainLayout.addMember(leftSideLayout);
    //where mainLayout = HLayout



    Thanks,
    VTV
    Last edited by vtv; 9 Jul 2010, 04:04.

    #2
    Easier if you keep everything in one thread so there is some context on what you want to accomplish. Is it when you click the sections it hangs? Anything in the developer console? Same behavior in Chrome and Firefox? Do you have a standalone test case for this? A_stack is IButtons? Why are you reusing across each panel?

    Comment


      #3
      Thanks svjard, I shall try to maintain the same thread henceforth.

      The reason i've quoted A_stack(containing IButtons) multiple times is just for example, even when i use a different stack eg H_stack containing another set of buttons, SectionstackSection gets frozen when clicked twice and the browser would need a refresh. This problem has been happening with both firefox and chrome.

      What do u mean by developer console? After compiling the program, I copy the war file and the required files into the Apache server.Please let me know if u need more details.

      Comment


        #4
        If I had to guess it the fact your reusing components between sections. You can attach your source file and I'll take a look, but try to keep it as a standalone thing as much as possible. Also SC.showConsole() will launch the developement console which provides more details.

        Comment


          #5
          Hi svjard,

          Thanks for ur help until now, I've attached the source code, I'm unable to attach the complete source code because of the confidentiality however, this problem of SectionStackSection hanging appears even with just one panel.

          Thanks again
          vtv
          Attached Files

          Comment


            #6
            So I ran your code, where you getting an error about visibility being null or not an method? Two things here, first don't reuse components like your doing with A_stack, make a different stack for each section with different buttons. You can always reuse clickhandlers and all if the buttons are duplicates. Second make sure webframework_id div is not shorthand, i.e. so it should look like.
            Code:
            <div id="webframework_id"></div>

            Comment


              #7
              Hi buddy,

              I've got the problem fixed, as u said i've made a different stack for each set of buttons, but i was still getting the same problem of page getting frozen after multiple clicks , so added each of these stacks in different canvas* like below and the problem got resolved.

              just attaching the source code inline if someone wants the soln in future

              Canvas panel_analysis = new Canvas();
              panel_analysis.addChild(A_stack);
              panel_analysis.setOverflow(Overflow.VISIBLE);

              Canvas panel_project = new Canvas();
              panel_project.addChild(home_stack);
              panel_project.setOverflow(Overflow.VISIBLE);

              Canvas panel_about = new Canvas();
              panel_about.addChild(H_stack);
              panel_about.setOverflow(Overflow.VISIBLE);

              // add the project panel to the left side layout
              SectionStackSection projectSection = new SectionStackSection("Project configuration");
              projectSection.setExpanded(true);
              projectSection.setResizeable(true);
              projectSection.setItems(panel_project);
              projectSection.setCanCollapse(true);
              leftSideLayout.addSection(projectSection);

              Thank u svjard for all ur help, very much appreciated for being so kind.
              vtv

              Comment

              Working...
              X