Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Custom Widget - Expecting only widget in blah

    Hey all,

    I've created my own custom widget by extending Composite.

    I'm using UIBinder and trying to add my component like so:

    Code:
    <sc:UIHLayout ui:field="hlyLicenseManagementLayout" width="100%" height="100%" membersMargin="15">
        <uc:LicenseDetailControl ui:field="ucLicenseDetailControl" />
    </sc:UIHLayout>
    Code:
    public class LicenseDetailControl extends Composite implements HasHTML{
        
    private static LicenseDetailControlUiBinder uiBinder = GWT.create(LicenseDetailControlUiBinder.class);
    interface LicenseDetailControlUiBinder extends UiBinder<Widget, LicenseDetailControl> { /**/ }
    
        @UiConstructor 
        public LicenseDetailControl() {
            initWidget(uiBinder.createAndBindUi(this));
        }
    }
    But I get this error:
    Code:
    12:17:12.832 [ERROR] [iportal] Expecting only widgets in <sc:UIHLayout height='100%' membersMargin='15' ui:field='hlyLicenseManagementLayout' width='100%'>: <uc:LicenseDetailControl ui:field='ucLicenseDetailControl'> (:55)
    Can anyone help me out?

    #2
    Ah, there we go. I didn't reference my widget properly, it should have been
    Code:
    <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
    <ui:UiBinder 
    	xmlns:ui="urn:ui:com.google.gwt.uibinder"
    	xmlns:uc="urn:import:com.protecode.gwtmodule.controls" <!-- I accidentally had xmlns:ui instead -->
    	xmlns:sc="urn:import:org.synthful.smartgwt.client.widgets">
    Last edited by mgallagher; 13 Feb 2015, 13:15.

    Comment

    Working...
    X