Re: Using @UiChild with Elements not widgets, is this even possible?
Hi, I would love seeing some improvements to UiBinder that it would allow String of SafeHtml for children. I don't want my templates to be full of HTMLPanel when just a String or SafeHtml would do. Specifying these children using attributes is not really a great idea since I don't want to escape html in an attribute in a UiBinder file. David On Saturday, October 5, 2013 11:48:17 PM UTC+2, Seth wrote: Hi Thomas, Just one last thing, are there still no plans for uibinder element parsing functionality extension like the patch in this issue http://code.google.com/p/google-web-toolkit/issues/detail?id=4461? Would be preeetty awesome. On Saturday, October 5, 2013 10:54:36 PM UTC+2, Thomas Broyer wrote: Ah sorry, hadn't looked carefully at your code: with @UiChild(tagname=div), UiBinder expects a my:div (my being the same as the containing widget): my:customWidget my:div ui:HTMLPanel foo /ui:HTMLPanel /my:div /my:customWidget That doesn't change the problem though: apparently (looking at the code), only widgets are allowed. With the above XML, the my:div only exists to call the @UiChild method, passing the HTMLPanel as argument. On Saturday, October 5, 2013 10:49:11 PM UTC+2, Thomas Broyer wrote: Looks like I was wrong and you can only use widgets (there's an explicit isImportedElement test that checks the element is within a namespace whose URI starts with “urn:import:”) BTW, isn't the error message rather “Expected child from a urn:import namespace, found div” ? On Saturday, October 5, 2013 9:56:14 PM UTC+2, GWTter wrote: Hi all, Although the doc http://www.gwtproject.org/javadoc/latest/com/google/gwt/uibinder/client/UiChild.html does say ...add a child widget to... in my searching it seems as if you can also use UiChild with DOM elements that extend com.google.gwt.dom.client.Element class. Thomas Broyer gives a brief description here https://groups.google.com/d/msg/google-web-toolkit/INTb5tmTyIE/J0hfkoOCXN0J. Since it's Thomas I'm thinking this should indeed work, however for the life of me I can't get it to. It always ends up in found unexpected child element: div when the child is a div element. From the comments and the doc it seems that this is the setup you're supposed to have: @UiChild(tagname = DivElement.TAG) public void addDiv(DivElement div) { //note: I've even tried adddiv just to be sure //do something } and in uibinder: my:customWidget divfoo/div /my:customWidget Do I just have code tunnel vision or is this not possible? Thanks in advance. -Seth -- 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+unsubscr...@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/d/optout.
Using @UiChild with Elements not widgets, is this even possible?
Hi all, Although the dochttp://www.gwtproject.org/javadoc/latest/com/google/gwt/uibinder/client/UiChild.html does say ...add a child widget to... in my searching it seems as if you can also use UiChild with DOM elements that extend com.google.gwt.dom.client.Element class. Thomas Broyer gives a brief description herehttps://groups.google.com/d/msg/google-web-toolkit/INTb5tmTyIE/J0hfkoOCXN0J. Since it's Thomas I'm thinking this should indeed work, however for the life of me I can't get it to. It always ends up in found unexpected child element: div when the child is a div element. From the comments and the doc it seems that this is the setup you're supposed to have: @UiChild(tagname = DivElement.TAG) public void addDiv(DivElement div) { //note: I've even tried adddiv just to be sure //do something } and in uibinder: my:customWidget divfoo/div /my:customWidget Do I just have code tunnel vision or is this not possible? Thanks in advance. -Seth -- 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+unsubscr...@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.
Re: Using @UiChild with Elements not widgets, is this even possible?
Looks like I was wrong and you can only use widgets (there's an explicit isImportedElement test that checks the element is within a namespace whose URI starts with “urn:import:”) BTW, isn't the error message rather “Expected child from a urn:import namespace, found div” ? On Saturday, October 5, 2013 9:56:14 PM UTC+2, GWTter wrote: Hi all, Although the dochttp://www.gwtproject.org/javadoc/latest/com/google/gwt/uibinder/client/UiChild.html does say ...add a child widget to... in my searching it seems as if you can also use UiChild with DOM elements that extend com.google.gwt.dom.client.Element class. Thomas Broyer gives a brief description herehttps://groups.google.com/d/msg/google-web-toolkit/INTb5tmTyIE/J0hfkoOCXN0J. Since it's Thomas I'm thinking this should indeed work, however for the life of me I can't get it to. It always ends up in found unexpected child element: div when the child is a div element. From the comments and the doc it seems that this is the setup you're supposed to have: @UiChild(tagname = DivElement.TAG) public void addDiv(DivElement div) { //note: I've even tried adddiv just to be sure //do something } and in uibinder: my:customWidget divfoo/div /my:customWidget Do I just have code tunnel vision or is this not possible? Thanks in advance. -Seth -- 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+unsubscr...@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.
Re: Using @UiChild with Elements not widgets, is this even possible?
Ah sorry, hadn't looked carefully at your code: with @UiChild(tagname=div), UiBinder expects a my:div (my being the same as the containing widget): my:customWidget my:div ui:HTMLPanel foo /ui:HTMLPanel /my:div /my:customWidget That doesn't change the problem though: apparently (looking at the code), only widgets are allowed. With the above XML, the my:div only exists to call the @UiChild method, passing the HTMLPanel as argument. On Saturday, October 5, 2013 10:49:11 PM UTC+2, Thomas Broyer wrote: Looks like I was wrong and you can only use widgets (there's an explicit isImportedElement test that checks the element is within a namespace whose URI starts with “urn:import:”) BTW, isn't the error message rather “Expected child from a urn:import namespace, found div” ? On Saturday, October 5, 2013 9:56:14 PM UTC+2, GWTter wrote: Hi all, Although the dochttp://www.gwtproject.org/javadoc/latest/com/google/gwt/uibinder/client/UiChild.html does say ...add a child widget to... in my searching it seems as if you can also use UiChild with DOM elements that extend com.google.gwt.dom.client.Element class. Thomas Broyer gives a brief description herehttps://groups.google.com/d/msg/google-web-toolkit/INTb5tmTyIE/J0hfkoOCXN0J. Since it's Thomas I'm thinking this should indeed work, however for the life of me I can't get it to. It always ends up in found unexpected child element: div when the child is a div element. From the comments and the doc it seems that this is the setup you're supposed to have: @UiChild(tagname = DivElement.TAG) public void addDiv(DivElement div) { //note: I've even tried adddiv just to be sure //do something } and in uibinder: my:customWidget divfoo/div /my:customWidget Do I just have code tunnel vision or is this not possible? Thanks in advance. -Seth -- 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+unsubscr...@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.
Re: Using @UiChild with Elements not widgets, is this even possible?
I see. No problem though, thanks a lot for the explanation. I have a work around for this, I just wanted to make sure that I wasn't going that route if uichild on elements was possible. Thanks again Thomas. On Saturday, October 5, 2013 10:54:36 PM UTC+2, Thomas Broyer wrote: Ah sorry, hadn't looked carefully at your code: with @UiChild(tagname=div), UiBinder expects a my:div (my being the same as the containing widget): my:customWidget my:div ui:HTMLPanel foo /ui:HTMLPanel /my:div /my:customWidget That doesn't change the problem though: apparently (looking at the code), only widgets are allowed. With the above XML, the my:div only exists to call the @UiChild method, passing the HTMLPanel as argument. On Saturday, October 5, 2013 10:49:11 PM UTC+2, Thomas Broyer wrote: Looks like I was wrong and you can only use widgets (there's an explicit isImportedElement test that checks the element is within a namespace whose URI starts with “urn:import:”) BTW, isn't the error message rather “Expected child from a urn:import namespace, found div” ? On Saturday, October 5, 2013 9:56:14 PM UTC+2, GWTter wrote: Hi all, Although the dochttp://www.gwtproject.org/javadoc/latest/com/google/gwt/uibinder/client/UiChild.html does say ...add a child widget to... in my searching it seems as if you can also use UiChild with DOM elements that extend com.google.gwt.dom.client.Element class. Thomas Broyer gives a brief description herehttps://groups.google.com/d/msg/google-web-toolkit/INTb5tmTyIE/J0hfkoOCXN0J. Since it's Thomas I'm thinking this should indeed work, however for the life of me I can't get it to. It always ends up in found unexpected child element: div when the child is a div element. From the comments and the doc it seems that this is the setup you're supposed to have: @UiChild(tagname = DivElement.TAG) public void addDiv(DivElement div) { //note: I've even tried adddiv just to be sure //do something } and in uibinder: my:customWidget divfoo/div /my:customWidget Do I just have code tunnel vision or is this not possible? Thanks in advance. -Seth -- 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+unsubscr...@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.
Re: Using @UiChild with Elements not widgets, is this even possible?
Hi Thomas, Just one last thing, are there still no plans for uibinder element parsing functionality extension like the patch in this issuehttp://code.google.com/p/google-web-toolkit/issues/detail?id=4461? Would be preeetty awesome. On Saturday, October 5, 2013 10:54:36 PM UTC+2, Thomas Broyer wrote: Ah sorry, hadn't looked carefully at your code: with @UiChild(tagname=div), UiBinder expects a my:div (my being the same as the containing widget): my:customWidget my:div ui:HTMLPanel foo /ui:HTMLPanel /my:div /my:customWidget That doesn't change the problem though: apparently (looking at the code), only widgets are allowed. With the above XML, the my:div only exists to call the @UiChild method, passing the HTMLPanel as argument. On Saturday, October 5, 2013 10:49:11 PM UTC+2, Thomas Broyer wrote: Looks like I was wrong and you can only use widgets (there's an explicit isImportedElement test that checks the element is within a namespace whose URI starts with “urn:import:”) BTW, isn't the error message rather “Expected child from a urn:import namespace, found div” ? On Saturday, October 5, 2013 9:56:14 PM UTC+2, GWTter wrote: Hi all, Although the dochttp://www.gwtproject.org/javadoc/latest/com/google/gwt/uibinder/client/UiChild.html does say ...add a child widget to... in my searching it seems as if you can also use UiChild with DOM elements that extend com.google.gwt.dom.client.Element class. Thomas Broyer gives a brief description herehttps://groups.google.com/d/msg/google-web-toolkit/INTb5tmTyIE/J0hfkoOCXN0J. Since it's Thomas I'm thinking this should indeed work, however for the life of me I can't get it to. It always ends up in found unexpected child element: div when the child is a div element. From the comments and the doc it seems that this is the setup you're supposed to have: @UiChild(tagname = DivElement.TAG) public void addDiv(DivElement div) { //note: I've even tried adddiv just to be sure //do something } and in uibinder: my:customWidget divfoo/div /my:customWidget Do I just have code tunnel vision or is this not possible? Thanks in advance. -Seth -- 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+unsubscr...@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.