NNKL.COM
welcome to my space
X
Search:  
 HOME   Why is it so hard to fill ou tpanel contents?
Why is it so hard to fill ou tpanel contents?
Published by: webmaster 2010-03-12
Welcome to:nnkl.com

  • [Video] Best playback on Xperia [Archive] - xda-developers::
    56 posts - 26 authors - Last post: Sep 7Im using it on and off, id like to see some hard data on it, Don't know why it is so slow with the XMB Panel & so better in core player ! . I also rip all my Audio CD to fill my memory ! . It's a given fact, that decoding h.264 content is much more demanding than decoding for example DivX.
    http://forum.xda-developers.com/archive/index.php/t-459676.html
    HOME
    I've been trying to deal with this for a bit now, consider the following:
    var viewport = new Ext.Viewport({
    layout:'border',
    items: [
    {
    region:'west',
    collapsible: true,
    split:true,
    layout:'fit',
    margins:'0 0 0 0',
    items:new Ext.grid.GridPanel(myConfigObject)
    },
    {
    region:'center',
    layout:'fit',
    margins:'0 0 0 0',
    items:new Ext.TabPanel(myConfigObject)
    }]
    });

    Question 1) How does one add a dynamically generated tbar to the gridpanel (AND have the layout panel refresh so as not to cut off the bar)
    Question 2) How does one access the tabpanel that was just created to attach an event handler?

    I ask this because I've tried creating these two objects: a GridPanel and TabPanel on their own, but they simply aren't rendered correctly UNLESS I create them inside of the Layout object. Both of these objects are generated dynamically, so I can't just have it all 'inline'.

    Does anyone have any experience with this? It seems like Ext's strength is not in dynamic creation of its widgets.


  • Well as per the advanced layout example, I should be able to give the items config the panels... in the case I was showing you, the gridPanel had properties such as 'region: west', but that's besides the point, I got it working now, which this code:


    var viewport = new Ext.Viewport({
    layout:'border',
    items: [
    {
    region:'west',
    collapsible: true,
    split:true,
    Extending Group Policy with AutoProf Policy Maker::
    File Format: PDF/Adobe Acrobat - Quick ViewAutoProf Policy Maker can make an excellent addition to fill in the gaps left Contents .. Doing so will not cause the user account to maintain old and outdated Group using Control Panel, However, two users in the Sales OU need to make such as amount of memory, hard disk space, and other attributes of
    http://moskowitz-inc.com/images/extend.pdf
    HOME
    UrbanBaby - If america is so bad at teaching math, w - Talk::
    20 posts - Last post: Jul 18There is a panel consisting of people from people of all origins. .. American domination has decreased so sharply across the board. .. to immigrants with tech backgrounds in order to fill the gap left by US citizens. . ://seedmagazine.com/content/article/putting_his_money_where_his_math_is/
    http://www.urbanbaby.com/talk/posts/51211347
    HOME
    layout:'fit',
    width: 500,
    monitorResize: true,
    margins:'0 0 0 0',
    items:new Ext.grid.GridPanel(dataGrid.getOptions())
    },
    {
    split: true,
    region:'center',
    layout:'fit',
    monitorResize: true,
    margins:'0 0 0 0',
    items:_tabs
    }]
    });


    My question re: your toolbar fix is, I already have a bbar defined (it is returned in the dataGrid.getOptions() you see above). Should I use your example and then insert my real bbar after it has been rendered?, for instance do this:


    var viewport = new Ext.Viewport({
    layout:'border',
    items: [
    {
    region:'west',
    collapsible: true,
    split:true,
    layout:'fit',
    width: 500,
    monitorResize: true,
    margins:'0 0 0 0',
    items:new Ext.grid.GridPanel(dataGrid.getOptions())
    },
    {
    split: true,
    region:'center',
    layout:'fit',
    monitorResize: true,
    margins:'0 0 0 0',
    items:_tabs
    }]
    });
    viewport.findById(MY_GRID_ID).setBottomToolbar(myR ealBBar);

    ??


  • WHy the redundant nesting? Why not this:



    var viewport = new Ext.Viewport({
    layout:'border',
    items: [ new Ext.grid.GridPanel(dataGrid.getOptions()), _tabs ]
    });


    Where dataGrid.getOptions included region:'west', collapsible:true, margins '0 0 0 0'

    I assume _tabs is a TabPanel. Just configure it with region:'center'

    No need for this over nesting!

    You have to define an actual, instantiated Ext.Toolbar with that zero-width button in it for the fix to work. Just as shown.
    OPM HR Exchange::
    File Format: PDF/Adobe Acrobat - View as HTMLout of the process so that it will become second nature as we move forward. approval from the Oklahoma Office of Personnel Management to implement a Hard-to-Fill Direct . Oscar Jackson has served on the OK Ethics Compass Award judging panel for 18, 1949, Fisher was admitted to the OU. College of Law.
    http://www.ok.gov/opm/documents/HR Exchange2008-Qtr4.pdf
    HOME

    Yes I've tried that, only to get several errors:
    comp has no properties
    http://ws-creft:8090/pl-console/js/ext/ext-all-debug.js
    Line 13879,
    this.layout.setContainer is not a function
    http://ws-creft:8090/pl-console/js/ext/ext-all-debug.js
    Line 13742

    with this code:
    var viewport = new Ext.Viewport({
    layout:'border',
    items: [new Ext.grid.GridPanel(dataGrid.getOptions()), _tabs]
    });

    where all border-related attributes are in those objects (i.e. region, etc).


  • And when you stopped at the error lines, and traced back through the call stack, where was the undefined value coming from?

    Basically, you have a bug somewhere which you need to find.


  • It seems like Ext's strength is not in dynamic creation of its widgets.Noob statement if I ever heard one /:)

    Have you bothered looking at any of the examples yet ?


  • Well, seberal things wrong there.

    A border layout with one region, and a splitter???

    Wouldn't you make thet Viewport layout:'fit'?

    a GridPanel with a TabPanel as items?

    Can't be done. a GridPanel is a GridPanel and manages a Grid. How is it going to have a TabPanel in it? What would it do with it?

    Fix for zero-height initial tbar follows...


  • After a Panel is rendered, it's constituent elements are created, assigned and layed out.

    If you need a top toolbar, you need to specify the tbar config option.
    Apparatus and method for representing electronic mail - US Patent ::
    They commonly include hard and/or floppy disk drives for storing data and .. Navigation from panel to panel is accomplished by implementing pop-up menus. The description of the contents of each page is depicted as a menu item. In this mode, a user can fill in the address information for each of the fields.
    http://www.patentstorm.us/patents/5752059/description.html
    HOME
    OtakuBoards - Otakon 2008 Fansubs and Industry Panel::
    7 posts - 5 authors - Last post: Sep 10, 2008 entry for any viewers interested in immediate and free access to Japanese content. His goal was to ⠜fill a holeā  and prove fans access to classic 20 to 30-year-old including Nabari no Ou, Hitman Reborn, Bamboo Blade, So, if fighting the demand is hard, Funimation will have to turn to
    http://www.otakuboards.com/showthread.php?t=59399
    HOME

    There is a shortcoming with that in that even though it will create the toolbar element for you, if you specify tbar: (no buttons to start with), it will be zero height. It is best to add buttons that you know are needed.

    1. If the buttons are unknown at creation time, I do have a workaround which involves creating a hidden elemnt which causes the toolbar to have the correct height. Bump this thread tomorrow, and I'll try to find it.

    2. Either keep a reference to it in a variable, or give it an ID by which it can be looked up using Ext.getCmp()

    One of Ext's major strengths is dynamic creation of widgets.

    The situation here, is that a BorderLayout's regions (north, south, center) etc are fixed once it is rendered. You cannot create it with north and center, render it, and then decide that you want a west too.

    Each of these Regions is a Panel. These Panels are Containers, and may have Components added dynamically.

    You can create that "west" Panel, let the Viewport render, and at any time in the future, add a GridPanel into it. You would give the west panel layout:'fit' so that it would size the GridPanel to fit inside itself. Add a Component, call doLayout, and the Component will be rendered by its new parent.

    But why put a Grid in a west Panel? Why not have the Grid as the west Panel itself> Just create it with region:'west' and put it into the Viewport.


  • bbar: new Ext.Toolbar({
    id: thisPanels_id + "-Toolbar",
    buttons: [{
    disabled: true,
    listeners: {
    render: function(b) {
    b.getEl().parent().setStyle({display:'block',width :'0px',overflow:'hidden'});
    }
    }
    }]
    })


  • After a Panel is rendered, it's constituent elements are created, assigned and layed out.

    If you need a top toolbar, you need to specify the tbar config option.

    There is a shortcoming with that in that even though it will create the toolbar element for you, if you specify tbar: (no buttons to start with), it will be zero height. It is best to add buttons that you know are needed.

    1. If the buttons are unknown at creation time, I do have a workaround which involves creating a hidden elemnt which causes the toolbar to have the correct height. Bump this thread tomorrow, and I'll try to find it.

    2. Either keep a reference to it in a variable, or give it an ID by which it can be looked up using Ext.getCmp()

    One of Ext's major strengths is dynamic creation of widgets.

    The situation here, is that a BorderLayout's regions (north, south, center) etc are fixed once it is rendered. You cannot create it with north and center, render it, and then decide that you want a west too.

    Each of these Regions is a Panel. These Panels are Containers, and may have Components added dynamically.

    You can create that "west" Panel, let the Viewport render, and at any time in the future, add a GridPanel into it. You would give the west panel layout:'fit' so that it would size the GridPanel to fit inside itself. Add a Component, call doLayout, and the Component will be rendered by its new parent.

    But why put a Grid in a west Panel? Why not have the Grid as the west Panel itself> Just create it with region:'west' and put it into the Viewport.

    Correct in the adding of the toolbar after rendering will result in an obscured element, I'll hit you up for that fix tomorrow.
    RE: giving the viewport the gridpanel off the bat instead of having a panel that contains a grid panel, it's because I get this error: 'this.layout.setContainer(null);' with this code:



    var viewport = new Ext.Viewport({
    layout:'border',
    items: [
    new Ext.grid.GridPanel(dataGrid.getOptions()),
    {
    split: true,
    region:'center',
    layout:'fit',
    monitorResize: true,
    margins:'0 0 0 0',
    items:new Ext.TabPanel(_tabs)
    }]
    });


    And to the previous poster who wondered aloud as to why I haven't look at the examples, well I have, thoroughly, and none of them really help me that much because A) they're not commented, and the API is not very specific, and B) because they don't do anything complex enough to start me down the correct path. I'm dealing with multiple JSPs merged at render time using sitemesh, including dependent variables across resources which lets others re-use a "data grid on the left details on the right" widget with any json stream... needless to say the examples are cute, but they fail utterly when I run into weird ass problems like I have been, and I need to understand how things work more in-depth.


  • WHy the redundant nesting? Why not this:



    var viewport = new Ext.Viewport({
    layout:'border',
    items: [ new Ext.grid.GridPanel(dataGrid.getOptions()), _tabs ]
    });


    Where dataGrid.getOptions included region:'west', collapsible:true, margins '0 0 0 0'

    I assume _tabs is a TabPanel. Just configure it with region:'center'

    No need for this over nesting!

    You have to define an actual, instantiated Ext.Toolbar with that zero-width button in it for the fix to work. Just as shown.


  • The problem comes when I try specifying a TabPanel as a direct item inside of a viewport with a layout other than the default. For instance:

    var viewPort = new Ext.Viewport({
    layout:'border',
    style:'background-color:transparent;',
    items:
    [dataGrid.getGrid(),
    tabs.getPanel()]
    }});
    Where getGrid() returns a GridPanel with region:'west' and layout:'fit'
    and getPanel returns a valid TabPanel with region:'center' and layout:'fit',
    I get the error 'this.layout.setContainer is not a function'
    HOWEVER
    if I do this:

    var viewPort = new Ext.Viewport({
    layout:'border',
    style:'background-color:transparent;',
    items:
    [dataGrid.getGrid(),
    { region:'center',
    layout:'fit',
    items: tabs.getPanel()}
    ]
    }});

    Then everything renders fine, although there is a 'panel' behind the tabPanel and not the gridPanel.

    I'm not sure how specifying the layout in the tabPanel as opposed to a 'parent container' object makes a difference. These are just some of the problems we're running into. So far we've found ways to 'get around' these quirks.





  • Get Smart About Monitoring Virtual Machines
    Microsoft Gets Ex-Streamly Cozy with U.K.'s MediaWave

    You are looking at:nnkl.com's Why is it so hard to fill ou tpanel contents?, click nnkl.com to home
  • poll what is your skin care routine
  • i want to become more mature
  • what should i do because
  • i smoke and my friends who smoke marijuana say its better for you are they correct or is it worse for you
  • since republicans lost by a landslide why are they still here complaining
  • oils and acrylics can you help please
  • why is 039 x 039 more difficult than 039 y 039 to question and study
  • kidney stone and pain
  • my sister 039 s hamster has marks on him that look like scabs what are they and what can we do
  • wrist surgery complications
  • what is edward s and bella s childs name
  • do you think its weird
  • football fans any picks for a superbowl champion whatcha think
  • why does obama appoint experienced people and then ask them to 039 change 039 to fresh thinking
  •  
  • rabbit help
  • has anybody read the road by cormac mccarthy
  • are ferrets illegal in california
  • who thinks that home alone 3 and 4 were unnecessary
  • females who 039 s the hottest actor
  • what can i do to help my girlfriend with her back problems
  • if you had one more day to live what would you do
  • how can i become beautiful
  • soft pastels and fixative
  • is donnie yen only a foreign actor
  • anybody know any good scary movies
  • why do you like twilight
  • libertarians view on immigration
  • where can i find a website for better painting techniques
  •  Homepage | Add to favorites | Contact us | Exchange links | LOGIN | Site map | 
    Copyright© 2008 nnkl.com        Site made:CFZ