Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    May 2009
    Posts
    118
    Vote Rating
    0
    mtarantini is on a distinguished road

      0  

    Default [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 :

    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);
    	}
    }
    regards!

  2. #2
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    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.

  3. #3
    Sencha User
    Join Date
    May 2009
    Posts
    118
    Vote Rating
    0
    mtarantini is on a distinguished road

      0  

    Default


    Great, thx you

  4. #4
    Sencha User
    Join Date
    May 2009
    Posts
    118
    Vote Rating
    0
    mtarantini is on a distinguished road

      0  

    Default


    Does the fix has been released in SVN ? (in release/2.2/ ? ) I still don't see anything

    thx you !

  5. #5
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    No it has not. There is no need to bump this thread. If it its get fixed i will reply here.

  6. #6
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Its fixed in SVN now as of revision 2082

  7. #7
    Ext GWT Premium Member crazycatlady's Avatar
    Join Date
    Feb 2009
    Location
    Annapolis, MD
    Posts
    45
    Vote Rating
    0
    crazycatlady is on a distinguished road

      0  

    Default


    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.

  8. #8
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Will be in GXT 2.2

  9. #9
    Ext GWT Premium Member crazycatlady's Avatar
    Join Date
    Feb 2009
    Location
    Annapolis, MD
    Posts
    45
    Vote Rating
    0
    crazycatlady is on a distinguished road

      0  

    Default


    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.

  10. #10
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    2.2 is not in trunk. It is in "releases/2.2"

Similar Threads

  1. [FNR][2.1] RowEditor CheckBoxGroup display issue in Firefox
    By dagmar in forum Ext GWT: Bugs (2.x)
    Replies: 6
    Last Post: 8 Mar 2010, 11:01 PM
  2. [FNR] RowEditor focuses even if startedit returns early
    By PeterW in forum Ext GWT: Bugs (2.x)
    Replies: 1
    Last Post: 2 Mar 2010, 3:34 AM
  3. Gridpanel : Strange behavior in IE vs good behavior with Firefox
    By Jayeff_land in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 13 Oct 2009, 5:31 AM
  4. [CLOSED][3.??] RowEditor css weird behavior
    By jackjia in forum Ext 3.x: Bugs
    Replies: 15
    Last Post: 16 Aug 2009, 12:30 PM
  5. Strange behavior
    By eertl in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 23 Jan 2009, 9:02 AM

Thread Participants: 2