Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

A better way to implement this?

clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
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.
So there I was, trapped in the jungle. And at the last minute, I was saved by this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic