For reference, bug is filed here:
http://code.google.com/p/google-web-toolkit/issues/detail?id=5320

On Tue, Sep 28, 2010 at 2:29 PM, Chris Conroy <[email protected]> wrote:

> Andrew,
>
> Sorry for my originally hasty reply. Turns out that the docs aren't clear
> about this at all, but this is a current limitation of <ui:with>
>
> You will have to use something like this, at least for now:
> <ui:Image field="someImage" src="someimage.jpg"/>
> <ui:style>
>   @sprite .x {
>     gwt-image: 'someImage';
>   }
> </ui:style>
>
> We'll be updating the docs on this and looking to enable this use case at
> some point in the future.
>
>
> On Mon, Sep 27, 2010 at 11:54 PM, Andrew Hughes <[email protected]>wrote:
>
>> Thanks Chris, unfortunately that's what I am doing..... but here's an
>> example of what is NOT working to clear things up....
>>
>> EXAMPLE
>>
>> <ui:with field="res"
>> type="com.acme.project.client.resource.AcmeClientBundle"/>
>> <ui:style>
>>  @sprite .x {
>> gwt-image: 'res.someImage'; /** <----- THIS DOES NOT WORK!!!!! *?
>> }
>> </ui:style>
>>
>>
>> Cheers for replying tho :)
>>
>>
>>
>> On Tue, Sep 28, 2010 at 8:24 AM, Chris Conroy <[email protected]> wrote:
>>
>>> Sounds like you need to use <ui:with>
>>>
>>>
>>> http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html#Using_an_external_resource
>>>
>>> On Mon, Sep 27, 2010 at 2:17 AM, Andrew Hughes <[email protected]>wrote:
>>>
>>>> Howdy,
>>>>
>>>> Our ui.xml template styles would like to access some ImageResources
>>>> defined in a ClientBundle.
>>>>
>>>> <ui:with field="res"
>>>> type="com.acme.project.client.resource.AcmeClientBundle"/>
>>>>
>>>>
>>>> But the @sprite's can't ever seem to use
>>>> the ClientBundle's ImageResources from the ui.xml's <ui:style>... for
>>>> example...
>>>>
>>>> <ui:style>
>>>> @sprite .header {
>>>>     gwt-image: "res.companyLogo"; /** DOES NOT WORK*/
>>>> }
>>>> </ui:style>
>>>>
>>>>
>>>> Programatically (i.e. in Java src), I can use AcmeClientBundle's
>>>> ImageResource(s), but they just don't work in the ui.xml :'(
>>>>
>>>> Does anyone have a working example they could please share?
>>>>
>>>> Also, I have ever tried (unsucessfully) to create the image resource
>>>> (again) in the template, but it also does not work and shouldn't be
>>>> necessary anyway.....
>>>>
>>>> <ui:image field="logo"  src="res.companyLogo" />
>>>> <ui:image field="logo"  src="companyLogo" />
>>>> <ui:image field="logo"  resource="res.companyLogo" />
>>>> <ui:image field="logo"  src="res.companyLogo.getURL" />
>>>>
>>>>
>>>> CHEERS :)
>>>>
>>>>  --
>>>> 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]<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]<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