Announcement

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

    First SmartGWT project

    Hi there! We are evaluating widgets for our GWT project and I found smartGWT to be a better solution than extJS.

    We already had a GWT project with some basic UIs. I'm trying the form example of smartgwt, but there's no style associated with the panel:

    Here's my config/code:

    Code:
    public class Application
        implements EntryPoint
    {
    
      /**
       * This is the entry point method.
       */
      public void onModuleLoad()
      {
    	  final DynamicForm form = new DynamicForm();
    		
    		 form.setGroupTitle("Spanning");  
    	        form.setIsGroup(true);  
    	        form.setWidth(300);  
    	        form.setHeight(180);  
    	        form.setNumCols(2);  
    	        form.setColWidths(60, "*");  
    	        //form.setBorder("1px solid blue");  
    	        form.setPadding(5);  
    	        form.setCanDragResize(true);  
    	        form.setResizeFrom("R");  
    	          
    	        TextItem subjectItem = new TextItem();  
    	        subjectItem.setTitle("Subject");  
    	        subjectItem.setWidth("*");  
    	  
    	        TextAreaItem messageItem = new TextAreaItem();  
    	        messageItem.setShowTitle(false);  
    	        messageItem.setLength(5000);  
    	        messageItem.setColSpan(2);  
    	        messageItem.setWidth("*");  
    	        messageItem.setHeight("*");  
    	  
    	        form.setFields(subjectItem, messageItem);  
    	        RootPanel.get().add(form);
      }
    }
    
    <module>
    	  
          <!-- Inherit the core Web Toolkit stuff.                        -->
          <inherits name='com.google.gwt.user.User'/>
          <inherits name="com.google.gwt.i18n.I18N"></inherits>
          <inherits name="com.acme.SGR"/>
          <inherits name="net.sf.gilead.Adapter4Gwt15"/>
          <inherits name="com.smartgwt.SmartGwt"/>
    	  <inherits name="com.smartclient.theme.graphite.GraphiteResources"/>
    
          <!--  inherit css based theme -->
    
          <!-- Specify the app entry point class.                         -->
          <entry-point class='com.acme.client.Application'/>
    
          <!-- Specify the application specific style sheet.              -->
          
          <source path="client"></source>
    	  	
    </module>
    What am I missing here to get the cool style as in the demos?

    Regards

    #2
    The SmartGwt module already inherits and injects the Enterprise theme so there's no need to inherit com.smartclient.theme.graphite.GraphiteResources. See the Hello World sample in the distribution.

    If you want to use the Graphite theme, then inherit have a look at how the SmartGWT showcase is setup.

    Which version of Smart GWT are you using? If you're using version < 2.2 then you'll also need to set the isomorphicDir variable. See the FAQ sticky post in the main forum.

    Comment

    Working...
    X