GWT Designer,GWT EXT and inheritance

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

GWT Designer,GWT EXT and inheritance

Postby ttessitore » Tue Sep 23, 2008 10:49 am

We have used GWT-EXT to develop our admin console. We are using Eclipse 3.4 as well. We have created many forms in this manner. In order to reduce the amount of code, we use inheritance when creating our forms. We wanted to see if we could use GWT Designer to modify the old forms as well as creating new ones. I successfully imported the sample project GWTEXT-test and this works fine. When I try to bring up one of our existing forms, I get the following error when I hit the design tab

Designer was unable to find any GUI elements in your source
Check that the open compilation is a GUI class

Can GWT Designer handle inheritance? Am I simply just missing something? The following is one of our forms. As you can see, we inherit from Data Form. I wanted to make sure that we can modify our existing code with GWT Designer before I go any further.

Code: Select all
/**
*
*/
package com.interact911.admin.console.client.forms;

import com.google.gwt.user.client.ui.*;
import com.gwtext.client.data.*;
import com.gwtext.client.widgets.form.*;
import com.interact911.admin.console.client.config.*;

/**
*
*
*/
public class MsagForm extends DataForm
{

   /**
    * @param dataRecord
    * @param composite
    * @param dataConfig
    */
   public MsagForm(Record dataRecord, Composite composite, DataConfig dataConfig)
   {
      super( dataRecord, composite, dataConfig );
   }

   /* (non-Javadoc)
    * @see com.interact911.admin.console.client.forms.DataForm#getFirstTabFieldSet()
    */
   protected FieldSet getFirstTabFieldSet()
   {
      FieldSet fieldSet = new FieldSet();
      
      fieldSet.setTitle( "MSAG detail" );
      
      fieldSet.add(new TextField() {
            {
                setFieldLabel(constants.streetname());
                setName("streetname");
                setWidth(190);
                setAllowBlank(false);
            }
        });
      
      fieldSet.add(new TextField() {
            {
                setFieldLabel(constants.streetsuffix());
                setName("streetsuffix");
                setWidth(190);
                setAllowBlank(true);
            }
        });
      
      fieldSet.add(new TextField() {
            {
                setFieldLabel(constants.prefixdirectional());
                setName("prefixdirectional");
                setWidth(190);
                setAllowBlank(true);
            }
        });
      
      fieldSet.add(new TextField() {
            {
                setFieldLabel(constants.postdirectional());
                setName("postdirectional");
                setWidth(190);
                setAllowBlank(true);
            }
        });

      fieldSet.add(new TextField() {
            {
                setFieldLabel(constants.housenumlow());
                setName("housenumlow");
                setWidth(190);
                setAllowBlank(false);
            }
        });
      
      fieldSet.add(new TextField() {
            {
                setFieldLabel(constants.housenumhigh());
                setName("housenumhigh");
                setWidth(190);
                setAllowBlank(false);
            }
        });
      
      fieldSet.add(new TextField() {
            {
                setFieldLabel(constants.community());
                setName("community");
                setWidth(190);
                setAllowBlank(false);
            }
        });
      
      fieldSet.add(new TextField() {
            {
                setFieldLabel(constants.state());
                setName("state");
                setWidth(190);
                setAllowBlank(true);
            }
        });
      
      fieldSet.add(new TextField() {
            {
                setFieldLabel(constants.zip());
                setName("zip");
                setWidth(190);
                setAllowBlank(true);
            }
        });
      
      fieldSet.add(new TextField() {
            {
                setFieldLabel(constants.oddeven());
                setName("oddeven");
                setWidth(190);
                setAllowBlank(false);
            }
        });
      

      return fieldSet;
   }

}


Thanks,
Tom Tessitore
ttessitore
 
Posts: 1
Joined: Tue Sep 23, 2008 9:38 am

Re: GWT Designer,GWT EXT and inheritance

Postby Eric Clayberg » Tue Sep 23, 2008 3:18 pm

ttessitore wrote:GWT Designer handle inheritance?

Yes. See Visual Inheritance Example.

However, GWT Designer does not support any of the GWT-Ext panel types or annonymous widget subclasses like the ones you are using.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 2 guests