On Jan 6, 6:20 pm, GAbraham <[email protected]> wrote: > I am trying to access an inline Style in a programmatic way. I have > tried following the example in the developer guide. > > "From .xml file" > <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' > xmlns:g='urn:import:com.google.gwt.user.client.ui'> > > <ui:style type='NotImportant.UserWidgetStyles'> > .test{background-color: red} > > </ui:style> > > <g:HorizontalPanel ui:field='listValuePanel'> > <g:Label ui:field='fName' /> > <g:Label ui:field='lName' /> > </g:HorizontalPanel> > </ui:UiBinder> > > "From .java file" > interface UserWidgetBinder extends UiBinder<Widget,UserWidget> {} > private static UserWidgetBinder uwBinder=GWT.create > (UserWidgetBinder.class); > > interface UserWidgetStyles extends CssResource{ > String test(); > } > > @UiField Label fName; > > @UiField UserWidgetStyles stylegetter; > > @UiField HorizontalPanel listValuePanel; > > @UiField Label lName; > > The error I am getting is: > no ui:field attribute for NotImportant.UserWidget#stylegetter > > I believe I have followed the example correctly. Do I need to > explicitly indicate a binding in the xml file for the stylegetter?
Either this, or naming your field 'style', as this is the default for <ui:style> when not explicitly set. > If so how do I do this? <ui:style field="stylegetter" type="NotImportant.UserWidgetStyles">
-- 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.
