GWT Widget and updateVariable never called

Hi there,
sorry to bother you again.

I am using vaadin 6.8.6 and I have a custom widget in gwt that is not working properly: the method
fireTableEventChangeSelection
is called but is never executed completely (code shown below).
This row

table.@com.mycompany.client.ui.VOverviewTable::fireTableEventChangeSelection(Ljava/lang/String;)($wnd.id);

calls the java method in a right way because the first line of log in
VOverviewTable.fireTableEventChangeSelection
is shown in vaadin console but it is never executed completely (because the last line of log is never shown in vaadin console). It seems that this line:

this.client.updateVariable(paintableId, "id", this.id, true);

goes in error but there are no error in vaadin console. So something goes wrong in this method.

I need to update the “id” variable when the event occurs: the server side component needs to be aware of this “update”. But something goes wrong.
Is there anyone who can help me ?

Thanks


/**
 * Client side widget which communicates with the server. Messages from the
 * server are shown as HTML and mouse clicks are sent to the server.
 */
public class VOverviewTable extends Widget implements Paintable{

	/** Set the CSS class name to allow styling. */
	public static final String CLASSNAME = "v-overviewtable";

	public static final String CLICK_EVENT_IDENTIFIER = "click";

	/** The client side widget identifier */
	protected String paintableId;

	/** Reference to the server connection object. */
	protected ApplicationConnection client;
	String id;	
	private String items = "";
	
	/**
	 * The constructor should first call super() to initialize the component and
	 * then handle any initialization relevant to Vaadin.
	 */
	public VOverviewTable() {
		// TODO This example code is extending the GWT Widget class so it must set a root element.
		// Change to a proper element or remove this line if extending another widget.
		DivElement topElement = buildComponent("");
		
		setElement(topElement);
		
		// This method call of the Paintable interface sets the component
		// style name in DOM tree
		setStyleName(CLASSNAME);
	
	}
	
    
	private native void createJSOverview(VOverviewTable table, String items) /*-{
		$wnd.listView = new $wnd.napps.ui.ListView('listView', {
			layout: 'A',
			theme: 'twitter',
			orientation: 'V',
			height: '800',
			width: '600',
			isItemUniform: true});
		
		var dataToShow = $wnd.$.parseJSON(items);
		if (dataToShow) {
			$wnd.listView.setItems(dataToShow);
		}
		$wnd.listView.addEventListener('itemSelected', function(event){
			alert('selected ');
			$wnd.id = event.detail.item.id;
			alert('selected ' + $wnd.id);
			table.@com.mycompany.client.ui.VOverviewTable::fireTableEventChangeSelection(Ljava/lang/String;)($wnd.id);
		});
	}-*/;

	 void fireTableEventChangeSelection(String id) {
		 VConsole.log("paintableId " + paintableId);
		
		 this.client.updateVariable(paintableId, "id", this.id, true);
		 
		 
		 VConsole.log("post updatevariable");
	 }

	private DivElement buildComponent(String data) {
		DivElement topElement = Document.get().createDivElement();
		
		DivElement divElement = Document.get().createDivElement();
		divElement.setId("listView");
		topElement.appendChild(divElement);
		
		return topElement;
	}

	

    
    /**
     * Called whenever an update is received from the server 
     */
	public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
		VConsole.log("pre updateFromUIDL");
		// This call should be made first. 
		// It handles sizes, captions, tooltips, etc. automatically.
		if (client.updateComponent(this, uidl, true)) {
		    // If client.updateComponent returns true there has been no changes and we
		    // do not need to update anything.
			return;
		}
		// Save reference to server connection object to be able to send
		// user interaction later
		this.client = client;
		
		// Save the client side identifier (paintable id) for the widget
		paintableId = uidl.getId();
		
		String newdata = uidl.getStringAttribute("data");
		this.items = newdata;
		
		
		createJSOverview(this, items);
		VConsole.log("post updateFromUIDL");
		
	}  
}

Hi, in the following piece of code:


     void fireTableEventChangeSelection(String id) {
         VConsole.log("paintableId " + paintableId);
         this.client.updateVariable(paintableId, "id", this.id, true);   
         VConsole.log("post updatevariable");
     }

you have a parameter
id
, however, you pass
this.id
into updateVariable method. Quickly skimming though your code - I didn’t find the place where you ever initialize the
id
field. Are you sure that this is what you wanted to use and not the
id
form method param?