Re: UiBinder, can't even get to first base

2010-01-07 Thread John
On Wed, Jan 6, 2010 at 10:17 PM, Arthur Kalmenson arthur.k...@gmail.com wrote:
 That's correct, but only for regular HTML Elements, not GWT widgets.
 If you want to set CSS class names on GWT widgets using UI binder you
 need to use the methods I mentioned.


 A, I finally got it.  I wish I hadn't wasted so much time reading
tutorials and other helpful guides.  The real scoop is right here:

http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/user/client/ui/UIObject.html#setStyleName%28java.lang.String%29
-- 
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.




Re: UiBinder, can't even get to first base

2010-01-07 Thread Arthur Kalmenson
hehe, I did mention that above.

--
Arthur Kalmenson



On Thu, Jan 7, 2010 at 11:01 AM, John nesre...@gmail.com wrote:
 On Wed, Jan 6, 2010 at 10:17 PM, Arthur Kalmenson arthur.k...@gmail.com 
 wrote:
 That's correct, but only for regular HTML Elements, not GWT widgets.
 If you want to set CSS class names on GWT widgets using UI binder you
 need to use the methods I mentioned.


  A, I finally got it.  I wish I hadn't wasted so much time reading
 tutorials and other helpful guides.  The real scoop is right here:

 http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/user/client/ui/UIObject.html#setStyleName%28java.lang.String%29

 --
 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.




-- 
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.




UiBinder, can't even get to first base

2010-01-06 Thread John
I thought I'd try to figure out UiBinder, but I'm lost.  Played with
various tutorials and examples and finally I have striped things down
to what I believe is the bare minimum.

It started as the standard Eclipse plugin generated application, and I
have discarded virtually everything.

What's left is:

public class TestUi implements EntryPoint {

@UiTemplate(TestUi.ui.xml)
interface TestBinder extends UiBinderVerticalPanel, TestUi { }
private static TestBinder testBinder = GWT.create(TestBinder.class);

public void onModuleLoad() {

VerticalPanel vp = testBinder.createAndBindUi(this);
RootPanel.get().add(vp);
}
}
--
ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
 xmlns:g='urn:import:com.google.gwt.user.client.ui'

ui:style
.pretty { background-color: pink; }
/ui:style

g:VerticalPanel class='{style.pretty}' 
/g:VerticalPanel

/ui:UiBinder
-
?xml version=1.0 encoding=UTF-8?
module rename-to='testui'
  !-- Inherit the core Web Toolkit stuff.--
  inherits name='com.google.gwt.user.User'/

  inherits name='com.google.gwt.user.theme.standard.Standard'/

  !-- Other module inherits  --
  inherits name=com.google.gwt.uibinder.UiBinder /
  !-- Specify the app entry point class. --
  entry-point class='com.axxessible.testui.client.TestUi'/

  !-- Specify the paths for translatable code--
  source path='client'/

/module
-
errors during compile, the lines below are in exactly the sequence shown:
Invoking com.google.gwt.dev.javac.standardgeneratorcont...@45800894
   [ERROR] In g:VerticalPanel class='{style.pretty}',
class VerticalPanel has no appropriate setClass() method
   [ERROR] Errors in
'file:/home/john/workspace/TestUi/src/com/axxessible/testui/client/TestUi.java'
  [ERROR] Line 32:  Failed to resolve
'com.axxessible.testui.client.TestUi.TestBinder' via deferred binding

If I take out the class='' out of the g:VerticalPanel then it
compiles.  But if it's a panel widget, it should be able to set a
background-color, no?
I already know I'm doing something incredibly stupid, so I don't mind
if you skip telling me that part, and just tell me what it is!!
Thanks.

John
-- 
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.




Re: UiBinder, can't even get to first base

2010-01-06 Thread Arthur Kalmenson
If you want to set the class name you need to use styleName or
addStyleNames instead of class.

Hope that helps.
--
Arthur Kalmenson



On Wed, Jan 6, 2010 at 3:04 PM, John nesre...@gmail.com wrote:
 I thought I'd try to figure out UiBinder, but I'm lost.  Played with
 various tutorials and examples and finally I have striped things down
 to what I believe is the bare minimum.

 It started as the standard Eclipse plugin generated application, and I
 have discarded virtually everything.

 What's left is:

 public class TestUi implements EntryPoint {

       �...@uitemplate(TestUi.ui.xml)
        interface TestBinder extends UiBinderVerticalPanel, TestUi { }
        private static TestBinder testBinder = GWT.create(TestBinder.class);

        public void onModuleLoad() {

                VerticalPanel vp = testBinder.createAndBindUi(this);
                RootPanel.get().add(vp);
        }
 }
 --
 ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
             xmlns:g='urn:import:com.google.gwt.user.client.ui'

 ui:style
 .pretty { background-color: pink; }
 /ui:style

 g:VerticalPanel class='{style.pretty}' 
 /g:VerticalPanel

 /ui:UiBinder
 -
 ?xml version=1.0 encoding=UTF-8?
 module rename-to='testui'
  !-- Inherit the core Web Toolkit stuff.                        --
  inherits name='com.google.gwt.user.User'/

  inherits name='com.google.gwt.user.theme.standard.Standard'/

  !-- Other module inherits                                      --
  inherits name=com.google.gwt.uibinder.UiBinder /
  !-- Specify the app entry point class.                         --
  entry-point class='com.axxessible.testui.client.TestUi'/

  !-- Specify the paths for translatable code                    --
  source path='client'/

 /module
 -
 errors during compile, the lines below are in exactly the sequence shown:
 Invoking com.google.gwt.dev.javac.standardgeneratorcont...@45800894
               [ERROR] In g:VerticalPanel class='{style.pretty}',
 class VerticalPanel has no appropriate setClass() method
   [ERROR] Errors in
 'file:/home/john/workspace/TestUi/src/com/axxessible/testui/client/TestUi.java'
      [ERROR] Line 32:  Failed to resolve
 'com.axxessible.testui.client.TestUi.TestBinder' via deferred binding

 If I take out the class='' out of the g:VerticalPanel then it
 compiles.  But if it's a panel widget, it should be able to set a
 background-color, no?
 I already know I'm doing something incredibly stupid, so I don't mind
 if you skip telling me that part, and just tell me what it is!!
 Thanks.

 John

 --
 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.




-- 
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.




Re: UiBinder, can't even get to first base

2010-01-06 Thread John
On Wed, Jan 6, 2010 at 5:26 PM, Arthur Kalmenson arthur.k...@gmail.com wrote:
 If you want to set the class name you need to use styleName or
 addStyleNames instead of class.


In the older GWT versions, I know you set the stylename and used a
conventional CSS style sheet with those names.

I thought UIBinder was a whole new thing--I was trying to follow the
tutorials as closely as possible, and they inserted class=, which
is one of the standard ways of marking CSS styles, isn't it?

John
-- 
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.




Re: UiBinder, can't even get to first base

2010-01-06 Thread Arthur Kalmenson
That's correct, but only for regular HTML Elements, not GWT widgets.
If you want to set CSS class names on GWT widgets using UI binder you
need to use the methods I mentioned.

--
Arthur Kalmenson

On Wednesday, January 6, 2010, John nesre...@gmail.com wrote:
 On Wed, Jan 6, 2010 at 5:26 PM, Arthur Kalmenson arthur.k...@gmail.com 
 wrote:
 If you want to set the class name you need to use styleName or
 addStyleNames instead of class.


 In the older GWT versions, I know you set the stylename and used a
 conventional CSS style sheet with those names.

 I thought UIBinder was a whole new thing--I was trying to follow the
 tutorials as closely as possible, and they inserted class=, which
 is one of the standard ways of marking CSS styles, isn't it?

 John


-- 

--
Arthur Kalmenson
-- 
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.




Re: UiBinder, can't even get to first base

2010-01-06 Thread John
On Wed, Jan 6, 2010 at 10:17 PM, Arthur Kalmenson arthur.k...@gmail.com wrote:
 That's correct, but only for regular HTML Elements, not GWT widgets.
 If you want to set CSS class names on GWT widgets using UI binder you
 need to use the methods I mentioned.


Arthur, thanks.  Someplace I saw some debate about whether UI Binder
was worthwhile.  Now I see why it's in dispute.
-- 
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.