dhtmlxCombo enableFilteringMode script

I was wondering if you had to use php scripts when using enabling Filtering Mode or if I would be able to use any script, like a jsp.

Yes, you can use JSP.

To create the desired xml from a .jsp file, would I just use System.out.print() to write the needed tags? Here is the code in my referenced .jsp file:

[code]<%
String output = new String("");
String text = request.getParameter(“mask”);
MapList maplist = new MapList();
DomainObject domObj = DomainObject.newInstance(context);

maplist=DomainObject.findObjects(context,									//context
								CostBudgetConstants.TYPE_COST_PROGRAM,		//type pattern
								text + DomainConstants.QUERY_WILDCARD,		//name pattern
								DomainConstants.QUERY_WILDCARD,				//revPattern
								DomainConstants.QUERY_WILDCARD,				//ownerPattern
								DomainConstants.QUERY_WILDCARD,				//vaultPattern
								null,										//whereExpression
								null,										//queryName
								true,										//expandType
								null,									//objectSelects
								(short) 10);									//objectLimit

Iterator iterator = maplist.iterator();

output += "<?xml version=\"1.0\"?>";
if (request.getParameter("pos") != 0)
	output += "<complete add='true'>";
else
	output += "<complete>";
while (iterator.hasNext())
{
	Map maplistobj = (Map) iterator.next();
	output += "<option value=\"" + (String) maplistobj.get(DomainConstants.SELECT_ID) + "\">";
	output += ((String) maplistobj.get(DomainConstants.SELECT_NAME));
	output += "</option>";
}
output += "</complete>";
System.out.print(output);

%>[/code]

The reason I ask is because I get an alert saying “Error Type: LoadXML Description: Incorrect XML”. I have checked the path and made sure it points to the correct file.

Make sure that you set content-type. It should text/xml. To check whether your script generate correct xml you may open it a separate window - you’ll see correct xml if done correctly

I added: response.addHeader("Content-type:text/xml");
To my file and received the same error.

Where is the xml stored after it’s created so I can open it in another window?

Try to run your jsp in browser.

Am I supposed to be printing everything to System.out? Or loading it into the response?

These questions are more about server-side implementation…

You may try to use our Connector for combo:
dhtmlx.com/docs/products/dhtmlxC … ndex.shtml

Here are docs:
http://docs.dhtmlx.com/doku.php?id=dhtmlxconnectorjava:component-specific_how-tos_combo#how_can_i_populate_combo_with_data_from_db