Thursday, October 3, 2013

Re: Load on demand - table \ grid

Sounds like you want to check out DataGrid + AsyncDataProvider + SimplePager.

http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwDataGrid

-- J.

--
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.

Load on demand - table \ grid

Hi,
We're examining GWT for our next generation project.
We would like to create a simple table \ grid that will represent a database table.
What we want to do is to populate this table\grid with our database data.

Our tables are very big (~2 Million rows)

and therefore our requirements from the table\grid are:
1) to load on demand the results
2) to support pagination
3) do both automatically

Is there any quick way for us to experiment with such an example?
any code links \ references will be helpful.
thanks!

--
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.

Re: Passing Object Literal to Javascript method ?

Fluent api, nicee....Thanks for your ideas.

--
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.

Re: Passing Object Literal to Javascript method ?

I would build it like:

Mutable version:

class Options extends JavaScriptObject {
   public native Options with(String option, String value) /*-{
      this[option] = value;
      return this;
   }-*/;
}

Options options = Options.createObject()
    .with("opacity", "0.5")
    .with("width", "100");



An immutable Options class would also be possible but as it is GWT you are dealing with things are never really immutable thanks to JSNI magic. Using JSNI magic you could hide the JavaScriptObject from Java code but still use it inside your perform() method, e.g.

class Options {
   private JavaScriptObject nativePeer;

   // Builder class having the "with(.., ..)" method and which configures the native peer

   // getter, etc. to inspect the native peer if needed.
}

public native CssHolder perform(Element e, int duration, Options options) /*-{
   var nativeOptions = options.@<full qualified class name>::nativePeer;
   return $wnd.CssMod.perform(e, duration, nativeOptions);
}-*/;



-- J.

--
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.

Re: Passing Object Literal to Javascript method ?

Played some more and I create a literal Js Object, or some called Option Js object, like this:


private JavaScriptObject createOptions(final String name, final String value) {
return addOptions(JavaScriptObject.createObject(), name, value);
}

private native JavaScriptObject addOptions(final JavaScriptObject obj, final String name, final String value) /*-{
obj[name] = value;
return obj;
}-*/;

So use it like:
 options = createOptions("opacity", "0.5");

Or
options = JavaScriptObject.createObject();
addOptions("opacity", "0.5");
addOptions("width", "100");

Works well... what do you think?
I will probably create a Factory/Facade that offers both options: through Json String data, or directly through JavascriptObject.

--
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.

Re: Passing Object Literal to Javascript method ?


@Jens: thanks, I am going for the latter options, that seems to work well and safe. 
The builder pattern was exactly why I want the above construction ;)  (using the GWT css classes for the naming)

I am just considering if directly creating a JavascriptObject through a Builder class wouldn't be better considering performance, as it will skip the Json parsing. 
I am just not sure how to do this, looking in to it now. If you have any idea, let me know please.

--
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.

Re: DateBox DatePicker popup is not showing up!

Thanks a ton !! This was a life saver :) 

On Monday, June 1, 2009 1:10:35 AM UTC+5:30, John_Idol wrote:
my BAD --> had a look with firebug and it was there behind the rest of
the stuff, I just had to define the following css class:

.dateBoxPopup {
        z-index: 100;
        }

On May 31, 8:32 pm, John_Idol <giovanni.id...@gmail.com> wrote:
> When I said *this* example I meant to include the link but I didn't --
>
> >http://gwt.google.com/samples/Showcase/Showcase.html#CwDatePicker
>
> On May 31, 8:30 pm, John_Idol <giovanni.id...@gmail.com> wrote:
>
>
>
> > Hi All,
>
> > I am following this example and the example in the DateBox
> > specification - so I have smt like this in my OnModuleLoad:
>
> >   public void onModuleLoad() {
> >     _dateBox = new DateBox();
> >     _dateBox.setValue(new Date());
> >     RootPanel.get().add(_dateBox);
> >   }
>
> > Problem is when I click on the DateBox nothing happens - I'd expect
> > the popup with the DatePicker to show up (this is happening on hosted
> > browser (IE), chrome and firefox).
>
> > Is there any init step I am missing?
>
> > I tried a search on this group but couldn't find anything similar
>
> > Any help 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/groups/opt_out.