Friday, October 9, 2015

Re: uncaught java.lang.indexoutofboundsexception


Although, I didn't really understand why my items have been moved from Panel to another while I didn't do a remove, but your reasoning is absolutly true, so by replacing the code as you asked me to, I got henceforth all the items displayed in the toast, but I have ususally an empty screen !!!!!!!!!!!!!!!!!!!!!!!

could you know what I have exactly expected ???

In GWT a Widget can only have a single parent widget. So when you call

col1.add(subMenuItemsContainer.getWidget(i));

then the new parent will be "col1" as you add the widget to "col1". To make that work the widget must be removed from the current parent which is "subMenuItemsContainer". So after your loop  "subMenuItemsContainer " will be empty.

If you want your widget in subMenuItemsContainer AND in col1 then you have to create a second widget instance.

-- J.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment