The issue is due to CellTree preventing the default browser event on space. The reason for that is to prevent scrolling.
You can listen for KEYDOWN in TextInputCells and then add the space in the input manually. As to how to get the input element, you can traverse the DOM from the parent Element or use something like GQuery.
Nicholas
On Wednesday, May 8, 2013 7:24:03 AM UTC-4, Michael Altmann wrote:
I am facing the same issue and cannot figure out how the original poster set up event handling to get this working. Any help would be greatly appreciated. Right now my CellTree with TextInputCells will not accepts spaces.
On Wednesday, August 29, 2012 5:30:10 AM UTC-5, BhaskerT wrote: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 unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment