I am trying out the UiBinder on GWT 2.0.0.
Has been playing around for one week. And I could say, well done...
The UI design is now much simpler...
But I have one issue which I cannot resolve so far.
Well, as I so far cannot get notification when the User change the
stack on StackLayoutPanel widget, i intend to create a new widget by
extending StackLayoutPanel and do whatever necessary to get the
notification when the user change the stack. (Just wondering, if no
notification, how can I put the user action to the History?, or
anybody have any idea how to get the notification?)
But well, I create the new class (StackLayoutPanel.java) as the
following:
package com.xxxx.client;
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.user.client.ui.StackLayoutPanel;
public class StackLayoutPanelEx extends StackLayoutPanel
{
public StackLayoutPanelEx (Unit unit)
{
super (unit);
}
}
Now I have to use this new widget class in the UiBinder.
I add my package to the header in ui.xml file as the following:
<ui:UiBinder
xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'
xmlns:a='urn:import:com.xxxx.client'>
The new class which I call StackLayoutPanelEx inside com.xxxx.client
package as shown on StackLayoutPanelEx.java source code above.
Everything goes well so far....
Now I add the widget to the ui.xml
<a:StackLayoutPanelEx unit='EM' ui:field='leftPanel'>
<a:stack>
<a:customHeader size='1.5'>
<a:Label text='Testing'/>
</a:customHeader>
<g:FlowPanel ui:field='myPanel'>
</g:FlowPanel>
</a:stack>
</a:StackLayoutPanelEx>
Well, no complain from Eclipse when I save this.
When I try to run in dev mode, an error occurs:
[ERROR] Line 27: Type mismatch: cannot convert from StackLayoutPanel
to StackLayoutPanelEx
See snapshot: C:\Users\xxxxxxx\AppData\Loca\Temp
\FormMain_FormMainUiBinderImpl2663733301329964240.java
So I open the file referred above and here this is what I found on
line 27:
com.xxxx.client.StackLayoutPanelEx leftPanel = new
com.google.gwt.user.client.ui.StackLayoutPanel
(com.google.gwt.dom.client.Style.Unit.EM);
The question is, why UiBinder do not create the following code
instead:
com.xxxx.client.StackLayoutPanelEx leftPanel = new
com.xxxx.client.StackLayoutPanelEx
(com.google.gwt.dom.client.Style.Unit.EM);
Anybody have the same problem?
Or Any idea how to solve this problem?
erha
--
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.