Re: Adding a list of items to a widget using UiBinder
I have found the answer to my own question. The parser used for UIObjects is UIObjectParser which does not allow any child elements. Currently in the SDK there is no way to register a custom parser (although there is a TODO in the code to add such a mechanism). So with the SDK as it is the only way to add child elements is to make my rule extend Widget and my TextField implement HasWidgets. Given that there seems to be intent to allow custom parsers I took the decision to customize the UIObjectParser and basically add the contents of the parse method from the HasWidgetsParser to the end of the UIObjectParser parse method. There does seem to be a bug in the UiBinderWriter#isWidgetElement method simply checks whether the namespace of the element starts with urn:import which obviously only checks the element maps to an object although a class cast exception will result later if it is not a Widget. On Dec 12, 1:36 pm, Dave Finch wrote: > Hi, > > I am using the UiBinder mechanism in GWT 2.0 and have created a > standard text field that includes a label, required icon etc. which > all works great. > The field also includes a list of validation rules which i currently > add from the java code in my form class but i would like to include > them in my form.ui.xml file as follows: > > xmlns:a='urn:import:com.acuedo.gwt.common.client.core.widgets' > xmlns:v='urn:import:com.acuedo.gwt.common.client.core.validation' > xmlns:gwt='urn:import:com.google.gwt.user.client.ui'> > > > > required="true" > > errorMessage="Your title can only contain letters, numbers and > spaces." /> > > > > > > > > but this doesn't compile. I get the following error: > 12:48:35.060 [ERROR] [admin] In > com.google.gwt.uibinder.rebind.xmlelemen...@185ee14, found unexpected > child "" > > Does anyone know if it is possible to do this and if so how? > > (My RegexRule class does not extend widget because it doesn't have any > visual aspect.) > > Thanks, > Dave -- 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-tool...@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.
Adding a list of items to a widget using UiBinder
Hi, I am using the UiBinder mechanism in GWT 2.0 and have created a standard text field that includes a label, required icon etc. which all works great. The field also includes a list of validation rules which i currently add from the java code in my form class but i would like to include them in my form.ui.xml file as follows: but this doesn't compile. I get the following error: 12:48:35.060 [ERROR] [admin] In com.google.gwt.uibinder.rebind.xmlelemen...@185ee14, found unexpected child "" Does anyone know if it is possible to do this and if so how? (My RegexRule class does not extend widget because it doesn't have any visual aspect.) Thanks, Dave -- 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-tool...@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.
Re: 1.6 Compile problem on Mac OSX
Thanks everyone for the replies. I'll work around it for now, I always have a windows VM if need be. Dave --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
1.6 Compile problem on Mac OSX
Hi, I am using the new eclipse (3.4) plugin with GWT 1.6.4 on Mac OSX 10.5. Everything works great when my project is using Java 5 but when I switch to Java 6 and try to GWT compile I get the following error: Invalid memory access of location rip=01160767 This is a problem for me because I want to use a server side library that depends on Java 6. I have had a search through the issue log and the groups but haven't found anyone with a similar problem - am I doing something wrong? Does anyone know whether this is a known issue or a possible work around? Thanks in advance, Dave --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---