Hi Isomorphic,
please take a look at this one. Title of the window contains my current smartGWT version, but this is also happening in 11.1.
As it is written in docs, caseSensitive="false" by default, so IMHO this should work.
Best regards
Pavo
please take a look at this one. Title of the window contains my current smartGWT version, but this is also happening in 11.1.
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.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.fields.TextItem; import com.smartgwt.client.widgets.layout.VLayout; public class BuiltInDS extends VLayout implements EntryPoint { private IButton recreateBtn; 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(); recreateBtn = new IButton("Recreate"); recreateBtn.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { new MyWindow().show(); } }); addMember(recreateBtn); new MyWindow().show(); draw(); } private class MyWindow extends Window { public MyWindow() { setWidth(800); setHeight(600); setMembersMargin(0); setModalMaskOpacity(70); setTitle(" (" + Version.getVersion() + "/" + Version.getSCVersionNumber() + ")"); SC.logWarn(" (" + Version.getVersion() + "/" + Version.getSCVersionNumber() + ")"); setShowMinimizeButton(false); setIsModal(true); setShowModalMask(true); centerInPage(); final CustomDF mainLG = new CustomDF(); Button saveButton = new Button("Save"); saveButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { mainLG.validate(); } }); addItem(mainLG); addItem(saveButton); } private class CustomDF extends DynamicForm { public CustomDF() { setDataSource("animals"); TextItem ti = new TextItem("commonName"); setFields(ti); fetchData(new AdvancedCriteria(new Criterion("commonName", OperatorId.STARTS_WITH, "El"))); } } } }
Code:
<field name="commonName" title="Animal" type="text"> <validators> <validator type="isUnique" serverOnly="true"> <errorMessage>Name is already in use.</errorMessage> </validator> </validators> </field>
Best regards
Pavo
Comment