HZNM.COM
welcome to my space
X
Search:  
 HOME   Table inside TabPanel
Table inside TabPanel
Published by: jane 2009-01-09
Welcome to:hznm.com

  • ContentPanel with FitLayout has Table inside it. Then I add this ContentPanel to TabPanel.
    In IE6 and FF3 I can't see vertical scroll bar in table. I suppose that it is hidden not by overflow: hidden, but it is positioned out of the screen. May be it is caused by
    ul.x-tab-strip {
    display:block;
    width:5000px;
    }


    in ext-all.css


  • this class demonstrates my problem in IE6 and FF3:


    public class Test extends LayoutContainer implements EntryPoint {
    public void onModuleLoad() {
    Viewport v = new Viewport();
    v.setLayout(new FitLayout());
    v.add(this);
    RootPanel.get().add(v);
    }


    private ContentPanel north = new ContentPanel();
    private ContentPanel west = new ContentPanel();
    private ContentPanel center = new ContentPanel();
    private ContentPanel east = new ContentPanel();
    private ContentPanel south = new ContentPanel();

    protected void onRender(Element element, int i) {
    super.onRender(element, i);

    createBorderLayout();

    addTabPanel();
    }

    private void createBorderLayout() {
    setLayout(new BorderLayout());
    tabbox - MDC::
    the tabbox or an element inside it must have the focus tabs , tab , tabpanels , tabpanel . Retrieved from https://developer.mozilla.org/En/XUL/Tabbox
    http://developer.mozilla.org/En/XUL/Tabbox
    HOME

    BorderLayoutData northData = new BorderLayoutData(Style.LayoutRegion.NORTH, 100);
    northData.setCollapsible(true);
    northData.setFloatable(true);
    northData.setSplit(true);
    northData.setMargins(new Margins(5, 5, 0, 5));

    BorderLayoutData westData = new BorderLayoutData(Style.LayoutRegion.WEST, 200);
    westData.setSplit(true);
    westData.setCollapsible(true);
    westData.setMargins(new Margins(5));

    BorderLayoutData centerData = new BorderLayoutData(Style.LayoutRegion.CENTER);
    centerData.setMargins(new Margins(5, 0, 5, 0));

    BorderLayoutData eastData = new BorderLayoutData(Style.LayoutRegion.EAST, 200);
    eastData.setSplit(true);
    eastData.setCollapsible(true);
    eastData.setMargins(new Margins(5));

    BorderLayoutData southData = new BorderLayoutData(Style.LayoutRegion.SOUTH, 100);
    southData.setSplit(true);
    southData.setCollapsible(true);
    southData.setFloatable(true);
    southData.setMargins(new Margins(0, 5, 5, 5));

    add(north, northData);
    add(west, westData);
    add(center, centerData);
    add(east, eastData);
    add(south, southData);
    }

    private void addTabPanel() {
    VerticalPanel panel = new VerticalPanel();
    TabPanel tabPanel = new TabPanel();
    TabItem tabItem = new TabItem("Table");
    tabItem.add(createPagingTable());
    tabPanel.add(tabItem);
    tabPanel.setHeight(400);
    panel.add(tabPanel);

    ButtonBar buttonBar = new ButtonBar();
    buttonBar.setButtonAlign(Style.HorizontalAlignment .LEFT);
    Button deleteAccount = new Button("Hello");
    buttonBar.add(deleteAccount);
    panel.add(buttonBar);
    center.setLayout(new FitLayout());
    center.add(panel);
    }

    public class TestModelData extends BaseModelData {

    public TestModelData() {
    }

    public TestModelData(String value) {
    set("value", value);
    }

    }

    private ContentPanel createPagingTable() {
    List columns = new ArrayList();

    columns.add(new TableColumn("value", "column 1", 100));
    columns.add(new TableColumn("value", "column 2", 100));
    columns.add(new TableColumn("value", "column 3", 100));

    // create the column model
    TableColumnModel cm = new TableColumnModel(columns);
    Table table = new Table(cm);

    table.setBorders(false);
    table.setBulkRender(false);
    table.setHeight(200);

    RpcProxy> proxy = new RpcProxy>() {
    @Override
    protected void load(PagingLoadConfig loadConfig, final AsyncCallback> callback) {
    List result = new ArrayList();
    for (int i = 0; i < 50; i++) {
    result.add(new TestModelData("value" + i));
    }
    BasePagingLoadResult pagingResult = new BasePagingLoadResult(result, 0, 50);
    callback.onSuccess(pagingResult);
    }
    };

    final BasePagingLoader loader = new BasePagingLoader(proxy);
    loader.setRemoteSort(true);
    ListStore store = new ListStore(loader);
    new TableBinder(table, store);

    ContentPanel panel = new ContentPanel();
    panel.setBorders(false);
    panel.setHeaderVisible(false);
    panel.setBodyBorder(false);
    panel.setLayout(new FitLayout());
    panel.setButtonAlign(Style.HorizontalAlignment.CEN TER);

    panel.add(table);

    PagingToolBar pagingToolBar = new PagingToolBar(50);
    pagingToolBar.bind(loader);
    panel.setBottomComponent(pagingToolBar);

    DeferredCommand.addCommand(new Command() {
    public void execute() {
    loader.load(0, 50);
    }
    });

    return panel;
    }

    }


  • If you post some test code I will take a look.





  • How much does getting a small tattoo on your hip/stomach hurt?
    Do anyone else have an itchy anus? ?

    You are looking at:hznm.com's Table inside TabPanel, click hznm.com to home
  • google earth help
  • will a 2gb ddr2 ram be compatible wid my pc
  • dvd writer not playing movies well
  • will 650i bottleneck 9600gt sli
  • vista activation
  • is bsnl blocking torrents
  • buying a new bike
  • laptop help
  • is the dataone usage finder software is genuine
  • gmail account
  • gmail options
  • could someone help urgent
  • which computer course worth its salt
  • about linux
  •  
  • best hd monitor in market
  • where can i get dell india rebate coupons
  • should i change from bsnl to airtel broadband
  • will too much of disk partitions affect hard drives
  • windows xp screwed please help
  • bsnl broadband downtimes
  • system file or virus
  • help can t able to install xp sp2
  • slow speeds with azureus bsnl broadband
  • what is this file
  • what s the use of java in mobiles
  • which bsnll modem to go for
  • adsense not approved
  •  Homepage | Add to favorites | Contact us | Exchange links | LOGIN | Site map | 
    Copyright© 2008 hznm.com        Site made:CFZ