Hi Folks,
after some years, I'm back giving the SmartGWT/Eclipse stuff another try.
Unfortunately I start stumbling after the 3rd day which in turn is the proof that I only got older during the last years, and not wiser :-(
However, you guys will tell me.
I try to load a TreeGrid with an XML file of cascaded content.
The XML look like:
	I already noticed from the docs and from the web, that you normally have (or need) a primary (unique) and a common key. But I don't have them. I only have a primary ID attribute within <Product> (but no common child keys).
In the web I found an idea, solving it via setValueXpath but I receive an "uncaught exception". BTW: I'm using SmartGWT 3.0p LPGL.
Here's my DataSource (I dropped the instantiation):
	I'm wondering a little bit, that I haven't found any similar sample or request because such kind of cascaded XML structure looks very common for me.
Does anyone has an idea ?
					after some years, I'm back giving the SmartGWT/Eclipse stuff another try.
Unfortunately I start stumbling after the 3rd day which in turn is the proof that I only got older during the last years, and not wiser :-(
However, you guys will tell me.
I try to load a TreeGrid with an XML file of cascaded content.
The XML look like:
Code:
	
	<Products>
   <Product>....</Product>
   <Product>...
      <Product>...
         <Product>....</Product>
         <Product>....</Product>
      </Product>
   </Product>
</Products>
In the web I found an idea, solving it via setValueXpath but I receive an "uncaught exception". BTW: I'm using SmartGWT 3.0p LPGL.
Here's my DataSource (I dropped the instantiation):
Code:
	
	setID(id);  
setTitleField("Name");  
setRecordXPath("/Products/*");
        
DataSourceTextField productField = new DataSourceTextField("Product", "Product", 128);
productField.setRequired(true);
productField.setChildrenProperty(true);
// productField.setMultiple(false);
        
DataSourceTextField nameField = new DataSourceTextField("Name", "Name", 128);  
nameField.setValueXPath("Product/Name");
setFields(productField, nameField);  
setDataURL("ds/test.xml");  
setClientOnly(true);
Does anyone has an idea ?

Comment