Re: Binding Style Fields with UiBinder

2010-01-07 Thread GAbraham
That solution works. Thanks for clarifying how to bind styles.

-George

On Jan 7, 3:39 am, Thomas Broyer t.bro...@gmail.com wrote:
 On Jan 6, 6:20 pm, GAbraham george.iykara.abra...@gmail.com 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 UiBinderWidget,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 google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.




Binding Style Fields with UiBinder

2010-01-06 Thread GAbraham
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 UiBinderWidget,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? If
so how do I do this? If not does anyone see what I am doing wrong?

Thanks for any help you can give.

-George
-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.