Wednesday, August 29, 2012

Re: GWT 2.4 - problems with space key handling and FieldUpdater for TextInputCell inside CompositeCell in CellTree

Hi James,
Thanks for the post and reply.
I am facing similar issue. I am not able to type the white space character in the MyEditCell extends AbstractInputCell.
i have also over ridden the below method:

public Set<String> getConsumedEvents() {

Set<String> events = new HashSet<String>();

events.add("focus");

events.add("blur");

events.add("keydown");

events.add("change");

return events;

}
But, Still no luck.
Can you please suggest something.
 
Thanks,
Bhasker

On Thursday, 29 December 2011 21:38:09 UTC+5:30, James Scott wrote:
Looks like it boils down to events. After looking at the TextInputCell
and AbstractInputCell source, I added "focus" and "change" events to
the list of events consumed by the CompositeCell, and that addressed
both issues.

Incidentally, I tried out the EditTextCell in the CompositeCell, and
to get that working, I needed to add "keyup" and "keydown" events to
the CompositeCell.

Clearly I do not yet have my mind wrapped around how the events are
propagated in a CompositeCell, but at least I've solved my immediate
problems.

JLS

On Dec 28, 3:49 pm, James Scott <j...@jls.cx> wrote:
> Hi all-
>
> I feel like I'm missing something obvious here, but I haven't been
> able to figure this out. In short, I have a CellTree whose leaf nodes
> are populated with CompositeCells. Each CompositeCell has an
> ImageResourceCell, a TextCell, and a TextInputCell. These are
> displaying in the tree correctly. I have attached an onClick event to
> the ImageResourceCell that deletes the item from the tree, and that
> works as expected. The intent for the TextInputCell is to display a
> field from the entity associated with the cell, and update the field
> on the entity when the user changes the value in the TextInputCell.
>
> However, I'm having a couple of problems with the TextInputCell.
> First, when I type in the TextInputCell, the space key is ignored -
> well, it's probably being consumed by something else but the upshot is
> that when I type a space character, it doesn't appear in the
> TextInputCell. I thought this might have to do with the SelectionModel
> or KeyboardSelectionPolicy on the CellTree, but I've set the tree to
> KeyboardSelectionPolicy.DISABLED and the TreeViewModel to
> NoSelectionModel and it's still happening.[snip]

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

No comments:

Post a Comment