Success! Looks like we've fixed this one. According to our records the fix was applied for EXTGWT-3006 in 3.1.
  1. #1
    Ext GWT Premium Member
    Join Date
    Jan 2012
    Location
    Linz, Austria
    Posts
    23
    Vote Rating
    1
    FEAT is on a distinguished road

      0  

    Default Row Editing displays toString of edited object

    Row Editing displays toString of edited object


    Required Information

    Version(s) of Ext GWT

    GXT 3.0.0 RC2

    Browser versions and OS (and desktop environment, if applicable)
    • IE8, Windows XP
    • Chrome 17.0.963.79 m, Windows XP
    Virtual Machine
    No

    Description
    When editing a row, the value of toString, called for the edited object, is displayed.

    Run mode
    development mode
    production mode

    Steps to reproduce the problem
    1. Start running in development mode in Eclipse
    2. Open app in browser
    3. Click Add button to add entries to table
    4. Double click on Headline column of value row
    Expected result
    Display of editable end not editable values of entry.

    Actual result
    Prints toString of edited object over editor.

    Test case
    Grid creation:
    Code:
     
        @UiFactory Grid<?> createGrid() {
            IdentityValueProvider<ForumEntry> identity;
            ColumnConfig<ForumEntry, Date> postedColumn;
            ColumnConfig<ForumEntry, String> headlineColumn;
            ColumnConfig<ForumEntry, EntryType> typeColumn;
            List<ColumnConfig<ForumEntry, ?>> columnList;        
            ColumnModel<ForumEntry> columnModel;
            ListStore<ForumEntry> listStore;
            GridEditing<ForumEntry> editing;
            Grid<ForumEntry> grid;
            final TextField headlineEditField;
    
            identity = new IdentityValueProvider<ForumEntry>();        
            selectionModel = new CheckBoxSelectionModel<ForumEntry>(identity);            
    
            postedColumn = new ColumnConfig<ForumEntry, Date>(
                    FORUM_ENTRY_PROPERTIES.creationDate(), 
                    200, 
                    "Posted");
    
            typeColumn = new ColumnConfig<ForumEntry, EntryType>(
                    FORUM_ENTRY_PROPERTIES.type(), 
                    200, 
                    "Type");
    
            headlineColumn = new ColumnConfig<ForumEntry, String>(
                    FORUM_ENTRY_PROPERTIES.headline(), 
                    200, 
                    "Headline");
            
            columnList = new ArrayList<ColumnConfig<ForumEntry, ?>>();
            
            columnList.add(selectionModel.getColumn());
            columnList.add(postedColumn);
            columnList.add(typeColumn);
            columnList.add(headlineColumn);
            columnModel = new ColumnModel<ForumEntry>(columnList);
            
            listStore = new ListStore<ForumEntry>(FORUM_ENTRY_PROPERTIES.id());
            grid = new Grid<ForumEntry>(listStore, columnModel);
            
            editing = new GridRowEditing<ForumEntry>(grid);
            
            headlineEditField = new TextField();        
            headlineEditField.addValidator(new Validator<String>() {
                @Override
                public List<EditorError> validate(Editor<String> editor, String value) {
                    if (!"Valid".equals(value)) {
                        List<EditorError> errors;
                        
                        errors = new ArrayList<EditorError>();
                        errors.add(new DefaultEditorError(headlineEditField, "Not Valid", value));
                        return errors;
                    }
                    return null;
                }
            });
    
            headlineEditField.setAutoValidate(true);
            editing.addEditor(headlineColumn, headlineEditField);
            
            grid.getView().setAutoExpandColumn(headlineColumn);
            grid.getView().setAutoFill(true);
            grid.setSelectionModel(selectionModel);
    
            return grid;
        }
    Domain Type
    Code:
    public class ForumEntry {
        private static int nextId; 
        private int id;
        private EntryType type;
        private Date creationDate;
        private String headline;
        private String content;
        
        public ForumEntry(EntryType type, String headline, String content) {
            super();
            this.id = nextId++;
            this.type = type;
            this.headline = headline;
            this.content = content;
            this.creationDate = new Date();
        }
    
        public EntryType getType() {
            return type;
        }
    
        public void setType(EntryType type) {
            this.type = type;
        }
    
        public String getHeadline() {
            return headline;
        }
    
        public void setHeadline(String headline) {
            this.headline = headline;
        }
    
        public String getContent() {
            return content;
        }
    
        public void setContent(String content) {
            this.content = content;
        }
    
        public int getId() {
            return id;
        }
    
        public void setId(int id) {
            this.id = id;
        }
    
        public Date getCreationDate() {
            return creationDate;
        }
    }
    Property Access
    Code:
        interface ForumEntryProperties extends PropertyAccess<ForumEntry> {
            @Path("id")
            ModelKeyProvider<ForumEntry> id();
            
            @Path("creationDate")
            ValueProvider<ForumEntry, Date> creationDate();
    
            @Path("type")
            ValueProvider<ForumEntry, EntryType> type();
            
            @Path("headline")
            ValueProvider<ForumEntry, String> headline();        
        }
    Helpful Information

    Screenshot or video

    screenshot1.png

    Live test
    • not available; would have attached eclipse project, size too big for attachment.

    Debugging already done
    • «none»
    Possible fix
    «Not provided»
    Last edited by FEAT; 25 Apr 2012 at 3:45 AM. Reason: tested in production mode.

  2. #2
    Sencha User WesleyMoy's Avatar
    Join Date
    Oct 2009
    Location
    Redwood City, California
    Posts
    402
    Vote Rating
    2
    WesleyMoy is on a distinguished road

      0  

    Default


    I find that I'm not able to run your example. Among other things, FORUM_ENTRY_PROPERTIES and EntryType are missing. If you could strip down your test case but still have it implement EntryPoint, I should be able to look into your problem further.

    At the moment, I'm seeing no problems with the nightly build of the Explorer Demo at http://staging.sencha.com:8080/examp...oweditablegrid.

  3. #3
    Ext GWT Premium Member
    Join Date
    Jan 2012
    Location
    Linz, Austria
    Posts
    23
    Vote Rating
    1
    FEAT is on a distinguished road

      0  

    Default Reproduction of Bug

    Reproduction of Bug


    ...here come the sources. I have stripped down the project to just the necessary source files. Hope, this is enough.

    I think the problem only occurs, when you use a CheckBox column for selection as the first column.
    Attached Files

  4. #4
    Ext GWT Premium Member
    Join Date
    Aug 2009
    Posts
    20
    Vote Rating
    1
    oleg_cohen is on a distinguished road

      0  

    Default


    Is there any update on this? I am also running into the same issue. The reason for the issue is that GridRowEditing is use in conjunction with the CheckBoxSelection model which contributes its own ColumnConfig to the grid. That column config somehow, when rendered in the row editor, puts out the object ID of the entry (I guess produced by a toString()) call.

    It would be great to either get a fix or have a workaround.

    Thanks!
    Oleg Cohen

  5. #5
    Ext GWT Premium Member
    Join Date
    Aug 2009
    Posts
    20
    Vote Rating
    1
    oleg_cohen is on a distinguished road

      0  

    Default


    Well, I actually found a workaround ....

    Define a checkbox field:

    CheckBox checkBox = new CheckBox();
    checkBox.setReadOnly(false);
    checkBox.setEnabled(false);

    Add editor for the selection model column using a model to Boolean converter.

    ...

    final GridRowEditing<ModelObjectType> gridRowEditing = new GridRowEditing<ModelObjectType>(grid);

    ...


    gridRowEditing.addEditor(sm.getColumn(), new Converter<ModelObjectType, Boolean>() {


    @Override
    public ModelObjectType convertFieldValue(Boolean object) {
    returnnull;
    }


    @Override
    public Boolean convertModelValue(ModelObjectType object) {
    return Boolean.FALSE;
    }


    }, checkBox);

    I guess it is not perfect, but when a row editor shows up in the checkbox selection model there will be a disabled checkbox.

    Thanks,
    Oleg Cohen

  6. #6
    Sencha - GXT Dev Team
    Join Date
    Jan 2012
    Location
    Arlington, WA
    Posts
    380
    Vote Rating
    15
    branflake2267 will become famous soon enough

      0  

    Default


    Just a update, 3.1.0 will include a nifty editing label renderer. It will be out soon.

    Brandon

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi