Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 1 month ago
Client errors in toolbox with tabsheet as content
Hi all,
We use toolbox and it works well; however, one instance we have has a tabsheet as the content. Frequently, on update, client throws error inside updateFromUIDL() at line orientation = uidl.getIntVariable("orientation");. This is because the content is cached and per code in AbstractComponent none of the variables are painted. I have fixed this locally and wanted to share the change.
boolean visibilityChanged = false;
boolean cached = Util.isCached(uidl);
int oldOrientation = orientation;
int oldAnimationMs = animation.getDuration();
int oldOverflowSize = overflowSize;
String oldIcon = icon;
String oldStyle = style;
if (!cached) {
orientation = uidl.getIntVariable("orientation");
animation.setDuration(uidl.getIntAttribute("animationms"));
overflowSize = uidl.getIntAttribute("overflowsize");
popupOnClickOnly = uidl.getBooleanAttribute("popuponlyonclick");
closeOnClickOnly = uidl.getBooleanAttribute("closeonclick");
icon = uidl.getStringAttribute("icon");
if (uidl.hasAttribute("style")) {
style = uidl.getStringAttribute("style");
} else {
style = null;
}
if (uidl.getBooleanVariable("toolboxVisible")) {
if (animation.getFoldState() != FoldState.FOLDING_OUT && animation.getFoldState() != FoldState.SHOWING) {
animation.foldState = FoldState.HIDING;
visibilityChanged = true;
}
} else {
if (animation.getFoldState() != FoldState.FOLDING_IN && animation.getFoldState() != FoldState.HIDING) {
animation.foldState = FoldState.SHOWING;
visibilityChanged = true;
}
}
}
boolean hasChanged = (oldOrientation != orientation || oldAnimationMs != animation.getDuration()
|| oldOverflowSize != overflowSize || !oldIcon.equals(icon) || visibilityChanged || !oldStyle.equals(style));
if (cached && !hasChanged) {
return;
}
My company is also awaiting a new official version of this plugin that includes changes by Henri Kerola.
Last updated on Mar, 13th 2012
You cannot reply to this thread.