Wednesday, March 30, 2016

Re: How can I set the parent of an Element?

Hello,

As I understand your MentionPanel is the contenteditable (DIV) you are inserting DOM-nodes into. And your code crashes in "MentionPanel.this.removeFromParent()"? That is probably because you are never inserting the MentionPanel in the widget hierarchy as a child of another widget. Therefore the parent is null.

Since your MentioningTextArea is a ComplexPanel you should be able to insert you newly created MentionPanel as a child in enterSuggestMode().

I'm wondering about your use case since all the content you are inserting is invisible since the MentionPanel and it's element is nowhere attached to the dom (or is it?).

Hope this helps.

Regards,
Klemens

--
You received this message because you are subscribed to the Google Groups "GWT Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment