Re: [Xsltforms-support] Form data modification with Javascript
Brought to you by:
alain-couthures
From: COUTHURES A. <ala...@ag...> - 2011-01-19 21:07:39
|
Hello Ivan, > Hello, > > We are using xsltForms for quite a while. Great idea and a great > implementation. Still our developers constantly face several problems > that I can't solve. Can you tell me how many developers are using XSLTForms? > We sometimes need to select value from a huge list, stored in the > database. Traditional comboboxes and scrollboxes is not a solution in > this case, because the whole list of values (tens of thousands of > records) can't be placed in a webpage source. We have written special > Javascript (GWT) code, that shows a dialogue that allows one to filter > and pick a value from a huge list using AJAX techniques. The dialogue > saves chosen value (id and name) into the instance and refreshes the > whole form (xforms.ready = false; xforms.refresh(); xforms.ready = > true;). The problem of such an approach is that this type of refresh > sometimes fails to refresh constraints. The question is: what is the > most reliable way to automate insertion of data into form fields using > Javascript? Have a look at XFControl.prototype.valueChanged method: each time a node value is modified by a control, it is added in a list maintained for each model. This list is then read when refreshing. Thank you for your feedbacks! -Alain |