dhtmlxform and JAVA server side

Maybe I have been clear in my previous questions.
I would like to use a dhtmlxForm and load/update my database without using the dataprocessor/dataconnector. We do have a specific DAO that I will be using.
I read the doc about server integration but it’s not clear (Fill the form with custom data feed).
What format exactly should my servlet return to load the form?

<f_name>John</f_name>
<l_name>Doe</l_name>
jdoe@mail.com

Do you have an example (jsp/dhtmlxForm/JAVA without using the dhtmlxConnector).

Thanks a lot.

Cyril

If you want to fill from with data, you should add names to each form item:

{type: "input", label: "Package", name: "Package", value: ""}, {type: "input", label: "Version", name: "Version", value: ""},

Your server side should return XML in following format:

<data><Package><![CDATA[acx100-source]]></Package><Version><![CDATA[20080210-1.1]]></Version></data>

Unfortunately we do not have example without dhtmlxConnectors

Thanks!
I have been able to load the dhtmlxForm using SPRING MVC (@ResponsBody) and @XmlRootElement to convert the response to the xml schema expected.
However I don’t know how to load the Select input.

What is the xml format for the 'type: "select" ’ input?

Thanks.

Cyril

Please check tutorial here docs.dhtmlx.com/doku.php?id=dhtm … orm_select

If you want some option be selected, you should pass option value from server side.

Thx Olga, but that doesn’t answer my question.
If I already have a form created with select input on the client side, how do I load/reload the data for this field without using the dhtmlxConnector?
The format for a basic input field

{type: "input", label: "Package", name: "Package", value: ""},

is

<data><Package><![CDATA[acx100-source]]></Package><Version><![CDATA[20080210-1.1]]></Version></data>

What is the format for a select

type: "select", label: "Package",...

In this example, if the ‘package’ field was a ‘select’ input how would you reload it with a different set of data when clicking the different button ‘load set1’, ‘load set2’? Using a connector attribute gives you only one option.

Thanks for your help.

Cyril
dhtmlx.com/docs/products/dhtmlxF … _load.html

I figured it out. I used a combobox in readonly mode instead of a select.

type : "combo", name : "financialClass", label : "Financial Class:", connector : "/PatientDataManager/patientAccount/financialClass/", readonly: true,

then when I want to reload the combo with a different set of value, I use the loadXML method with a different url:

var dhxCombo1 = myForm.getCombo("financialClass"); dhxCombo1.loadXML("/PatientDataManager/patientAccount/rand/financialClass/");

On the server side, I have the following Spring controller

[code] @RequestMapping(value = “/rand/financialClass/”, method = RequestMethod.GET)
public void randFinancialClass(@ModelAttribute AccountCommand account, HttpServletResponse response) {
StringBuffer sb = new StringBuffer("<option value=“rand1” selected = “true”>rand1<option value=“rand2”>rand2"); // or use your own DAO.

response.setHeader("Expires", "Sat, 6 May 1995 12:00:00 GMT");
response.setHeader("Cache-Control", "no-store,no-cache,must-revalidate");
response.addHeader("Cache-Control", "post-check=0, pre-check=0");
response.setContentType("application/xml");
response.setHeader("Pragma", "no-cache");// set HTTP/1.0 no-cache header.
try {
  response.getWriter().write(sb.toString());
}
catch (IOException e) {
  e.printStackTrace();
}[/code]

I was able to transform/parse my xml into grid using grid._process_custom_xml, grid._process_custom_xml_row.

Now I would like the same in case of Form or ComboBox. Is it possible? I do not want DHTMLX drive my web services. Instead, I want DHTMLX to parse and understand my server’s response. Please point some examples.