Hi Isomorphic,
OK, thanks.
Best regards
Blama
Announcement
Collapse
No announcement yet.
X
-
showIfs are evaluated when the item is redrawn. It can be redrawn for multiple reasons, and there is no reason to assume that setting a showIf condition implies that one wants redraws on change.
Leave a comment:
-
Hi bnagwt,
great you got it working.
Perhaps it should then be automatically set to true, if a FormItem uses setShowIfCondition() and that is really a precondition for showIf to work? Isomorphic?
Best regards
Blama
Leave a comment:
-
The show case sample works for each mentioned browsers above OK. I have tried dynamicForm.setNumCols(numCols) with various numCols values, it not helped. Finally and fortunately checkboxItem.setRedrawOnChange(true) is the solution as in the show case sample. Thank you. :-)
Leave a comment:
-
Hi bnagwt,
this should work out of the box, see this sample and it's code.
Perhaps you are setting numCols on your DynamicForm to a value not equal to the default of 2 (=title + item)?
Best regards
Blama
Leave a comment:
-
setShowIfCondition shows next FormItem beside the previous FormItem, not below it in FF, GC.
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?
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)
Tags: None
Leave a comment: