Hi! There is a simple scenario with two form items: CheckboxItem and TextItem on dynamic form. I would like to show/hide TextItem below CheckboxItem depending on condition. Actually the setShowIfCondition shows TextItem beside CheckboxItem, not below it, especially if the initial evaluation gives false in FF and in GC. The real world situation is more sophisticated with more items and conditions. I would like to show all items always in one column (so two columns inclusive title) in dynamic form. Is there some setting for setShowIfCondition to achieve it?
ERR: FF ESR 24.8.1
ERR: GC Version 60.0.3112.101 (Offizieller Build) (64-Bit)
OK : IE 11 Version 11.713.10586.0, Update 11.0.38 (KB3203621)
GWT Version : 2.6.0
SmartGWT Version : 6.0p (Tue Feb 28 12:52:00 CET 2017)
Code:
[B]private[/B] Layout getMyPanel() { [B]final[/B] VLayout vLayout = [B]new[/B] VLayout(); [B]final[/B] DynamicForm dynamicForm = [B]new[/B] DynamicForm(); [B]final[/B] CheckboxItem checkboxItem = [B]new[/B] CheckboxItem("check", "Checkbox"); checkboxItem.addChangedHandler([B]new[/B] ChangedHandler() { @Override [B]public[/B] [B]void[/B] onChanged(ChangedEvent [U]event[/U]) { dynamicForm.redraw(); } }); TextItem textItem = [B]new[/B] TextItem("item", "Item"); textItem.setShowIfCondition([B]new[/B] FormItemIfFunction() { @Override [B]public[/B] [B]boolean[/B] execute(FormItem [U]item[/U], Object [U]value[/U], DynamicForm [U]form[/U]) { Boolean ret = (Boolean) checkboxItem.getValue(); [B]return[/B] ret != [B]null[/B] && ret; // [U]ret[/U] == null || [U]ret[/U]; } }); dynamicForm.setFields(checkboxItem, textItem); vLayout.addMember(dynamicForm); [B]return[/B] vLayout; }
ERR: GC Version 60.0.3112.101 (Offizieller Build) (64-Bit)
OK : IE 11 Version 11.713.10586.0, Update 11.0.38 (KB3203621)
GWT Version : 2.6.0
SmartGWT Version : 6.0p (Tue Feb 28 12:52:00 CET 2017)
Comment