Helo!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xml:lang="it" dir="ltr"
                xmlns="http://www.w3.org/1999/xhtml";
                xmlns:ui='urn:ui:com.google.gwt.uibinder'
                xmlns:gwt='urn:import:com.google.gwt.user.client.ui'>

        <head>
                <title>Use case for GWT + UiBinder + XHTML</title>
                <script type="text/javascript" src=
"mymodule/mymodule.nocache.js"></script>
        </head>

        <body>
                <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex
='-1'
                        style="position: absolute; width: 0; height: 0;border
: 0"></iframe>

                <div id="sample_content_1">
                        <!-- same example of the hello world -->
                        <ui:UiBinder>
                                <div>
                                        Hello, <span ui:field='nameSpan'/>.
                                </div>
                        </ui:UiBinder>
                </div>

                <div id="sample_content_2">
                        <!--
                                creating a declarative layout for an app,
intended to produce a layout
                                similar to
http://gwt.google.com/samples/Showcase/Showcase.html#CwVerticalPanel
                        -->
                        <ui:UiBinder>
                                <gwt:VerticalPanel spacing="5" debugId=
"cwVerticalPanel">
                                        <gwt:Button text="Button 1" />
                                        <gwt:Button text="Button 2" />
                                        <gwt:Button text="Button 3" />
                                        <gwt:Button text="Button 4" />
                                        <gwt:Button text="Button 5" />
                                        <gwt:Button text="Button 6" />
                                        <gwt:Button text="Button 7" />
                                        <gwt:Button text="Button 8" />
                                        <gwt:Button text="Button 9" />

                                </gwt:VerticalPanel>
                        </ui:UiBinder>
                <div>
        </body>
</html>




//////////////////////////////////////////////////////////



2010/6/26 giannisdag <[email protected]>

> Hi I am trying to use uibinder to add an image in my web page using
> clientbundle. Following the paradigm "Using an external resource" of
> the documentation "Declarative Layout with UiBinder", I wrote the
> following:
>
>        <ui:with field='res'
> type='xel.villaView1.client.villaViewClientBundle'/>
>        <g:DockLayoutPanel unit='EM'>
>                  <g:north size='14'>
>                    <g:HTMLPanel>
>                      <div class="titleblock">
>                                <div id="logo"><img
> src="/images/dolphin.gif"/></div>
>                                        <div id="langMenu"><g:Image
> resource="res.bedroom" ></g:Image> </
> div>
>                                        <h1 id="mainTitle"><ui:msg
> description="Main Title">Main title</
> ui:msg></h1>
>                      </div>
>                    </g:HTMLPanel>
>
> I have created a clientbundle using eclipse,
>
> public interface villaViewClientBundle extends ClientBundle {
>
>        static villaViewClientBundle INSTANCE =
> GWT.create(villaViewClientBundle.class);
>
>        ImageResource el();
>
>        @Source("xel/villaView1/client/design/images/photos/bedroom.jpg")
>        ImageResource bathroom();
>
> }
>  but when I run it, I am getting the following message:
>  Cannot parse value: "res.bedroom" as type ImageResource
> What do you think?
>
> --
> 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]<google-web-toolkit%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
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