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:

<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
    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'>
    <gwt:SimplePanel stylePrimaryName="margin5">
        <gwt:DecoratorPanel>
            <gwt:FlowPanel stylePrimaryName="margin5">
                <a:TextField ui:field="title" label="Title"
                    required="true" >
                    <v:RegexRule pattern="[ a-zA-Z0-9]*"
errorMessage="Your title can only contain letters, numbers and
spaces." />
                </a:TextField>
                <gwt:Button ui:field="saveButton" text="Submit" />
            </gwt:FlowPanel>
        </gwt:DecoratorPanel>
    </gwt:SimplePanel>
</ui:UiBinder>

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 "<v:RegexRule errorMessage='Your site&#39;s title can only
contain letters, numbers and spaces.' pattern='[ a-zA-Z0-9]*'>"

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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.


Reply via email to