SmartGWT: v8.2p_2012-10-06/PowerEdition Deployment (built 2012-10-06)
Browsers: FF 15, Chrome 22
The code involved is:
If the CanvasItem is not included in the form, both FF and Chrome (dev and compiled) behave as expected: The DynamicForm resizes to fit the contents as they're shown or hidden.
Showing:
Hiding:
If the CanvasItem is included in the form, FF dev and compiled do not shrink the size of the DynamicForm, but Chrome dev and compiled do.
Showing:
Hiding:
The CanvasItem being on the form, even if not visible seems to have an effect on the initial size of the form (4 img tag limit, please copy and paste links to see):
http://www.group1solutions.com.au/smartgwt/no-canvasitem-initial.png
http://www.group1solutions.com.au/smartgwt/with-canvasitem-initial.png
Should the DynamicForm be resizing itself back down as well in FF?
Browsers: FF 15, Chrome 22
The code involved is:
Code:
/** * This is the entry point method. */ public void onModuleLoad() { final DynamicForm form = new DynamicForm(); radShow = new RadioGroupItem("select"); radShow.setValueMap("show", "hide"); radShow.setWrap(false); radShow.addChangedHandler(new ChangedHandler() { @Override public void onChanged(ChangedEvent event) { form.redraw(); } }); TextItem txtTest1 = new TextItem("test_1"); txtTest1.setShowIfCondition(new TextShowIfCondition()); TextItem txtTest2 = new TextItem("test_2"); txtTest2.setShowIfCondition(new TextShowIfCondition()); HTMLPane txtTest3 = new HTMLPane(); txtTest3.setContents("testing 123"); CanvasItem canvas = new CanvasItem(); canvas.setCanvas(txtTest3); canvas.setShowTitle(false); canvas.setColSpan(2); canvas.setHeight(30); canvas.setShowIfCondition(new TextShowIfCondition()); form.setIsGroup(true); form.setGroupTitle("Test"); form.setWidth(300); form.setPadding(10); // form.setItems(radShow, txtTest1, txtTest2); form.setItems(radShow, txtTest1, txtTest2, canvas); form.draw(); } private class TextShowIfCondition implements FormItemIfFunction { @Override public boolean execute(FormItem item, Object value, DynamicForm form) { if (radShow.getValue() == null) return false; return radShow.getValueAsString().equals("show"); } }
Showing:
Hiding:
If the CanvasItem is included in the form, FF dev and compiled do not shrink the size of the DynamicForm, but Chrome dev and compiled do.
Showing:
Hiding:
The CanvasItem being on the form, even if not visible seems to have an effect on the initial size of the form (4 img tag limit, please copy and paste links to see):
http://www.group1solutions.com.au/smartgwt/no-canvasitem-initial.png
http://www.group1solutions.com.au/smartgwt/with-canvasitem-initial.png
Should the DynamicForm be resizing itself back down as well in FF?
Comment