On 08/10/2011 04:59 AM, Jeff Chimene wrote:
> On 08/10/2011 04:56 AM, Adolfo Panizo Touzon wrote:
>> Hi,
>> maybe another solution is use the "TextInputCell", have you tried ??
> 
> No, I really need EditTextCell, as it has the UI stuff that I need for
> this particular cell.
> 
> I'm on the track of instantiating an EditTextCell (rather than use
> Column<C,V>(new EditTextCell())
> , then using the ClearViewData method to reset it while still in the
> edit loop.
> 
> I'll post back w/ results.

Yeah, that was it:

Instantiate the EditTextCell in a separate class, so that there exists
an instance with which to call ClearViewData inside the FieldUpdate method.

There is a reference to this in the example set of CellTable.

The other trick is to call the editor outside the EditTextCell edit
loop, so that there is no simultaneous modification of the list data. viz:

predecessorColumn.setFieldUpdater(new FieldUpdater<Activity, String>()
{       
    @Override
    public void update(final int index, final Activity activity, final
String value) {
        predecessorCell.clearViewData(activity);
                com.google.gwt.core.client.Scheduler.get().scheduleDeferred(new
ScheduledCommand() {
            @Override
            public void execute() {
                getUiHandlers().onPredecessorChange(activity, value);
                cellTable.redraw();
            }
        });
    }
});

> 
> 
>>
>>
>> 2011/8/10 Jeff Chimene <jchim...@gmail.com <mailto:jchim...@gmail.com>>
>>
>>     On 08/10/2011 04:36 AM, Adolfo Panizo Touzon wrote:
>>     > If I understand, when you set
>>     >
>>     
>> <http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/cell/client/FieldUpdater.html>
>>     > the new value you must call to "/yourTable.redraw();/"
>>
>>     Exactly. However, the new value isn't displaying until the next
>>     focus/blur cycle.
>>
>>     I have other cells in the cell table whose values are updated. This is
>>     the only cell whose value is read, then written.
>>
>>     It has something to do with the EditTextCell edit cycle. It seems like
>>     whoever wrote this widget did not consider the case where there would be
>>     additional edits after the user pressed enter to commit the value.
>>
>>     --
>>     You received this message because you are subscribed to the Google
>>     Groups "Google Web Toolkit" group.
>>     To post to this group, send email to
>>     google-web-toolkit@googlegroups.com
>>     <mailto:google-web-toolkit@googlegroups.com>.
>>     To unsubscribe from this group, send email to
>>     google-web-toolkit+unsubscr...@googlegroups.com
>>     <mailto:google-web-toolkit%2bunsubscr...@googlegroups.com>.
>>     For more options, visit this group at
>>     http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>>
>>
>>
>> -- 
>> El precio es lo que pagas. El valor es lo que recibes.
>> Warren Buffet
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Google Web Toolkit" group.
>> To post to this group, send email to google-web-toolkit@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-web-toolkit+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-web-toolkit?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to