Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member
    Join Date
    Oct 2011
    Posts
    139
    Vote Rating
    4
    jvahabzadeh is on a distinguished road

      0  

    Question Beta 1 - NorthSouthContainer behavior different from TopBottomComponent of DP5?

    Beta 1 - NorthSouthContainer behavior different from TopBottomComponent of DP5?


    I've noticed a behavior change in this class, and am wondering if it's deliberate or not, or, at least, how to get the old behavior.

    In code I'd written to work with DP5, I basically created a screen where I:
    - Add a Viewport to the RootPanel
    - Add a TopBottomComponent to the Viewport
    - Set the top widget of the TopBottomComponent component to a MenuBar
    - Set the bottom widget of the TopBottomComponent component to a FlowLayoutContainer
    - Set the widget of the TopBottomComponent to a ContentPanel

    This worked as I'd expected. The MenuBar was at the top of the screen, and the FlowPanelContainer's contents were at the bottom.

    However, in Beta 1, with the same exact code, except that:
    - TopBottomComponent is changed to NorthSouthContainer
    - setNorthWidget instead of setTopWidget
    - setSouthWidget instead of setBottomWidget

    the behavior is now different. Instead of the MenuBar being on top, it is instead immediately above the FlowPanelContainer. The FlowPanelContainer is, as expected, on the bottom.

    Is this a bug, or do I need to handle this in a different way than would be done in DP5?

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Please try this patch:
    Code:
    Index: src/main/java/com/sencha/gxt/widget/core/client/container/NorthSouthContainer.java===================================================================
    --- src/main/java/com/sencha/gxt/widget/core/client/container/NorthSouthContainer.java	(revision 2022)
    +++ src/main/java/com/sencha/gxt/widget/core/client/container/NorthSouthContainer.java	(working copy)
    @@ -43,6 +43,18 @@
       }
     
       @Override
    +  @UiChild(limit = 1, tagname = "widget")
    +  public void setWidget(Widget w) {
    +    if (this.widget != null) {
    +      this.widget.removeFromParent();
    +    }
    +    this.widget = w;
    +    if (this.widget != null) {
    +      insert(widget, this.northWidget != null ? 1 : 0);
    +    }
    +  }
    +
    +  @Override
       protected void doLayout() {
         if (widget != null) {
           Size size = getContainerTarget().getStyleSize();
    As workaround try to first set the widget and after that add the north and south widget

  3. #3
    Sencha User
    Join Date
    Jan 2009
    Posts
    46
    Vote Rating
    0
    Konstantin.Scheglov is on a distinguished road

      0  

    Default


    Beta2.
    I still have same problem in UiBinder with NorthSouthContainer.
    I have to set "north" after "child".
    Konstantin Scheglov

  4. #4
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Quote Originally Posted by Konstantin.Scheglov View Post
    Beta2.
    I still have same problem in UiBinder with NorthSouthContainer.
    I have to set "north" after "child".
    Have you tried the provided patch from above?

  5. #5
    Sencha User
    Join Date
    Jan 2009
    Posts
    46
    Vote Rating
    0
    Konstantin.Scheglov is on a distinguished road

      0  

    Default


    I've tried now.
    With patch it works correctly.
    Konstantin Scheglov

  6. #6
    Sencha User
    Join Date
    Jan 2009
    Posts
    46
    Vote Rating
    0
    Konstantin.Scheglov is on a distinguished road

      0  

    Default


    Code:
    	<container:NorthSouthContainer styleName="{style.panel}" borders="true">		<container:south>
    			<button:TextButton text="AAAAAAAA"/>
    		</container:south>
    	</container:NorthSouthContainer>
    Using NorthSouthContainer with only "south" widget also renders bad UI.
    At first it looks not "south", but as "north".
    And at second it is not stretched horizontally.
    Screenshot_20120131_200939.png
    Konstantin Scheglov

  7. #7
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Quote Originally Posted by Konstantin.Scheglov View Post
    I've tried now.
    With patch it works correctly.
    This is now fixed in SVN and will be part of the next release.

  8. #8
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Quote Originally Posted by Konstantin.Scheglov View Post
    Code:
        <container:NorthSouthContainer styleName="{style.panel}" borders="true">        <container:south>
                <button:TextButton text="AAAAAAAA"/>
            </container:south>
        </container:NorthSouthContainer>
    Using NorthSouthContainer with only "south" widget also renders bad UI.
    At first it looks not "south", but as "north".
    And at second it is not stretched horizontally.
    Attachment 31206
    Can you please provide a fully working testcase implementing EntryPoint for the problem you are seeing?

  9. #9
    Sencha User
    Join Date
    Jan 2009
    Posts
    46
    Vote Rating
    0
    Konstantin.Scheglov is on a distinguished road

      0  

    Default


    Do you support UiBinder? :-)

    Code:
    public class ImageViewer implements EntryPoint {  public void onModuleLoad() {
        RootPanel rootPanel = RootPanel.get();
        {
          NorthSouthContainer container = new NorthSouthContainer();
          container.setBorders(true);
          rootPanel.add(container, 10, 10);
          container.setSize("250px", "200px");
          // "south" rendered on "north", not stretched horizontally
          container.setSouthWidget(new Button("SSSSSSSSSSSS"));
        }
      }
    }
    Konstantin Scheglov

  10. #10
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    You are missing a call to forceLayout in that example code.

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi