Saturday, May 2, 2015

Re: CellBrowser not displaying (2.1.0) ...(2.4) <

You also need to specify the unit... eg. px, em etc.

Here is the example
CellBrowser browser =new CellBrowser(model,null);
browser.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED);
browser.setHeight("200px");
browser.setWidth("630px");

It should work after this change.

Thanks
Vijay Zala


On Tuesday, July 23, 2013 at 7:56:34 PM UTC+5:30, Salvatore Vitale wrote:

I'm using GWT 2.4. I'm setting width and height on cellBrovser but nothing...i don'y see nothing!
That'is my source:

public void onModuleLoad() {       
        // Add the widgets to the root panel.
       
        //solution 1 : OK
        RootLayoutPanel.get().add(createCellBrowser());
       
        //soluzione 2 : KO
//        RootPanel.get("gwtContainer").add(createCellBrowser());
       
        //soluzione 3 : KO
//        VerticalPanel vp = new VerticalPanel();
//        vp.add(createCellBrowser());
//        RootPanel.get("gwtContainer").add(vp);
       
        //soluzione 4 : KO
//        initWidget(createCellBrowser());
       
        //soluzione 5 : KO
//        VerticalPanel vp = new VerticalPanel();
//        vp.add(createCellBrowser());
//        initWidget(vp);
       
    }

private CellBrowser createCellBrowser(){
        // Create a model for the browser.
        TreeViewModel model =new CustomTreeModel();
        /*
        * Create the browser using the model. We use <code>null</code> as
        * the default value of the root node. The default value will be
        * passed to CustomTreeModel#getNodeInfo();
        */
        CellBrowser browser =new CellBrowser(model,null);
        browser.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED);
        browser.setHeight("200");
        browser.setWidth("630");
        return browser;
    }

I've tried  to set "...extends Composite..." for using initWidget method...but nothing...   :|
I would like set my div conteiner..  :|

Il giorno mercoledì 1 dicembre 2010 16:21:51 UTC+1, John LaBanca ha scritto:
CellBrowser implements RequiresResize, so it needs an unbroken change of parents that all implement ProvidesResize, up to the RootLayoutPanel (not RootPanel).  You can find more documentation about LayoutPanels in the dev guide:
http://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html#LayoutPanels

Alternatively, you can give the CellBrowser an explicit height and width. 

Thanks,
John LaBanca
jlab...@google.com


On Wed, Dec 1, 2010 at 8:34 AM, sevendays <fux...@gmail.com> wrote:
I am having trouble getting a CellBrowser component to display in my
existing GWT 2.1 project. I have tried both CellBrowserExample1.java
and CellBrowserExample2.java, by converting the entry point classes to
VerticalPanels, then adding them to my application. For example, this
is a modified
http://google-web-toolkit.googlecode.com/svn/trunk/user/javadoc/com/google/gwt/examples/cellview/CellBrowserExample2.java:

       public NodeCellBrowser() {
           TreeViewModel model = new CustomTreeModel();

           /*
            * Create the browser using the model. We use <code>null</code>
as the
            * default value of the root node. The default value will be
passed to
            * CustomTreeModel#getNodeInfo();
            */
           CellBrowser browser = new CellBrowser(model, null);

browser.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED);

           // Add the browser to the root layout panel.
           this.add(new Label("This displays fine")); // <-- added by me to
test
           this.add(browser); // nothing displays here
           this.add(new Label("This also displays fine")); // <-- added by
me to test
       }

The symptoms of the problem are:

1) No CellBrowser displays; nothing appears on the screen (i.e. at
this.add(browser)), however the two test labels appear fine.
2) No exceptions appear in the log, client or server
3) I have tried putting logging up to DEBUG but nothing additional is
returned
4) I have tried stepping through the code and the constructor executes
fine for the CellBrowser widget.

My HTML page is set to standards mode; the first line is:

<!doctype html>

I am developing a GWT+GAE solution in Eclipse Helios and running the
application using the embedded test application server.

I am using the incubator PagingScrollTable, therefore have the gwt-
incubator-20101117-r1766.jar in my build path. Is it possible that one
of these incubator components is conflicting with the CellBrowser?

I have also tried creating a clean new standalone GWT 2.1 project, and
running the CellBrowserExample2.java Entry Point class unmodified. It
works fine.

This is quite a frustrating problem because no exceptions make it very
difficult to progress. Any suggestions or recommendations would be
appreciated.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment