Success! Looks like we've fixed this one. According to our records the fix was applied for EXTGWT-3105 in 3.0.7.
  1. #1
    Sencha Premium Member
    Join Date
    Jun 2012
    Location
    Israel
    Posts
    14
    Vote Rating
    1
    karinal is on a distinguished road

      0  

    Default GridInlineEditing with ClicksToEdit.TWO doesn't comletes editing in 3.0.4

    GridInlineEditing with ClicksToEdit.TWO doesn't comletes editing in 3.0.4


    Hi Sven,
    I'm using gxt 3.0.4 and I have GridInlineEditing with ClicksToEdit.TWO.
    The problem is when I finish editing one editor and start editing other editor in the same row in grid - the value doesn't changed.

    Here is an example with entry point:

    public class Application implements IsWidget, EntryPoint{


    interface PlaceProperties extends PropertyAccess<Plant> {

    ValueProvider<Plant, Date> available();

    @Path("id")
    ModelKeyProvider<Plant> key();

    ValueProvider<Plant, String> light();

    ValueProvider<Plant, String> name();

    ValueProvider<Plant, Boolean> indoor();

    ValueProvider<Plant, Double> price();
    }


    private static final PlaceProperties properties = GWT.create(PlaceProperties.class);

    @Override
    public Widget asWidget() {
    return createWidget();
    }
    public Widget createWidget() {

    ColumnConfig<Plant, String> cc1 = new ColumnConfig<Plant, String>(properties.name(), 220, "Name");

    ColumnConfig<Plant, String> cc2 = new ColumnConfig<Plant, String>(properties.light(), 130, "Light");

    DateCell dateCell = new DateCell(DateTimeFormat.getFormat("yyyy MMM dd"));

    ColumnConfig<Plant, Date> cc3 = new ColumnConfig<Plant, Date>(properties.available(), 95, "Date");

    cc3.setCell(dateCell);

    ColumnConfig<Plant, Boolean> cc4 = new ColumnConfig<Plant, Boolean>(properties.indoor(), 55, "Indoor");
    cc4.setCell(new SimpleSafeHtmlCell<Boolean>(new AbstractSafeHtmlRenderer<Boolean>() {
    @Override
    public SafeHtml render(Boolean object) {
    return SafeHtmlUtils.fromString(object ? "True" : "False");
    }
    }));

    ColumnConfig<Plant, Double> cc5 = new ColumnConfig<Plant, Double>(properties.price(), 100, "Price");
    cc5.setAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
    cc5.setCell(new SimpleSafeHtmlCell<Double>(new AbstractSafeHtmlRenderer<Double>() {
    @Override
    public SafeHtml render(Double object) {
    return SafeHtmlUtils.fromString(NumberFormat.getCurrencyFormat().format(object));
    }
    }));

    List<ColumnConfig<Plant, ?>> l = new ArrayList<ColumnConfig<Plant, ?>>();
    l.add(cc1);
    l.add(cc2);
    l.add(cc5);
    l.add(cc3);
    l.add(cc4);

    ColumnModel<Plant> cm = new ColumnModel<Plant>(l);

    final ListStore<Plant> store = new ListStore<Plant>(properties.key());
    store.addAll(getPlants());

    Grid<Plant> grid = new Grid<Plant>(store, cm);
    grid.getView().setAutoExpandColumn(cc1);

    // EDITING//
    final GridInlineEditing<Plant> editing = new GridInlineEditing<Plant>(grid);
    editing.setClicksToEdit(ClicksToEdit.TWO);
    editing.addEditor(cc1, new TextField());


    DateField dateField = new DateField(new DateTimePropertyEditor(
    DateTimeFormat.getFormat(PredefinedFormat.DATE_SHORT)));
    editing.addEditor(cc3, dateField);

    CheckBox checkField = new CheckBox();
    editing.addEditor(cc4, checkField);

    // column 5 is not editable

    // EDITING//


    FramedPanel cp = new FramedPanel();
    cp.setHeadingText("Editable Grid Example");
    cp.setPixelSize(500, 300);


    VerticalLayoutContainer con = new VerticalLayoutContainer();
    con.setBorders(true);
    con.add(grid, new VerticalLayoutContainer.VerticalLayoutData(1, 1));

    cp.setWidget(con);

    return cp;

    }

    private Collection<? extends Plant> getPlants() {
    List<Plant> store = new ArrayList<Plant>(4);
    store.add(new Plant(1,"first", "blue", 34, "12/12/12", true));
    store.add(new Plant(2,"second", "red", 354, "12/12/12", true));
    store.add(new Plant(3,"karina", "green", 100, "12/12/12", false));
    store.add(new Plant(4,"alon", "black", 354, "12/12/12", true));
    return store;
    }

    @Override
    public void onModuleLoad() {
    RootPanel.get().add(asWidget());
    }

    class Plant {

    private DateTimeFormat df = DateTimeFormat.getFormat("MM/dd/y");
    private int AUTO_ID = 0;

    private int id;
    private String name;
    private String light;
    private double price;
    private Date available;
    private boolean indoor;

    public Plant() {
    id = ++AUTO_ID;
    }

    public Plant(int id, String name, String light, double price, String available, boolean indoor) {
    setId(id);
    setName(name);
    setLight(light);
    setPrice(price);
    setAvailable(df.parse(available));
    setIndoor(indoor);
    }

    public Date getAvailable() {
    return available;
    }

    public int getId() {
    return id;
    }

    public String getLight() {
    return light;
    }

    public String getName() {
    return name;
    }

    public double getPrice() {
    return price;
    }

    public boolean isIndoor() {
    return indoor;
    }

    public void setAvailable(Date available) {
    this.available = available;
    }

    public void setId(int id) {
    this.id = id;
    }

    public void setIndoor(boolean indoor) {
    this.indoor = indoor;
    }

    public void setLight(String light) {
    this.light = light;
    }

    public void setName(String name) {
    this.name = name;
    }

    public void setPrice(double price) {
    this.price = price;
    }

    @Override
    public String toString() {
    return name != null ? name : super.toString();
    }
    }

    }


    I also have a solution: to override cancelEditing in GridInlineEditing

    final GridInlineEditing<Plant> editing = new GridInlineEditing<Plant>(grid){
    @Override
    public void cancelEditing() {
    completeEditing();
    super.cancelEditing();
    }
    };

    Tell me, if it is a good solution, or maybe I'm not using GridInlineEditing correctly, or maybe this problem is solved in 3.0.5

    Thank you and have a good day,
    Karina

  2. #2
    Software Architect
    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


    Tell me, if it is a good solution, or maybe I'm not using GridInlineEditing correctly, or maybe this problem is solved in 3.0.5
    The release notes do not contain any information about this. Would it be possible for you to test it out?


    If not, i will move this thread to the bugs forum.

  3. #3
    Sencha Premium Member
    Join Date
    Jun 2012
    Location
    Israel
    Posts
    14
    Vote Rating
    1
    karinal is on a distinguished road

      0  

    Default


    Please, move it to bugs forum.

Thread Participants: 1

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..."