I want to concat two fields from my RestDataSource for the calendar title.
Since calendars seem to have no equivalent to ListGridField, I guess the only option is to combine it already in the DataSourceField.
I try to achieve this by using the XPath function concat:
	But the result is always the string "undefined".
Can I use at all XPath functions in ValueXPath? If so: How do I register the functions?
					Since calendars seem to have no equivalent to ListGridField, I guess the only option is to combine it already in the DataSourceField.
I try to achieve this by using the XPath function concat:
Code:
	
	        RestDataSource dataSource = new RestDataSource();
        dataSource.setFetchDataURL(Constants.REST_API + link);
	dataSource.setRecordXPath("//record");
	dataSource.setDataFormat(DSDataFormat.XML);
	DataSourceTextField textField = new DataSourceTextField("text");
	
	// Register name for xpath functions
	XmlNamespaces namespaces = new XmlNamespaces();
	namespaces.addNamespace("fn","http://www.w3.org/2005/xpath-functions");
	dataSource.setXmlNamespaces(namespaces);
	// Use xpath function
	textField.setValueXPath("fn:concat(field1,field2)");
Can I use at all XPath functions in ValueXPath? If so: How do I register the functions?

Comment