Hi Isomorphic,
please have a look at this test case.
Behaviour: If form shows validation error and then gets disabled afterwards, it doesn't look disabled but it is disabled. I would expect that if the form is disabled it should always look disabled.
Before disabling I could "clean errors" and that would solve my actual problem but INHO this still doesn't behave right.
SmartClient Version: v12.0p_2020-03-11/PowerEdition Deployment (built 2020-03-11)
Best,
Pavo
please have a look at this test case.
Behaviour: If form shows validation error and then gets disabled afterwards, it doesn't look disabled but it is disabled. I would expect that if the form is disabled it should always look disabled.
Before disabling I could "clean errors" and that would solve my actual problem but INHO this still doesn't behave right.
SmartClient Version: v12.0p_2020-03-11/PowerEdition Deployment (built 2020-03-11)
Code:
package com.smartgwt.sample.client; import com.google.gwt.core.client.EntryPoint; import com.smartgwt.client.Version; import com.smartgwt.client.core.KeyIdentifier; import com.smartgwt.client.data.AdvancedCriteria; import com.smartgwt.client.data.Criterion; import com.smartgwt.client.data.DataSource; import com.smartgwt.client.types.OperatorId; import com.smartgwt.client.util.Page; import com.smartgwt.client.util.PageKeyHandler; import com.smartgwt.client.util.SC; import com.smartgwt.client.widgets.Button; import com.smartgwt.client.widgets.IButton; import com.smartgwt.client.widgets.Window; import com.smartgwt.client.widgets.events.ClickEvent; import com.smartgwt.client.widgets.events.ClickHandler; import com.smartgwt.client.widgets.form.DynamicForm; import com.smartgwt.client.widgets.form.ValuesManager; import com.smartgwt.client.widgets.form.fields.TextItem; import com.smartgwt.client.widgets.layout.VLayout; public class BuiltInDS extends VLayout implements EntryPoint { private IButton recreateBtn1; public void onModuleLoad() { KeyIdentifier debugKey = new KeyIdentifier(); debugKey.setCtrlKey(true); debugKey.setKeyName("D"); Page.registerKey(debugKey, new PageKeyHandler() { public void execute(String keyName) { SC.showConsole(); } }); setWidth100(); setHeight100(); recreateBtn1 = new IButton("Warnings 1"); recreateBtn1.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { new CustomWindow().show(); } }); addMember(recreateBtn1); new CustomWindow().show(); draw(); } private class CustomWindow extends Window { public CustomWindow() { setWidth(400); setHeight(300); setMembersMargin(0); setModalMaskOpacity(70); setTitle(" (" + Version.getVersion() + "/" + Version.getSCVersionNumber() + ")"); setShowMinimizeButton(false); setIsModal(true); setShowModalMask(true); centerInPage(); ValuesManager valuesManager = new ValuesManager(); valuesManager.setDataSource(DataSource.get("animals")); VLayout vL = new VLayout(); DynamicForm dF = new DynamicForm(); TextItem scientificName = new TextItem("scientificName"); dF.setFields(scientificName); valuesManager.addMember(dF); vL.setMembers(dF); addItem(vL); valuesManager.fetchData(new AdvancedCriteria(new Criterion("scientificName", OperatorId.EQUALS, "Myrmecophaga tridactyla"))); Button save = new Button("Save data"); save.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { valuesManager.saveData(); } }); Button disable = new Button("Disable scientificName"); disable.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { scientificName.disable(); } }); addItem(save); addItem(disable); } } }
Pavo
Comment