ui:with - calling methods with arguments

11 views
Skip to first unread message

Shaik Muhammad

unread,
Jan 20, 2012, 12:57:05 AM1/20/12
to Google Web Toolkit
I want to dynamically set values to a field in uibinder. I am trying
something like this

<ui:with field="valuesStore" type='x.y.client.ValuesStore' />
and the field is set with value like this

<g:Label text='{valuesStore.getValue}'>Name</g:Label>
and the ValueStore has 2 methods

public String getValue(String key) {
return localizedValues.get(key);
}

public String getValue() {
return null;
}
The problem is i am unable to call the getValue(key). I could only
call the no-args method meaning the following is not possible

<g:Label text='{valuesStore.getValue('name')}'>Name</g:Label>
Please clarify if there is a way to achieve this where i can call a
method with arguments passed to it.

Thomas Broyer

unread,
Jan 20, 2012, 5:08:27 AM1/20/12
to google-we...@googlegroups.com
No, there's no way to do what you want from within the *.ui.xml file; just do it in the Java class instead.
Reply all
Reply to author
Forward
0 new messages