Hi Magius,

It cannot be explained more than this.. :-)
Thanks alot for help.

Let me try this out and get back to you tomorrow..

Thanks again.
suren

On May 19, 4:18 pm, Magius <[email protected]> wrote:
> When I tested gids performance, it was acceptable the RPC time but
> really slow the DOM manipulation (Grid population), specially with old
> browser like IE6 that were not designed for Ajax&JS.
>
> In the OnSuccess you can store the data and to create a
> DefferedCommand to populate de Grid:
>
> ...
> OnSuccess( Object o) {
>     data = o
>     currentRow = 0
>     DeferredCommand.addCommand(
>                 new Command( ) {
>                        public void execute( ) {
>                              populateGrid( )
>                       }
>                 }
>     }
> ...
>
> populateGrid( ) {
>      populate currentRow
>      currentRow += 1
>      if( currentRow < totalNumberOfRows ) {
>         DeferredCommand.addCommand(
>                 new Command( ) {
>                        public void execute( ) {
>                              populateGrid( )
>                       }
>                 }
>         }
>      }
>
> }
>
> "populate currentRow" could be to update 1 row of the grid, or 1 row
> of a new invisible grid, ....
>
> On May 19, 12:08 pm, Suren <[email protected]> wrote:
>
>
>
> > Hi Magius,
>
> > I am loading 100x80 cells in the beginning and updating the changed
> > cells in the during my refresh.
>
> > >How many time takes the Grid loading (100x80 = 8000 cells)? Probably some 
> > >seconds.
>
> > This is taking some 30 seconds for me to get my grid with data. I am
> > loading checkbox widgets based on the data..thats also some reason for
> > this 30 seconds delay.
>
> > >While loading the new grid, the browser freezes and didn't repaint its 
> > >window (it's monothread).
> > >Seems to be this the problem?
>
> > Yes you are right, its my problem,
>
> > >you can store the data and update it line by
> > >line using calls to DefferedCommand.
> > >This is a mechanism to sent tasks to the browser to do when he's idle,
> > >after he has repainted the screen
>
> > Thats some sort of the thing which I am looking for a long time..how
> > can I implement it..say like..
>
> > I have my arraylist of data with me in my AsyncCallback onSuccess
> > method. Currently I am trying to populate the Grid in the onSuccess
> > method itself.
>
> > So according to you..instead you asked me to move the code for the
> > Grid population to Deferred command.
>
> > Could you please explain, How can I do that?
>
> > Thanks to all again
> > Suren
>
> > On May 19, 2:57 pm, Magius <[email protected]> wrote:
>
> > > Hi,
>
> > > I think your 1st approach is the correct and that you don't need to
> > > have 2 RPCs.
> > > How many time takes the Grid loading (100x80 = 8000 cells)? Probably
> > > some seconds.
> > > While loading the new grid, the browser freezes and didn't repaint its
> > > window (it's monothread).
> > > Seems to be this the problem?
>
> > > If this is the problem, you can store the data and update it line by
> > > line using calls to DefferedCommand.
> > > This is a mechanism to sent tasks to the browser to do when he's idle,
> > > after he has repainted the screen.
>
> > > On May 18, 10:13 am, Suren <[email protected]> wrote:
>
> > > > Hi,
>
> > > > Thanks for the reply. Yes I do agree thats not possible now..
>
> > > > But my requirements are making me to think such stupid things..
>
> > > > Here is what I am trying to do..
>
> > > > I have an already defined RPC, which I am using to fetch DB values
> > > > returned to my client.  And in the client, I am populating the data
> > > > into a Grid with 100 rows and 80 columns.
>
> > > > Now my pblm is to refresh that Grid in a regular interval..
>
> > > > My assumption and what I 've done :
> > > > If I call that same RPC inside a timer to update the Grid every 2
> > > > minutes.. I wanted to do this process in a background. So I am
> > > > populating the data into a different Grid anyway...once thats done, I
> > > > can assign the refreshed Grid to the old Grid. So that user can have
> > > > feel that the Grid is refreshed without any issues..
>
> > > > This is what happend :
> > > > Eventhough I am trying to populate into a new Grid, my previously
> > > > populated Grid is also affected..My Grid Display is lost..Only after
> > > > that population is done,..the grid is visible to the user..
>
> > > > so what I thought was..If I can use a different RPCs for initial
> > > > population and further refresh..this wont happen..
>
> > > > But I couldnt have two RPCs in a single client...servlet path and
> > > > mapping issues..
>
> > > > So I thought of asking such question here..
>
> > > > I had already posted this pblm before in this forum..this can be an
> > > > extension to that...
>
> > > >http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...
>
> > > > I have put enough effort for this already..
>
> > > > Kindly help me
>
> > > > Thanks
> > > > Suren
>
> > > > On May 18, 12:40 pm, Salvador Diaz <[email protected]> wrote:
>
> > > > > Hi,
>
> > > > > > inhertiance can I call a method defined in the server class??
>
> > > > > Well, the class is located in the server, I'm not sure how you imagine
> > > > > the client-side javascript would call a java method in a class that it
> > > > > is not aware of.
>
> > > > > > The reason why I am asking / thinking like this because, I am 
> > > > > > thinking
> > > > > > of accessing methods in two different server classes
>
> > > > > And why can't you use normal RPC for this? (Hint: you can)
>
> > > > > Cheers,
>
> > > > > Salvador
>
> > > > > On 18 mai, 08:49, Suren <[email protected]> wrote:
>
> > > > > > Hi All,
>
> > > > > > I have a question here...My sincere apologies if it sounds odd ( I
> > > > > > knew it will :-) )
>
> > > > > > I have a method defined in a server class, I want to access that
> > > > > > methodfrom my client but not through RPC. Just like normal JAVA
> > > > > > inhertiance can I call a method defined in the server class??
>
> > > > > > The reason why I am asking / thinking like this because, I am 
> > > > > > thinking
> > > > > > of accessing methods in two different server classes
>
> > > > > > how is that possible?
>
> > > > > > Thanks
> > > > > > Suren- Hide quoted text -
>
> > > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to