All --
I'm in the process of converting a Java Swing-based application into a web-based application.
The Java app is relatively simple. A JTable grid which shows rows and columns of the catalog data, a Filter pane which allows searching by values of various fields in the catalog data and, finally, a Detail pane which allows you to see all the details about the currently selected grid item.
I had implemented an 'instant' search where the grid updated on every keypress (instead of entering values and hitting an apply button.) The customer loves it and wants it in the web version.
In the web version, for combo-box/drop-down lists and checkboxes, I implemented an onchange event handler to simply/naively submit the whole form and update the whole page. However, this same trick doesn't work (well) for onkey* events as the cursor position gets reset on the submit.
So, I guess I'm going to need some AJAX-y stuff.
My problem is that I never quite 'got' dynamic HTML and I really don't know where to start.
Can I have the backend simply send a DIV with the grid content and have the callback function replace the current DIV with the replacement DIV? Do I need to delve into JSON to make this work?
Thanks for any help!
Brad
I'm in the process of converting a Java Swing-based application into a web-based application.
The Java app is relatively simple. A JTable grid which shows rows and columns of the catalog data, a Filter pane which allows searching by values of various fields in the catalog data and, finally, a Detail pane which allows you to see all the details about the currently selected grid item.
I had implemented an 'instant' search where the grid updated on every keypress (instead of entering values and hitting an apply button.) The customer loves it and wants it in the web version.
In the web version, for combo-box/drop-down lists and checkboxes, I implemented an onchange event handler to simply/naively submit the whole form and update the whole page. However, this same trick doesn't work (well) for onkey* events as the cursor position gets reset on the submit.
So, I guess I'm going to need some AJAX-y stuff.
My problem is that I never quite 'got' dynamic HTML and I really don't know where to start.
Can I have the backend simply send a DIV with the grid content and have the callback function replace the current DIV with the replacement DIV? Do I need to delve into JSON to make this work?
Thanks for any help!
Brad