-
18 May 2010 2:06 AM #1
[FNR] RowEditor Buttons have strange behavior
[FNR] RowEditor Buttons have strange behavior
The button on the RowEditor are inverted, the Save button is enable wheras it should be disable until the RowEditor is valid.
Cancel button is disabled wheras it should be enable.
I've recover the sample from the Showcase, you can compare the sample below with the one from : http://www.extjs.com/examples-dev/ex....html#overview and choose RowEditor sample.
The only different is that all fields have setAllowBlank setted to false.
- GXT version : SVN Revision 2079
- both
- Browser and version : Any
- Operating System : XP
- Sample code : see below
TestCase :
regards!Code:public class Test implements EntryPoint { /** * This is the entry point method. */ public void onModuleLoad() { List<ColumnConfig> configs = new ArrayList<ColumnConfig>(); ColumnConfig column = new ColumnConfig(); column.setId("name"); column.setHeader("Common Name"); column.setWidth(220); TextField<String> text = new TextField<String>(); text.setAllowBlank(false); column.setEditor(new CellEditor(text)); configs.add(column); final SimpleComboBox<String> combo = new SimpleComboBox<String>(); combo.setForceSelection(true); combo.setTriggerAction(TriggerAction.ALL); combo.add("Shade"); combo.add("Mostly Shady"); combo.add("Sun or Shade"); combo.add("Mostly Sunny"); combo.add("Sunny"); combo.setAllowBlank(false); CellEditor editor = new CellEditor(combo) { @Override public Object preProcessValue(Object value) { if (value == null) { return value; } return combo.findModel(value.toString()); } @Override public Object postProcessValue(Object value) { if (value == null) { return value; } return ((ModelData) value).get("value"); } }; column = new ColumnConfig(); column.setId("light"); column.setHeader("Light"); column.setWidth(130); column.setEditor(editor); configs.add(column); column = new ColumnConfig(); column.setId("price"); column.setHeader("Price"); column.setAlignment(HorizontalAlignment.RIGHT); column.setWidth(70); column.setNumberFormat(NumberFormat.getCurrencyFormat()); NumberField nbfield = new NumberField(); nbfield.setAllowBlank(false); column.setEditor(new CellEditor(nbfield)); configs.add(column); DateField dateField = new DateField(); dateField.getPropertyEditor().setFormat(DateTimeFormat.getFormat("MM/dd/y")); column = new ColumnConfig(); column.setId("available"); column.setHeader("Available"); column.setWidth(95); column.setEditor(new CellEditor(dateField)); column.setDateTimeFormat(DateTimeFormat.getMediumDateFormat()); configs.add(column); CheckColumnConfig checkColumn = new CheckColumnConfig("indoor", "Indoor?", 55); CellEditor checkBoxEditor = new CellEditor(new CheckBox()); checkColumn.setEditor(checkBoxEditor); configs.add(checkColumn); final ListStore<BaseModel> store = new ListStore<BaseModel>(); ColumnModel cm = new ColumnModel(configs); ContentPanel cp = new ContentPanel(); cp.setHeading("Edit BaseModels with RowEditor"); cp.setFrame(true); cp.setSize(600, 300); cp.setLayout(new FitLayout()); final RowEditor<BaseModel> re = new RowEditor<BaseModel>(); final Grid<BaseModel> grid = new Grid<BaseModel>(store, cm); grid.setAutoExpandColumn("name"); grid.setBorders(true); grid.addPlugin(checkColumn); grid.addPlugin(re); cp.add(grid); ToolBar toolBar = new ToolBar(); Button add = new Button("Add BaseModel"); add.addSelectionListener(new SelectionListener<ButtonEvent>() { @Override public void componentSelected(ButtonEvent ce) { BaseModel plant = new BaseModel(); store.add(plant); re.startEditing(store.indexOf(plant), true); } }); toolBar.add(add); cp.setTopComponent(toolBar); cp.setButtonAlign(HorizontalAlignment.CENTER); cp.addButton(new Button("Reset", new SelectionListener<ButtonEvent>() { @Override public void componentSelected(ButtonEvent ce) { store.rejectChanges(); } })); cp.addButton(new Button("Save", new SelectionListener<ButtonEvent>() { @Override public void componentSelected(ButtonEvent ce) { store.commitChanges(); } })); RootPanel.get().add(cp); } }
-
18 May 2010 8:05 AM #2
The buttons got changed by design for GXT 2.2, we just forgot to disable the correct button

The fix is easy. Should be fixed in SVN soon.
-
18 May 2010 10:06 PM #3
-
23 May 2010 11:35 PM #4
Does the fix has been released in SVN ? (in release/2.2/ ? ) I still don't see anything

thx you !
-
24 May 2010 1:48 AM #5
No it has not. There is no need to bump this thread. If it its get fixed i will reply here.
-
25 May 2010 3:25 AM #6
Its fixed in SVN now as of revision 2082
-
14 Jun 2010 6:00 AM #7
What release will this bug fix be included in? I have SVN access, but I was trying to avoid pulling down the code if a .jar would be available soon.
-
14 Jun 2010 6:03 AM #8
-
16 Jun 2010 10:28 AM #9
Is there an estimated date on when 2.2 will be released? I built the SVN code that was in trunk and it seemed to have other bugs in it that we hadn't previously experienced in our current build.
-
16 Jun 2010 11:00 AM #10
2.2 is not in trunk. It is in "releases/2.2"
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
[FNR][2.1] RowEditor CheckBoxGroup display issue in Firefox
By dagmar in forum Ext GWT: Bugs (2.x)Replies: 6Last Post: 8 Mar 2010, 11:01 PM -
[FNR] RowEditor focuses even if startedit returns early
By PeterW in forum Ext GWT: Bugs (2.x)Replies: 1Last Post: 2 Mar 2010, 3:34 AM -
Gridpanel : Strange behavior in IE vs good behavior with Firefox
By Jayeff_land in forum Ext 3.x: Help & DiscussionReplies: 1Last Post: 13 Oct 2009, 5:31 AM -
[CLOSED][3.??] RowEditor css weird behavior
By jackjia in forum Ext 3.x: BugsReplies: 15Last Post: 16 Aug 2009, 12:30 PM -
Strange behavior
By eertl in forum Ext 2.x: Help & DiscussionReplies: 6Last Post: 23 Jan 2009, 9:02 AM


Reply With Quote