Wednesday, February 26, 2014

Re: Where to "setPageSize()" in UiBinder for empty CellTable (GWT)?

Initially set page size is 0 and setData(new ArrayList()) of defined order object,  after fetching data put condition if orderlist.size()<7 than setpagesize(orderlist.size) else setpagesize(7).

And orderlist is null or size is zero,  than assign new array list object as mentioned earlier stage.

Thanks,
Bhumika

On Feb 27, 2014 5:19 AM, "Tom" <HenryHa5@gmail.com> wrote:

I have a CellTable & a SimplePager. I want setPageSize(7) for that cellTable by default at the the time the Page got loaded.

In ui.xml file

<c:SimplePager ui:field="orderListSimplePager" pageSize="7"  />  <c:CellTable ui:field="orderListCellTable" />  

in View.java

@Inject  public OrderManagementView(final Binder binder) {      widget = binder.createAndBindUi(this);  res.css().ensureInjected();      orderListSimplePager.setDisplay(orderListCellTable);  }  

After ran, nothing happened, the simple pager didn't take 7 as pageSize.

Now, i change the code a little bit by put pageSize="7" into <c:CellTable> in Ui.xml In ui.xml file

<c:SimplePager ui:field="orderListSimplePager"  />  <c:CellTable ui:field="orderListCellTable" pageSize="7" />  

Now the above code is working if the CellTable already has data right at the first time the page got initialized. However, if the celltable has no data at the beginning, then it will display a loading message (see image) after initialising the page, which is not good:

enter image description here

Note: I want to setPageSize at ui.xml so i can change it easily.

So, Where to "setPageSize()" in UiBinder for empty CellTable (GWT)?

--
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/groups/opt_out.

--
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/groups/opt_out.

No comments:

Post a Comment