in my GWT application I use a Javascript library to provide users with a SQL Where string builder capability – used to support ‘advanced search’.
The javascript sources currently just provide a plain html text field for the date. If I was in pure JS I’d incorporate one of the many 3rd party date selector libraries.
But, I’ve already got the GWT date-editor there in the client (to support other UI capabilities).
Can anyone recommend a strategy for incorporating the GWT popup editor in my legacy javascript? Because of GWT compiler obfuscation I don’t think I can reliably predict the name of the GWT date editor component classes.
I suppose it’s a balance between pushing the config from GWT, or pulling from the javascript sources.
cheers,
Ian
First, create in your html the place where you want the date picker to go, like so:
Create a new entry point, called something like Integration
You should probably put this in a new module, something like com.example.integration.Integration.gwt.xml.
Now that you’ve done this you’ll need to do the standard GWT dance to add the compiled code to your HTML. Your final HTML should look something like:
There will be a form item (text input box) in your form now with the id of ‘dateValueField’. This will submit just like a regular form element.
So, some of this advice should be able to get you on your way. Good luck.
Note, there are some smaller and easier javascript libraries (including some jQuery stuff) that can do this much easier.