Error message when trying to add an image

330 views
Skip to first unread message

arian

unread,
Jun 11, 2012, 6:52:54 AM6/11/12
to Google Web Toolkit
I am trying to add an image to a grid column in Ui Binder and get the
following message.

[ERROR] Not allowed in an HTML context Element

<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui"
xmlns:mcmui="urn:import:com.equillore.mcmexternal.client.ui">
<ui:image field="requiredImage" src="images/
required_indicator.gif"/>

<ui:style type =
"com.equillore.mcmexternal.client.view.StandardDocumentDownloadView.myStyle">



.required

{
gwt-image: 'requiredImage';
font-weight:bold;
width: 7px;
height: 14px;
}

and this is the grid cell.

<g:cell><g:Label addStyleNames="{style.required}"/></g:cell>

Any help perhaps...please

regards

Thomas Broyer

unread,
Jun 11, 2012, 7:30:42 AM6/11/12
to google-we...@googlegroups.com
<g:cell> can only contain HTML. Use <g:customCell> to add a widget.
In your case, I wonder why you don't use a g:Image widget rather than a g:Label with some styling.

arian

unread,
Jun 11, 2012, 7:37:53 AM6/11/12
to Google Web Toolkit
Aha, Thanks allot
Reply all
Reply to author
Forward
0 new messages