SmartClient Version: SNAPSHOT_v11.1d_2017-03-09/Enterprise Development Only (built 2017-03-09)
Chrome in OSX
Hello, please try this test case:
you'll see that both forms are shown, even if the visibleWhen of the 2nd form is not satisfied.
If you replace the Window with an HLayout, it works (2nd form is hidden, unless you type 'bar' in the very first text item)
Chrome in OSX
Hello, please try this test case:
Code:
isc.DynamicForm.create({ ID: "form1", width: 400, fields: [ {title:"Text", type:"text", hint: "A plain text field", wrapHintText: false, name:"foo"}, {title:"Color Picker", type:"color"}, {title:"TextArea", type:"textArea"}, {title: "Stacked Spinner", editorType: "SpinnerItem", writeStackedIcons: true, defaultValue: 5, min: 0, max: 10, step: 0.5, wrapTitle: false}, {title: "Unstacked Spinner", editorType: "SpinnerItem", writeStackedIcons: false, defaultValue: 5, min: 0, max: 10, step: 0.5}, {title: "Slider", name: "slider", editorType: "SliderItem", width: 180, minValue: 1, maxValue: 5, numValues: 5, height: isc.Browser.isTouch ? 52 : 36}, {title: "LinkItem", type: "link", name: "link", height: 36, target: "javascript", click: "isc.say('Hello world!')", linkTitle: "<br>Click Me<br>"}, {title: "Checkbox", type: "checkbox", height: 25}, {title: "Radio Group", type: "radioGroup", valueMap: ["Option 1", "Option 2"]} ], values: { slider: 4 } }); var valueMap = { "US" : "<b>United States</b>", "CH" : "China", "JA" : "<b>Japan</b>", "IN" : "India", "GM" : "Germany", "FR" : "France", "IT" : "Italy", "RS" : "Russia", "BR" : "<b>Brazil</b>", "CA" : "Canada", "MX" : "Mexico", "SP" : "Spain" } var valueIcons = { "US" : "US", "CH" : "CH", "JA" : "JA", "IN" : "IN", "GM" : "GM", "FR" : "FR", "IT" : "IT", "RS" : "RS", "BR" : "BR", "CA" : "CA", "MX" : "MX", "SP" : "SP" } isc.DynamicForm.create({ ID: "form2", visibleWhen:{ _constructor: "AdvancedCriteria", operator: "or", criteria: [ {fieldName: "form1.values.foo", operator: "equals", value: "bar"} ] }, width: 480, colWidths: [220, "*"], isGroup: true, groupTitle: "Select / Combo Controls", fields : [{ name: "bugStatus", title: "Select", hint: "<nobr>A simple combobox</nobr>", editorType: "ComboBoxItem", valueMap : { "cat" : "Cat", "dog" : "Dog", "giraffe" : "Giraffe", "goat" : "Goat", "marmoset" : "Marmoset", "mouse" : "Mouse" } }, { name: "itemName", title: "Item Name", editorType: "ComboBoxItem", optionDataSource: "supplyItem", pickListWidth: 250 }, { name: "selectItem", title: "Select", hint: "<nobr>A combobox with icons</nobr>", editorType: "SelectItem", valueMap : valueMap, valueIcons : valueIcons, imageURLPrefix : "flags/16/", imageURLSuffix : ".png" }, { name: "selectItem2", title: "Select", hint: "<nobr>A combobox with styled entries</nobr>", editorType: "SelectItem", valueMap : { "red" : "<span style='color:#FF0000;'>Red</span>", "green" : "<span style='color:#00FF00;'>Green</span>", "blue" : "<span style='color:#0000FF;'>Blue</span>" } }, { name: "selectItemMultipleGrid", title: "Select Multiple (Grid)", editorType: "SelectItem", multiple: true, multipleAppearance: "grid", valueMap : { "cat" : "Cat", "dog" : "Dog", "giraffe" : "Giraffe", "goat" : "Goat", "marmoset" : "Marmoset", "mouse" : "Mouse" } }, { name: "selectItemMultiplePickList", title: "Select Multiple (PickList)", editorType: "SelectItem", multiple: true, multipleAppearance: "picklist", valueMap : { "cat" : "Cat", "dog" : "Dog", "giraffe" : "Giraffe", "goat" : "Goat", "marmoset" : "Marmoset", "mouse" : "Mouse" } } ] }); isc.Window.create({ maximized:true, items: [ form1, form2] });
If you replace the Window with an HLayout, it works (2nd form is hidden, unless you type 'bar' in the very first text item)
Comment