Hey Isaac,
Or could you explain a little more about how to use the TableModel?
Thanks
Suri
On Nov 17, 1:25 pm, Suri <[EMAIL PROTECTED]> wrote:
> Hey Isaac,
> Thanks for that information. Based on that let me know what I have
> below is correct
>
> public class TestTableModel extends TableModel<MyBean>
> {
> // code to initialize the RPC service - possibly in a constructor?
>
> public void onRequest()
> {
> // code to use the use the service and make a call
> service.requestRows(request, new
> AsyncCallback<SerializableResponse<MyBean> result>>() {
> public void onFailure(Throwable caught)
> {
> //do something
> callback.onFailure(new Exception....)
> }
> public void onSuccess
> (SerializableResponse<MyBean> result)
> {
> callback.onRowsReady(request, result);
> }
> });
> }
>
> }
>
> public class MyTableDemo
> {
>
> public TesttableModel myTableModel = null;
>
> public void onModuleLoad()
> {
> // code to create/initialize tables
> ....
> scrollTable = createScrollTable(headerTable, dataTable,
> footerTable);
>
> // to retrieve the data remotely and store in the table created
> scrollTable.getTableModel().onRequest();
> }
>
> public void createScrollTable(.....)
> {
> myTableModel = new TestTableModel();
> TableDefinition<MyBean> myTableDef = createTableDefinition();
> MyScrollingTable<MyBean> myScrollTable = new MyScrollingTabel
> (myTableModel, dataTable, headerTable, myTableDef);
> myScrollTable.setFooterTable(footerTable);
>
> }
>
> // the other usual code continues
>
> }
>
> I thought it best to give some sort of example to see if what I'm
> thinking is right. Above you see that I created my own TableModel from
> the existing one.
> Additionally, I showed the snippet of code where the table model is
> added to the scroll table in the TableDemo class.
> And finally in the onModuleLoad method you can see the tableModel
> being accessed and being called to retrieve the data remotely. Is that
> right?
>
> I'm guessing somewhere the onRowsReady method would need to be
> implemented by me? Where would that be? If it isn't expected to be
> implemented by me, then
> how would I end up creating a table when my bean has other objects in
> it as opposed to only primitive data.
>
> Hope that gives you an idea of where my confusion is, since its at
> about 3 places i think :)
>
> Thanks again
>
> Suri
>
> On Nov 17, 10:09 am, "Isaac Truett" <[EMAIL PROTECTED]> wrote:
>
> > Suri,
>
> > PagingScrollTable gets data from a TableModel using a Request/Callback
> > mechanism similar to RPC. The simplest way to get that data from the
> > server would be to implement TableModel and have onRequest() invoke an
> > RPC service. The RPC AsyncCallback's onSuccess() would call the table
> > Callback's onRowsReady().
>
> > - Isaac
>
> > On Mon, Nov 17, 2008 at 9:50 AM, Suri <[EMAIL PROTECTED]> wrote:
>
> > > Hi Isaac,
> > > I understand quite a bit of the code now and how to use it. I set up a
> > > simple example that uses the ScrollTableDemo like code initially to
> > > understand what's going on. However, there is one aspect I'm not able
> > > to understand clearly. Could you possibly help me understand how the
> > > Data is retrieved remotely in the PagingScrollTable. I see a reference
> > > to a DataSourceModel but I'm not sure how/when it gets invoked and
> > > what exactly happens that causes the data to get loaded into the
> > > table?
>
> > > Thanks
> > > Suri
>
> > > On Nov 11, 9:29 am, Suri <[EMAIL PROTECTED]> wrote:
> > >> Aha. I understand now. I guess I went too far in the linked README
> > >> document provided. It needed to be as far as the setting up the
> > >> eclipse section and ignoring the rest from checkstyle onward really
> > >> and then following the additional instructions given in the webpage. I
> > >> got to build the incubator :). Thanks again for your patience Isaac.
> > >> I'm sure I'll be more bothersome now that I can start playing with the
> > >> PagingScrollTable a bit.
>
> > >> Suri
>
> > >> On Nov 10, 5:27 pm, "Isaac Truett" <[EMAIL PROTECTED]> wrote:
>
> > >> > Okay, I see the references to "projects" in the instructions that are
> > >> > causing you alarm. In that context a "project" is an Eclipse project.
> > >> > The GWT project has several distinct Eclipse project configurations
> > >> > within a single SVN repository. The Eclipse setup instructions
> > >> > referenced in step 1 of Setup for Eclipse are actually the
> > >> > instructions for setting up Eclipse to build GWT, not the Incubator.
> > >> > It's having you configure CheckStyle, set formatting rules, and other
> > >> > things that probably won't matter if you aren't contributing code. If
> > >> > you want to contribute changes (and you're certainly encouraged to do
> > >> > so!) then you'll want to get the nit-picky formatting details right,
> > >> > but otherwise you don't need to bother with that.
>
> > >> > And if all you want to do is run Ant, you don't even need to setup
> > >> > Eclipse.
>
> > >> > On Mon, Nov 10, 2008 at 5:02 PM, Suri <[EMAIL PROTECTED]> wrote:
>
> > >> > > Hi Ken,
> > >> > > I was following that and then as shown in the link there for setting
> > >> > > up for eclipse:
> > >> > > " 1.Follow the instructions here to set up your eclipse environment.
> > >> > > "
>
> > >> > > I downloaded the readme file from the link. And while following that,
> > >> > > Around Line 104 in the file you'll see that it mentions instructions
> > >> > > to download GWT core projects.
> > >> > > This is where I became hesistant to continue. Also from the
> > >> > > instructions in setting up Eclipse:
>
> > >> > > "4 If you not on Windows, you will need to fix the gwt-dev project
> > >> > > reference
>
> > >> > > 1. Right click on the new incubator project in the explorer and
> > >> > > choose Properties
> > >> > > 2. Java Build Path
> > >> > > 3. Under the Projects tab, replace gwt-dev-windows as appropriate "
>
> > >> > > Isn't that again talking about using the gwt-dev-windows project and
> > >> > > not jar?
>
> > >> > > But if what you say is true and all I need is the GWT Tools section
> > >> > > (By section I again presume you are talking about the GWT tools
> > >> > > project which is mentioned to be checked out from SVN in the
> > >> > > beginning
> > >> > > of the Making Incubator Better page), then would it be as simple as
>
> > >> > > 1) Setting the GWT_ROOT (to GWT incubator )
> > >> > > 2) Setting the GWT_TOOLs (to GWT Tools)
> > >> > > 3) JDK_HOME
>
> > >> > > And then finally running my ant?
>
> > >> > > Thanks for the patience.
>
> > >> > > Suri
>
> > >> > > On Nov 10, 4:48 pm, "Isaac Truett" <[EMAIL PROTECTED]> wrote:
> > >> > >> > I hope I'm not wrong in my observations?
>
> > >> > >> No, you're absolutely right. The gen2 widgets are new and did not
> > >> > >> exist in the last Incubator release.
>
> > >> > >> > what concerns me was the additional
> > >> > >> > projects that I really have no idea about that I'm having to
> > >> > >> > download
> > >> > >> > to get the incubator compiled.
>
> > >> > >> Are you following the instructions in the Making Incubator Better
> > >> > >> section of the wiki (link below)? The only other download you should
> > >> > >> need is the tools section of the main GWT project, which has
> > >> > >> libraries
> > >> > >> required to build GWT and the Incubator.
>
> > >> > >>http://code.google.com/docreader/#p=google-web-toolkit-incubator&s=go...
>
> > >> > >> On Mon, Nov 10, 2008 at 4:34 PM,Suri<[EMAIL PROTECTED]> wrote:
>
> > >> > >> > Hi Issac,
> > >> > >> > Thanks for the info. I did actually go ahead and download that
> > >> > >> > jar a
> > >> > >> > few days ago. However, that seems to be a different version from
> > >> > >> > what
> > >> > >> > is available in the trunk. It seems to be all 1.x version as
> > >> > >> > opposed
> > >> > >> > to the gen2 stuff. For example, I had gone through the sample for
> > >> > >> > the
> > >> > >> > PagingScrollTableDemo from the code I had checked out from the
> > >> > >> > SVN,
> > >> > >> > and then wanted to start using the idea in my own code. The very
> > >> > >> > first
> > >> > >> > import of the FlexTable which in the SVN version is referenced as:
>
> > >> > >> > import com.google.gwt.gen2.table.override.client.FlexTable;
>
> > >> > >> > actually turns out to be in the
>
> > >> > >> > import
> > >> > >> > com.google.gwt.widgetideas.table.client.overrides.FlexTable;
>
> > >> > >> > I hope I'm not wrong in my observations?
>
> > >> > >> > Thanks for any input. Additionally, I don't mind building from the
> > >> > >> > trunk for incubator, however what concerns me was the additional
> > >> > >> > projects that I really have no idea about that I'm having to
> > >> > >> > download
> > >> > >> > to get the incubator compiled. For now, lets say I did actually
> > >> > >> > continue with the september version of the jar, I was ideally
> > >> > >> > hoping
> > >> > >> > to use the gen2 code because I think that's where the improved
> > >> > >> > PagingScrollTable lies correct?
>
> > >> > >> >Suri
>
> > >> > >> > On Nov 10, 3:37 pm, "Isaac Truett" <[EMAIL PROTECTED]> wrote:
> > >> > >> >>Suri,
>
> > >> > >> >> You do not need to download the GWT project and build it from
> > >> > >> >> trunk in
> > >> > >> >> order to build the Incubator.
>
> > >> > >> >> If you prefer an older Incubator build, you can download one
> > >> > >> >> here:
>
> > >> > >> >>http://code.google.com/p/google-web-toolkit-incubator/downloads/list
>
> > >> > >> >> Please keep in mind that the most recent build currently
> > >> > >> >> available is
> > >> > >> >> from September. The Incubator classes evolve quickly; I always
> > >> > >> >> recommend building from trunk so that you can get the latest
> > >> > >> >> updates.
>
> > >> > >> >> - Isaac
>
> > >> > >> >> On Mon, Nov 10, 2008 at 3:21 PM,Suri<[EMAIL PROTECTED]> wrote:
>
> > >> > >> >> > Hi Issac
> > >> > >> >> > I'm trying to set up the GWT Incubator project. Do I need to
> > >> > >> >> > have the
> > >> > >> >> > GWT source code checked out as well?
> > >> > >> >> > All I'd like really is the incubator jar file. Isn't there any
> > >> > >> >> > other
> > >> > >> >> > way of obtaining that other than checking
>
> ...
>
> read more »
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---