Hi Isomorphic,
I don't know if such a behavior is expected, for me it seems very strange (no bug though). Using current 5.1p (v10.1p_2016-03-07).
Please try the testcase in FF26 Dev Mode.
For me, without breakpoints everything is as expected.
But with breakpoints in the event handler, the event handler gets called in an infinite loop.
I made a video of it:
Testcase BuiltInDS.java:
I don't think there is an issue here, but perhaps you don't know about this behavior (then its a FYI) , or if you do, you can explain it.
Best regards
Blama
I don't know if such a behavior is expected, for me it seems very strange (no bug though). Using current 5.1p (v10.1p_2016-03-07).
Please try the testcase in FF26 Dev Mode.
For me, without breakpoints everything is as expected.
But with breakpoints in the event handler, the event handler gets called in an infinite loop.
I made a video of it:
Testcase BuiltInDS.java:
Code:
package com.smartgwt.sample.client; import com.google.gwt.core.client.EntryPoint; 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.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.events.ItemChangedEvent; import com.smartgwt.client.widgets.form.events.ItemChangedHandler; import com.smartgwt.client.widgets.form.fields.FormItem; import com.smartgwt.client.widgets.form.fields.SpinnerItem; import com.smartgwt.client.widgets.layout.VLayout; public class BuiltInDS implements EntryPoint { private VLayout mainLayout; private IButton recreateBtn; private Integer i = 0; 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(); } }); mainLayout = new VLayout(20); mainLayout.setWidth100(); mainLayout.setHeight100(); recreateBtn = new IButton("Recreate"); recreateBtn.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { recreate(); } }); mainLayout.addMember(recreateBtn); recreate(); mainLayout.draw(); } private void recreate() { Window w = new Window(); w.setWidth("95%"); w.setHeight("95%"); w.setMembersMargin(0); w.setModalMaskOpacity(70); w.setTitle("Strange effect when debugging."); w.setShowMinimizeButton(false); w.setIsModal(true); w.setShowModalMask(true); w.centerInPage(); i = 0; final DynamicForm employeeForm = new DynamicForm(); employeeForm.setHeight100(); employeeForm.setAutoFetchData(false); employeeForm.setDataSource(DataSource.get("employees")); FormItem employeeId = new FormItem("EmployeeId"); FormItem name = new FormItem("Name"); FormItem gender = new FormItem("Gender"); FormItem reportsTo = new FormItem("ReportsTo"); FormItem job = new FormItem("Job"); SpinnerItem salary = new SpinnerItem("Salary"); employeeForm.setFields(employeeId, name, gender, reportsTo, job, salary); employeeForm.fetchData(new AdvancedCriteria(new Criterion(employeeId.getName(), OperatorId.EQUALS, 4))); employeeForm.addItemChangedHandler(new ItemChangedHandler() { @Override public void onItemChanged(ItemChangedEvent event) { i++; SC.logWarn("ItemChangedEvent: " + i); SC.say("ItemChangedEvent: " + i); } }); w.addItem(employeeForm); w.show(); } }
Best regards
Blama
Comment