I am using gwt uibinder. I want to dynamically set values to a field. 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.
That is not supported, only methods without arguments can be invoked. You are going to have to expose the name
directly as a no args method.
Look at the documentation for FieldReferenceConverter, this describes the syntax used. You can see that there is no support for argument passing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With