Can anyone tell me what I'm doing wrong here?  g:Image gets an image
URL, but g:upFace just gets a text input field.

ButtonPanel.ui.xml
---------------------------
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
        xmlns:g="urn:import:com.google.gwt.user.client.ui">

        <ui:with field='img' type='test.client.Images'/>

        <g:HTMLPanel ui:field='htmlPanel'>
                <h3>Button panel</h3>
                The image:
                <g:Image resource="{img.saveButton}" />
                <hr />
                The button:
                <g:PushButton ui:field="button">
                        <g:upFace image="{img.saveButton}" />
                </g:PushButton>
        </g:HTMLPanel>
</ui:UiBinder>

ButtonPanel.java
------------------------
public class ButtonPanel extends Composite
{
        interface MyUiBinder extends UiBinder<Widget, ButtonPanel> {}
        private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);

        @UiField PushButton button;

        public ButtonPanel()
        {
                initWidget(uiBinder.createAndBindUi(this));
        }
}

Resulting HTML (part)
-------------------------------
<h3>Button panel</h3>
The image:
<img class="gwt-Image" border="0" style="width: 20px; height: 20px;
background: url(data:image/
png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABCUlEQVR42mP4DwX79+//
X19fTxZevnw5zJj/DN+/f/9vZKr1X9dM4L9PGgNZ2MqT77+0nMj/+/fv/
2cAmQ4SmHmGgSIcXsLyPycv9T9DdFzI//h6BooNLJ7J8N/S1gC7gdb
+DP8NHbFjFQMIBqkh2kCQRlwuARnGwAChqWpgUhMJBsK8BcPI3hWTgxhIkpdhrgBhkAEwcZhhJHsZl4HI4mQbCDMUXYwiA91iGf4HZFHRQJBhFBkIikH0mEbHJMUy1bPe4DIwJS3uf3Ql5QbmTWL47+Rq8Z/
h/Pnz/5U1+f937yTfsP79DP9t/Tn/9/Z1/2cAFds9vW3/
RcT4UJIFKZiXnxNcuIJKfwBn9ylqL8bV6QAAAABJRU5ErkJggg==) no-repeat 0px
0px" src="http://127.0.0.1:8888/gwttest/clear.cache.gif";
onload="this.__gwtLastUnhandledEvent="load";">
<hr>
The button:
<div class="gwt-PushButton" tabindex="0" role="button">
<input type="text" tabindex="-1" style="opacity: 0; height: 1px;
width: 1px; z-index: -1; overflow: hidden; position: absolute;">
</div>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to