Designer can't render

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

Designer can't render

Postby szobi » Mon Jun 09, 2008 11:59 am

Hello!

I just purchased GWT designer and I would like to use it on a existing project. A lot of my projects classes are working in the designer, but for example the ForumNewPost class does not

The ForumNewPost class:
Code: Select all
package polgarhaz.jb.client.components.forum;

import polgarhaz.jb.persistent.Forumpost;

import com.google.gwt.user.client.ui.Button;
...

public class ForumNewPost extends Composite
{
   private ForumPostAction submitAction;
   private Forumpost forumpost;
   private TextArea postMsg;
   
   /**
   * @wbp.parser.constructor
   */
   public ForumNewPost()
   {   
      FlowPanel fp = new FlowPanel();
      FlowPanel fpButtons = new FlowPanel();
      
      postMsg = new TextArea();
      fp.add(postMsg);
      
      CheckBox isAnswer = new CheckBox("Answer post ");
      Button post = new Button("Submit post");
      fpButtons.add(isAnswer);
      fpButtons.add(post);      
      fp.add(postMsg);
      fp.add(fpButtons);
      postMsg.setSize("300px", "180px");
      
      post.addClickListener(new ClickListener() {
         public void onClick(Widget sender) {            
            submitPost();
         }
      });
      
      initWidget(fp);
      
   }
   
   public ForumNewPost(Forumpost forumpost)
   {
      this();   
      this.forumpost = forumpost;
   }
   
   public Forumpost getForumpost()
   {
      return this.forumpost;
   }
   
   public String getText()
   {
      return this.postMsg.getText();
   }
        private void submitPost()
   {      
      if (submitAction != null)
      {
         this.forumpost.setText(this.postMsg.getText());
         this.submitAction.doAction(this);
      }
   }
   public void setSubmitAction(ForumPostAction submitAction) {
      this.submitAction = submitAction;
   }
}


The Forumpost.java class is as follows (it is used by ForumNewPost):
Code: Select all
package polgarhaz.jb.persistent;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
* Forumpost generated by hbm2java
*/
public class Forumpost  implements java.io.Serializable {
     private long id;
     private Date timestamp;
     private Forumpost forumpost;
     private Event event;
     private User user;
     private String text;
     private boolean isquestion;
     private Set<Forumpost> forumposts = new HashSet<Forumpost>(0);
     private Set<Abuse> abuses = new HashSet<Abuse>(0);

    public Forumpost() {
    }

    public Forumpost(long id) {
        this.id = id;
    }
    public Forumpost(long id, Forumpost forumpost, Event event, User user, String text, boolean isquestion, Set<Forumpost> forumposts, Set<Abuse> abuses) {
       this.id = id;
       this.forumpost = forumpost;
       this.event = event;
       this.user = user;
       this.text = text;
       this.isquestion = isquestion;
       this.forumposts = forumposts;
       this.abuses = abuses;
    }
   
    public long getId() {
        return this.id;
    }
   
    public void setId(long id) {
        this.id = id;
    }

    public Date getTimestamp() {
        return this.timestamp;
    }
   
    public void setTimestamp(Date timestamp) {
        this.timestamp = timestamp;
    }

    public Forumpost getForumpost() {
        return this.forumpost;
    }
   
    public void setForumpost(Forumpost forumpost) {
        this.forumpost = forumpost;
    }

    public Event getEvent() {
        return this.event;
    }
   
    public void setEvent(Event event) {
        this.event = event;
    }

    public User getUser() {
        return this.user;
    }
   
    public void setUser(User user) {
        this.user = user;
    }

    public String getText() {
        return this.text;
    }
   
    public void setText(String text) {
        this.text = text;
    }

    public boolean getIsquestion() {
        return this.isquestion;
    }
   
    public void setIsquestion(boolean isquestion) {
        this.isquestion = isquestion;
    }

    public Set<Forumpost> getForumposts() {
        return this.forumposts;
    }
   
    public void setForumposts(Set<Forumpost> forumposts) {
        this.forumposts = forumposts;
    }

    public Set<Abuse> getAbuses() {
        return this.abuses;
    }
   
    public void setAbuses(Set<Abuse> abuses) {
        this.abuses = abuses;
    }
}


ForumPostAction is just a simple interface
Code: Select all
package polgarhaz.jb.client.components.forum;
public interface ForumPostAction
{   
   public void doAction(ForumNewPost post);
}



If this class is used in another compoiste, the designer can show it, but cannot open it directly. Instead it throws the folloeing exception:
exception.png
exception.png (10.95 KiB) Viewed 495 times


Does anybody know what can be the problem?

Best regards - István Szoboszlai
szobi
 
Posts: 2
Joined: Mon Jun 09, 2008 11:44 am

Re: Designer can't render

Postby szobi » Mon Jun 09, 2008 12:17 pm

Hello!

Now I'am really disappointed :(

I just created a brand new Popup component with gwt desiger, and the same error as above occurs!

Should I write to the support site?

Best regards
- István Szoboszlai
szobi
 
Posts: 2
Joined: Mon Jun 09, 2008 11:44 am

Re: Designer can't render

Postby Eric Clayberg » Mon Jun 09, 2008 1:06 pm

It's hard to offer any advice because 1) the example you provided was not complete and 2) you did not include your log file.

I also don't even know what version of Eclipse you are using, what version/build of GWT Designer, or even the OS.
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 3 guests