Bug 680158

Summary: group inventory>members view is blank until you click on the subtab a second time
Product: [Other] RHQ Project Reporter: John Mazzitelli <mazz>
Component: Core UIAssignee: John Mazzitelli <mazz>
Status: CLOSED CURRENTRELEASE QA Contact: Corey Welton <cwelton>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0.0.B02CC: skondkar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 678340    

Description John Mazzitelli 2011-02-24 14:07:24 UTC
go to group view.
click members
click to another subtab
click back to members
notice members view is empty
click on members subtab label again
notice members view is back

Comment 1 John Mazzitelli 2011-02-28 19:21:18 UTC
in SubTabLayout:

            Canvas canvas = currentSubTab.getCanvas();
            if (canvas != null) {
                if (hasMember(canvas)) {
                    if (!canvas.isVisible()) {
                        canvas.show();
                    }
                } else {
                    if (!canvas.isCreated()) {
                        canvas.setOverflow(Overflow.SCROLL);
                    }
---->               addMember(canvas);
                }
                markForRedraw();
                this.currentlyDisplayed = currentSubTab;
            }


The code gets into here, where the canvas already exists, but has no members. So canvas != null, hasMembers(canvas) == false and !canvas.isCreated() is false (i.e. canvas IS created).

In the debugger, I see that canvas.isVisible() is false (which is to be expected, it isn't shown yet).

However, I never see onDraw() get called nor RefreshableView.refresh() (which MemberView has - MemberView is "canvas" above).

Question: why doesn't the code do a "canvas.show()" here like it does in the "hasMembers" if clause???

Comment 2 John Mazzitelli 2011-02-28 19:27:56 UTC
If I add 

      if (!canvas.isVisible()) {
          canvas.show();
      }

after the addMembers call from my previous comment, this bug goes away.

Comment 3 John Mazzitelli 2011-02-28 19:40:55 UTC
commit ca82e3d

added that if-statement to ensure the canvas is visible.

Comment 4 Sunil Kondkar 2011-03-10 11:40:56 UTC
Verified on build#1086 (Version: 4.0.0-SNAPSHOT Build Number: 7b2d9f6)

The members view displays the member resources when navigating and coming back from another subtabs.

Marking as verified.

Comment 5 Corey Welton 2011-05-24 01:15:40 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 6 Corey Welton 2011-05-24 01:15:40 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 7 Corey Welton 2011-05-24 01:15:43 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 8 Corey Welton 2011-05-24 01:15:45 UTC
Bookkeeping - closing bug - fixed in recent release.