A problem about textbox data binding

asked 2009-12-29 03:33:44 +0800

seantan gravatar image seantan

data binding works well when I key the value into the textbox control, but not works when I call the setValue() method in back bean. Why?

please give me a favor. thanks !

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2009-12-29 05:40:27 +0800

fmcypriano gravatar image fmcypriano
612 1 7

If you mean after you call setValue() the textbox isn't automatically updated, it's because the binding mechanism can't possible know that the model has changed.

Read this thread to learn more about how to use binder.


link publish delete flag offensive edit

answered 2009-12-29 22:25:02 +0800

seantan gravatar image seantan

fmcypriano, thanks for you reply.

I have found the answer!
Because the settext() method do not trigger the data binding actions, so when I added code below the problem has fixed.

Events.sendEvent(new Event(Events.ON_CHANGE,textbox);

link publish delete flag offensive edit

answered 2009-12-31 05:53:50 +0800

robertpic71 gravatar image robertpic71
1275 1

Hi seantan,

you have an resolution, but i prefer a other way to load binding data.

1. the the databinder instance
2. use the binder for extra load

binder.loadAll(); // reload all fields
binder.load(component); // reload all bindings from this component and below

<grid id="detailview">
<label value="@{win$composer.value1}"/>

Component detailview; // autowired

Check here some databinding examples


link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools




Asked: 2009-12-29 03:33:44 +0800

Seen: 507 times

Last updated: Dec 31 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More