Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Ext GWT Premium Member
    Join Date
    Jan 2012
    Posts
    17
    Vote Rating
    1
    paucarre is on a distinguished road

      0  

    Default TextButtonCell has click animation when having the selection event cancelled

    TextButtonCell has click animation when having the selection event cancelled


    In a Grid, if it is defined a column as a "TextButtonCell" and in the event handler "addBeforeSelectHandler" the event is cancelled ("event.setCancelled(true);"), then the click animation of the button is not disabled. It is to say, the event stops (which is correct) but the browser shows an animation of the button being clicked).

    I am using GXT 3 beta 3

    There you have the code example
    Code:
    /**
     * Ext GWT 3.0.0-beta3 - Ext for GWT
     * Copyright(c) 2007-2011, Sencha, Inc.
     * licensing@sencha.com
     *
     * http://sencha.com/license
     */
    package com.oghmasys.nomad.gui.client;
    
    
    import java.text.ParseException;
    import java.util.ArrayList;
    import java.util.Date;
    import java.util.LinkedList;
    import java.util.List;
    
    
    import com.google.gwt.cell.client.DateCell;
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.core.client.GWT;
    import com.google.gwt.editor.client.Editor.Path;
    import com.google.gwt.event.shared.GwtEvent;
    import com.google.gwt.event.shared.HandlerRegistration;
    import com.google.gwt.i18n.client.DateTimeFormat;
    import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat;
    import com.google.gwt.i18n.client.NumberFormat;
    import com.google.gwt.safehtml.shared.SafeHtml;
    import com.google.gwt.safehtml.shared.SafeHtmlUtils;
    import com.google.gwt.text.shared.AbstractSafeHtmlRenderer;
    import com.google.gwt.user.client.ui.HasHorizontalAlignment;
    import com.google.gwt.user.client.ui.IsWidget;
    import com.google.gwt.user.client.ui.RootPanel;
    import com.google.gwt.user.client.ui.Widget;
    import com.sencha.gxt.cell.core.client.SimpleSafeHtmlCell;
    import com.sencha.gxt.cell.core.client.TextButtonCell;
    import com.sencha.gxt.cell.core.client.form.ComboBoxCell.TriggerAction;
    import com.sencha.gxt.core.client.ValueProvider;
    import com.sencha.gxt.core.client.util.DateWrapper;
    import com.sencha.gxt.data.shared.Converter;
    import com.sencha.gxt.data.shared.ListStore;
    import com.sencha.gxt.data.shared.ModelKeyProvider;
    import com.sencha.gxt.data.shared.PropertyAccess;
    import com.sencha.gxt.data.shared.StringLabelProvider;
    import com.sencha.gxt.widget.core.client.FramedPanel;
    import com.sencha.gxt.widget.core.client.button.TextButton;
    import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutPack;
    import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
    import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
    import com.sencha.gxt.widget.core.client.event.BeforeSelectEvent;
    import com.sencha.gxt.widget.core.client.event.BeforeSelectEvent.BeforeSelectHandler;
    import com.sencha.gxt.widget.core.client.event.SelectEvent;
    import com.sencha.gxt.widget.core.client.event.BeforeStartEditEvent.BeforeStartEditHandler;
    import com.sencha.gxt.widget.core.client.event.CancelEditEvent.CancelEditHandler;
    import com.sencha.gxt.widget.core.client.event.CompleteEditEvent.CompleteEditHandler;
    import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
    import com.sencha.gxt.widget.core.client.event.StartEditEvent.StartEditHandler;
    import com.sencha.gxt.widget.core.client.form.CheckBox;
    import com.sencha.gxt.widget.core.client.form.DateField;
    import com.sencha.gxt.widget.core.client.form.DateTimePropertyEditor;
    import com.sencha.gxt.widget.core.client.form.Field;
    import com.sencha.gxt.widget.core.client.form.PropertyEditor;
    import com.sencha.gxt.widget.core.client.form.SimpleComboBox;
    import com.sencha.gxt.widget.core.client.form.TextField;
    import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
    import com.sencha.gxt.widget.core.client.grid.ColumnModel;
    import com.sencha.gxt.widget.core.client.grid.Grid;
    import com.sencha.gxt.widget.core.client.grid.Grid.GridCell;
    import com.sencha.gxt.widget.core.client.grid.editing.GridEditing;
    import com.sencha.gxt.widget.core.client.grid.editing.GridInlineEditing;
    import com.sencha.gxt.widget.core.client.grid.editing.GridRowEditing;
    import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
    
    
    public class GridRowExample implements IsWidget, EntryPoint {
    
    
        @Override
        public Widget asWidget() {
            
            TextButtonCell button = new TextButtonCell();
            button.addBeforeSelectHandler(
                    new BeforeSelectHandler() {
                @Override
                public void onBeforeSelect(BeforeSelectEvent event) {
                    event.setCancelled(true);
                }
            });
            button.addSelectHandler( new SelectHandler() {
                
                @Override
                public void onSelect(SelectEvent event) {
                    System.out.println("This shouldnt be printed");
                }
            });
            button.setText("AA");
            
            ColumnConfig<String, String> cc1 = new ColumnConfig<String, String>(
                    new ValueProvider<String, String>() {
                        @Override
                        public String getValue(String object) {
                            return "A";
                        }
    
    
                        @Override
                        public void setValue(String object, String value) {
    
    
                        }
    
    
                        @Override
                        public String getPath() {
                            return "";
                        }
    
    
                    });
            cc1.setCell(button);
            List<ColumnConfig<String, ?>> l = new ArrayList<ColumnConfig<String, ?>>();
            l.add(cc1);
    
    
            ColumnModel<String> cm = new ColumnModel<String>(l);
    
    
            final ListStore<String> store = new ListStore<String>(
                    new ModelKeyProvider<String>() {
    
    
                        @Override
                        public String getKey(String item) {
                            return "A";
                        }
                    });
            List<String> list = new LinkedList<String>();
            list.add("A");
            store.addAll(list);
    
    
            Grid<String> grid = new Grid<String>(store, cm);
            grid.getView().setAutoExpandColumn(cc1);
    
    
    
    
            // EDITING//
            FramedPanel cp = new FramedPanel();
            cp.setHeadingText("Editable Grid Example");
            cp.setPixelSize(600, 400);
            cp.addStyleName("margin-10");
    
    
            VerticalLayoutContainer con = new VerticalLayoutContainer();
            con.setBorders(true);
            con.add(grid, new VerticalLayoutData(1, 1));
    
    
            cp.setWidget(con);
    
    
            cp.setButtonAlign(BoxLayoutPack.CENTER);
    
    
            return cp;
        }
    
    
        @Override
        public void onModuleLoad() {
            RootPanel.get().add(asWidget());
        }
    }

  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


    Thanks for the report. I've filed a ticket to have the team take a look at this behaviour. I'll follow up with any changes we make.

  3. #3
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    75
    Vote Rating
    2
    tby is on a distinguished road

      0  

    Default


    Where can I see the status of EXTGWT-1769 ?

  4. #4
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    Canceling the selection event will not stop the button from showing it has been clicked and gaining focus. This is the same behavior as GXT 2. The button shows when it is pressed on mouse down which fires before the click event which is where the selection events are fired.

    If you want the user to know the button action was cancelled then you could show a message.

    tby - We do not have public access to our bug tracker. The bug ID is given as a reference.

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