UiBinder works with ToggleButton

I like the new GWT2 UiBinder, however it is unclear whether some things are achievable using the declarative user interface style.

For example, ToggleButton accepts only instances of an image during construction (there are no settings for up / down images). As far as I understand, UiBinder works in a JavaBean-like reflective way, where the assigned attributes are mapped to the corresponding setters. Is this style possible with widgets like ToggleButton, where certain attributes must be specified at build time?

<g:ToggleButton ui:field="myBtn"></g:ToggleButton>
+3
source share
3 answers

@Matt : ! , :

<g:ToggleButton ui:field="foo">
    <g:upFace><img src="images/bar.png"/></g:upFace>
</g:ToggleButton>

(, downFace), .

: , ui: image, ?

+3

Try something like this:

<g:ToggleButton>
  <ui:image src="..." />
</g:ToggleButton>
0
source

Source: https://habr.com/ru/post/1726482/


All Articles