I have a project that works modeled after the Contacts example from
the Google I/O talks.

In trying to use a DockLayoutPanel I changed the xxxx.ui.xml file as
from using simple panels
shown below.  Both versions of the ui.xml file have the same UiFields.

Using the code below the application works.

            <ui:UiBinder
                xmlns:ui="urn:ui:com.google.gwt.uibinder"
                xmlns:g="urn:import:com.google.gwt.user.client.ui">
                <g:DecoratorPanel>
                    <g:VerticalPanel>
                        <g:HorizontalPanel
addStyleNames="{style.contactsViewButtonHPanel}">
                            <g:Button ui:field="addButton">Add</
g:Button>
                            <g:Button ui:field="deleteButton">Delete</
g:Button>
                        </g:HorizontalPanel>
                        <g:HTML ui:field="contactsTable"></g:HTML>
                    </g:VerticalPanel>
              </g:DecoratorPanel>
            </ui:UiBinder>

Changing it to the following breaks it, but I have not changed the
related java file.
(Error or warning message from debugger shown at end of topic.)

            <ui:UiBinder
                xmlns:ui="urn:ui:com.google.gwt.uibinder"
                xmlns:g="urn:import:com.google.gwt.user.client.ui">
                <g:DockLayoutPanel unit='EM'>
                    <g:north >
                        <g:HorizontalPanel
addStyleNames="{style.contactsViewButtonHPanel}">
                            <g:Button ui:field="addButton">Add</
g:Button>
                            <g:Button ui:field="deleteButton">Delete</
g:Button>
                        </g:HorizontalPanel>
                    </g:north>
                    <g:center>
                            <g:HTML ui:field="contactsTable"></g:HTML>
                    </g:center>
                </g:DockLayoutPanel>
            </ui:UiBinder>

In the java file I did **NOT** make **ANY** changes because I think
the UiBinder handles it for me.
Here is the relevent code from the java impl file

            public class DashboardViewImpl<T> extends Composite
implements DashboardView<T> {
              @UiTemplate("DashboardView.ui.xml")
              interface DashboardViewUiBinder extends UiBinder<Widget,
DashboardViewImpl> {}
              private static DashboardViewUiBinder uiBinder =
GWT.create(DashboardViewUiBinder.class);

              @UiField HTML contactsTable;
              @UiField Button addButton;
              @UiField Button deleteButton;

              private Presenter<T> presenter;
              ...

              public DashboardViewImpl() {
                initWidget(uiBinder.createAndBindUi(this));
              }
              ......

              @UiHandler("addButton")
              void onAddButtonClicked(ClickEvent event) {
                ....
              }

              @UiHandler("deleteButton")
              void onDeleteButtonClicked(ClickEvent event) {
                    ....
              }

              @UiHandler("contactsTable")
              void onTableClicked(ClickEvent event) {
                ....
              }

              public Widget asWidget() {
                return this;
              }
            }

===============================


When I run the application I get an error or warning messages that
probably relate to the problem,
but I don't understand them

- Rebinding com.google.gwt.core.client.impl.SchedulerImpl
    - For the following type(s), generated source was never committed
(did you forget to call commit()?)
        -
com.wbc.dashboardtwo.client.DashboardViewImpl_DashboardViewUIBinderImpl

I don't get that message with the first xxxx.ui.xml file, just the
second.

Any help is appreciated.

Thanks in advance...

           Jim

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

Reply via email to