Thanks Isaac. I'm going to try this first and see how it goes.
Appreciate the help again. I was aware of the places its called. I
think I did the wrong thing by thinking the reference->hierarchy meant
its going to show overall calls in the project but for that i'd
probably have to choose references->project while hierarchy shows me
only for the current class. Thanks again.
On Nov 18, 12:02 pm, "Isaac Truett" <[EMAIL PROTECTED]> wrote:
> You wouldn't call requestRows(). Ever. PagingScrollTable requests rows
> from the TableModel to display the current page. You don't even need
> to set the current page yourself, because it defaults to page 1. So
> just create the table and add it to your page. If you've written your
> TableModel properly, you'll see the first page of data.
>
> As for where requestRows() gets called, Eclipse tells me it's called
> in 8 places in the Incubator code, including CachedTableModel:1068,
> PagingScrollTable:1187, and TableBulkRenderer:1192. You can set a
> breakpoint and trace through those if you're curious.
>
> On Tue, Nov 18, 2008 at 11:44 AM, Suri <[EMAIL PROTECTED]> wrote:
>
> > Right, and that's exactly what I thought. However, looking at the
> > code, I can't see anywhere where the requestRows belonging to the
> > DataSourceTableModel is called. I tried to do a reference hierarchy on
> > it in eclipse and didn't get any results. So that's really where my
> > question is I guess. So if I wanted to request data remotely, would I
> > be making a call like tableModel.requestRows(..) in the
> > PagingScrollTableDemo class? Is this something that basically was
> > there but was not being used in the current demo?
>
> > Thanks again. I've been feeling pretty dumb about this.
> > Suri
>
> > On Nov 18, 11:11 am, "Isaac Truett" <[EMAIL PROTECTED]> wrote:
> >> DataSourceTableModel lines 114-124 (starting with the "Send RPC
> >> request for data" comment) is where the request for data is sent. When
> >> that call returns successfully, the TableModel callback's
> >> onRowsReady() method is called.
>
> >> On Tue, Nov 18, 2008 at 11:02 AM, Suri <[EMAIL PROTECTED]> wrote:
>
> >> > Hi Isaac,
> >> > What I want to know is,
> >> > 1) Where and how does the data actually get loaded into the table.
> >> > Where is the call that does this? Looking through the PagingScrollDemo
> >> > code I can't seem to isolate that point from where the data is
> >> > retrieved remotely and loaded up into a table. i.e what call triggers
> >> > this action from the PagingScrollTableDemo to finally obtain the data
> >> > and which point in the whole process does it happen. In the case of
> >> > the ScrollTableDemo I see that the onModuleLoaded() method is called
> >> > which seems to be responsible for initializing the data. I was able to
> >> > get the same successfully compiled using my own example, but now when
> >> > trying to understand the PagingScrollTableDemo, I am getting lost as
> >> > to what call is specifically to begin the data retrieval and loading
> >> > into the table.
>
> >> > Thanks for the patience.
>
> >> > Suri
>
> >> > On Nov 18, 10:40 am, "Isaac Truett" <[EMAIL PROTECTED]> wrote:
> >> >> What do you want to know?
>
> >> >> The code you posted yesterday won't even compile, so I imagine you
> >> >> haven't actually implemented anything yet. Why don't you at least get
> >> >> to the point where you have some compilable code and then post
> >> >> questions about that code if you can't get it to work the way you
> >> >> want?
>
> >> >> On Tue, Nov 18, 2008 at 10:28 AM, Suri <[EMAIL PROTECTED]> wrote:
>
> >> >> > 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
>
> ...
>
> 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
-~----------~----~----~----~------~----~------~--~---