updateFromUIDL not called

Hello,

I´m currently trying to include my Widget into my Vaadin Project.
Therefore I extended the Widget class with “VquestionView” for the client site and made a server counterpart “questionView”.
The VQuestionView implements paintable and therefore the “updateFromUIDL” method, which should receive Variables from the Server.
The questionView class extends AbstractComponent and therefore has the paintContent method which sends Variables to the Server.

My problem is, that the variables from the server are sent, but never received by the client. Actually, it looks like the “updateFromUIDL” method isn´t called even once.
For testing purposes I added the line
getElement().setInnerHTML("Testtext: ");
in the “updateFromUIDL” method, but there is no text when I start the application.
If I add the same line into the constructor the text is visible when I start the application.

Since I can´t find my error for quite some time now, I wanted to ask you if you can imagine what the Problem with my application is.
Is there any reason why the “updateFromUIDL” method won´t get called?

Here are the important Parts of my classes:


package xx.yy.widgetset.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.NodeList;
import com.google.gwt.dom.client.Element;
import com.google.gwt.user.client.ui.Label;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.client.Paintable;
import com.vaadin.terminal.gwt.client.UIDL;


public class VquestionView extends MyWidget implements Paintable {
 
    public static final String CLASSNAME = "container";

    String uidlId;

    ApplicationConnection client;
    
    private boolean JSStarted = false;


    public VquestionView() {
        super();
        NodeList<Element> list = Document.get().getElementsByTagName("div");
        int i = 0;
        Element ele = list.getItem(i);
        while(!ele.getClassName().equals("container")){
        	i++;
        	ele = list.getItem(i);
        }
        setElement(ele);             
        
        setStyleName(CLASSNAME);
    }
    
    


	public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
		ApplicationConnection.getConsole().log("testtesttest");            // Not visible in the "?debug" console.

		if (client.updateComponent(this, uidl, true))
		return;
		getElement().setInnerHTML("Testtext");
    	
		this.client = client;

		uidlId = uidl.getId();

		if (uidl.hasAttribute("x")) {
				 //Here I start some Methods		
		}
		client.updateVariable(uidlId, "startme", true, true);	// For testing, when this is called I should get a 
							//respond on the server side. (looks like this is never called)
		}


	}



package xx.yy.widgetset;

import java.util.Map;
import xx.yy.widgetset.client.QuestionConfig;
import xx.yy.widgetset.client.VquestionView;
import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.PaintTarget;
import com.vaadin.ui.AbstractComponent;
import com.vaadin.ui.ClientWidget;


@ClientWidget(VquestionView.class)
public class questionView extends AbstractComponent {
	
	private static final long serialVersionUID = 3152915436895294046L;
	private QuestionConfig conf;
	private String result;
	private boolean variablesSend = false;

	public questionView(QuestionConfig conf){
		super(); 
		this.conf = conf;
		System.out.println("question View erstellt");
	}
	 
	
	
	@Override
	public void paintContent(PaintTarget target) throws PaintException {
		System.out.println("paint aufgerufen");	// visible in the console
		super.paintContent(target);	
		if (!variablesSend) {			
			System.out.println("variablen gesendet");
			
			target.addAttribute...                    // Here I add some Attributes			
		}
		
		
	}
	
	
	@Override
	public void changeVariables(Object source, Map<String, Object> variables) {
		super.changeVariables(source, variables);
		if (variables.containsKey("startme")) {
			System.out.println("startme");
			requestRepaint();
		}
		if (variables.containsKey("result")) {
			result = (String)variables.get("result");
			System.out.println(result);
		}
	
	}
	
}

Probably there’s an exception in the client-side. Probably creation of the VquestionView fails. Run the code in dev-mode and see what throws an exception. I would guess that setElement() is called too late.

I was not able to find a client side exception. I was still able to resolve the Problem.
I made a new Vaadin Project and copied all Classes into it… strangly that resolved the Problem. Now everything works fine.