I don't understand why you would face a problem.

Isn't your json response like this
{ cell5:bigtoe,
  cell12:smalltoe
}

so that, you know which cell to update when the response comes back.
And you might even consider a similar param-value pair json structure
when the client sends the request to the server. The client would send
the server the name-value pair, so that the server knows what param
name it is processing and then responds to the client with a similar
name-value pair structure so that the client knows where to place the
answers. You should study the structural flexibilities of json to
exploit it to carry sufficient information to process that
information.

If a simple structure is insufficient, deepen the depth of
information, like:
{
  cell5: {
    datetime: 123435465,
    status: "old"
    value: "no eye deer",
  },
  cell9: {
    datetime: 123438444,
    status: "stale"
    value: "bad eye deer",
  }
}

Or, if you wish to save network traffic, just use arrays, knowing the
sequence is [datetime, status, value].
{
  cell1: ["123435465", "old", "no eye deer"],
  cell9: ["123438444", "stale", "bad eye deer"]
}

Therefore, you would have to use a proper json parser in php, capable
of converting json to data structure, to do effective work on a web
app.

I prefer to use Java on both client and server side with GWT RPC. I
could have a data structure (serializable of course)
class Cell{
  int row, column;
  String value;
}

And the GWT compiler would facilitate the alignment of this data
structure on both sides.

The data structure I usually use for non tabular data is

interface ParameterValues
implements RemoteService{
  Map<String, String> getValues(Map<String, String> paramReq);
}

which is equivalent to a json name-value pair structure.


On May 18, 1:54 pm, dino <dinos...@gmail.com> wrote:

> for explaining it better:
> at startup my applications does a get request on all.php witch parses
> every record in my database in one json chunk. on client side I parse
> the json string and fill it into textboxes in a flextable.
> while you are typing in the textboxes from the flextable filled with
> records he updates the database. so when you type "a" an event gets
> triggered, a post request build up and sended to the server. when you
> then type "b"(making the textbox contain "ab") it again builds a
> command an posts it in the database. but because of my requests are
> asynchronously I have little chance the "ab" update command arrives
> sooner and making the result in my database "a".
>
> how can I bypass it?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to