• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

A better way to implement this?

 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.
I use GWT to implement "Manage Shopping Cart" case.
To display cart's contents, I use FlexTable.
--------------
Item name | delete link
--------------
In order to delete an item, I send item's name along with the current
row of the table to the RPC service.
The service deletes the item and returns row's value back to the client.
Then I have this call:
contentsFlexTable.removeRow(row);
The problem with this approach is :
Suppose I have two rows in the table, row #1 and row #2
And suppose I deleted row #1 first, this works.
The current row value for row #2 is "1"
So, clicking on delete link of row #2 will remove the item from datasouce,
but this doesn't remove the row from FlexTable.
How to over come this problem?
Do you suggest a better approach?
Assume I don't pass row's value to the service, how would I know which
row to remove upon clicking on delete?
Thanks in advance.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic