Answered on Stack 
Overflow: 
http://stackoverflow.com/questions/10960553/error-in-adding-an-image-as-a-managed-resourceui-binder

On Saturday, June 9, 2012 1:46:35 PM UTC+2, arian wrote:
>
> Hi there 
>
> I am trying to add an image as a managed resource but am experiencing 
> some difficult and get the error contained in the subject. 
>
> This is mu ui.xml file 
>
> <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent";> 
> <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" 
>                  xmlns:g="urn:import:com.google.gwt.user.client.ui"> 
>         <ui:style type = 
> "com.equillore.mcmexternal.client.ui.IndicatorLabel.Style"> 
>
>         <inherits name="com.google.gwt.resources.Resources" /> 
>                 @sprite 
>
>         .required 
>          { 
>
>             gwt-image: 'requiredImage'; 
>             font-weight:bold; 
>             width: 7px; 
>             height: 14px; 
>         } 
>         .labRequired 
>         { 
>
>                         color:#2E2E2E; 
>                         font-family: Tahoma, Geneva, sans-serif; 
>                         font-size:8pt; 
>                         font-style:normal; 
>                         font-weight:bold; 
>                 } 
>     </ui:style> 
>
>
>     <g:SimplePanel width='120px' height='21px'> 
>     <g:Grid> 
>             <g:row> 
>             <g:customCell> 
>                 <g:Label ui:field="label" 
> addStyleNames="{style.labRequired}"/> 
>             </g:customCell> 
>             <!--  <g:customCell> 
>                 <g:Label addStyleNames="{style.required}"/> 
>             </g:customCell> --> 
>          </g:row> 
>         </g:Grid> 
>         </g:SimplePanel> 
>
>
> </ui:UiBinder> 
>
> and in my java file I added the following code 
>
> public interface myResources extends ClientBundle{ 
>                 @Source ("images/required_indicator.gif") 
>                 ImageResource requiredImage(); 
>
>         } 
>
> My objective is to add this image to the grid. Is this the right why 
> to go about it. ?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/FPewgLTs3MgJ.
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