1. #1
    Ext User
    Join Date
    Apr 2010
    Posts
    2
    Vote Rating
    0
    ajh21 is on a distinguished road

      0  

    Default SuggestBox as a CellEditor on grid not propogating selection to cell on 'return' key

    SuggestBox as a CellEditor on grid not propogating selection to cell on 'return' key


    Heya,

    I have an editable grid that contains a SuggestBox in one of it's cells. All works as expected except in the scenerio when the user selects the value they require by hitting the enter key (as opposed to clicking the appropriate item with a mouse click). In this scenerio the underlying table cell div is not updated with the new contents. The appropriate selection events are being fired it's just not propagating the change to the underlying table cell:

    final SuggestBox prevSuggestBox = new SuggestBox(new FilterSuggester()); // FilterSuggester is just a plain implementation of the SuggestOracle.

    prevSuggestBox.setText("Enter ticker");
    final CellEditor prevCellEditor = new CellEditor(new AdapterField(prevSuggestBox));
    prevSuggestBox.addSelectionHandler(new SelectionHandler<Suggestion>() {

    @Override
    public void onSelection(SelectionEvent<Suggestion> event) {
    prevSuggesstion = (ItemSuggestion) event.getSelectedItem();
    MessageBox.alert("testing", "The message box appears on return key and mouse click", null);
    }
    });

    ColumnConfig column = new ColumnConfig();
    column.setId(MOVEMENT_TABLE_COL_PREV);
    column.setHeader("Prev");
    column.setWidth(90);
    column.setEditor(prevCellEditor);
    configs.add(column);

    If anyone knows what might be causing this behaviour and could provide a fix for this i would be very grateful.

    Thanks

    Andy

  2. #2
    Ext User
    Join Date
    Apr 2010
    Posts
    2
    Vote Rating
    0
    ajh21 is on a distinguished road

      0  

    Default


    Looks like it wasnt actually too hard in the end to get it working. This is not a fix to the underlying issue but a work around is like such:

    Code:
    final SuggestBox prevSuggestBox = new SuggestBox(new FilterSuggester()); // FilterSuggester is just a plain implementation of the SuggestOracle.
    
    prevSuggestBox.setText("Enter ticker");
    final CellEditor prevCellEditor = new CellEditor(new AdapterField(prevSuggestBox));
    prevSuggestBox.addSelectionHandler(new SelectionHandler<Suggestion>() {
    
                @Override
                public void onSelection(final SelectionEvent<Suggestion> event) {
                    prevSuggession = (ItemSuggestion) event.getSelectedItem();
                    MovementTableItem item = grid.getStore().getAt(prevCellEditor.row);
                    item.set("Some col id", prevSuggession.getReplacementString());
                    grid.getView().refresh(false);
                }
            });
    
    ColumnConfig column = new ColumnConfig();
    column.setId(MOVEMENT_TABLE_COL_PREV);
    column.setHeader("Prev");
    column.setWidth(90);
    column.setEditor(prevCellEditor);
    configs.add(column);

  3. #3
    Sencha User
    Join Date
    Mar 2009
    Location
    Denver, CO
    Posts
    38
    Vote Rating
    0
    mabco is on a distinguished road

      0  

    Default


    It looks like you are using the GWT SuggestBox. If so, I'm trying to think what this issue would have to do with GXT. Just curious, because I have implemented my own suggest box using GXT and don't have this problem.

Thread Participants: 1

Tags for this Thread

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