GWT. How can I get data from client-side.

Please, explain me how can i get data from component’s client-side. All examples that I find, explain how send data from server-side to client-side (shared state). But " Shared state objects are only sent from the server to the client, and any modifications from the client should be performed via an RPC call that modifies the authoritative state on the server."

For example, I create composite widget with TextBox and some other components, server side is TexField. What I have to do to metod getValue() return “text” from TextBox? Do I have to add Listener In Connector class and use RPC or exists best way?

  1. If you have a composite widget on the client side, you must be having a custom “MyComponent” on server side (NOT TextField).
  2. And inside the Connector (client side) use RPC to transfer the text field widget’s value to the server side (eg. updareTextFieldValue(textWidget-Value) )
  3. You can call this server rpc automatically on widget text change

Hope it helps.