PDA

View Full Version : About bug codename: TOUCH-1351



gergar28
12 Apr 2012, 10:45 AM
Hi everyone, i'm a college guy and i try to make a little project. I want read (and parse) pentaho solution repository webservice (pentaho/SolutionRepositoryService?component=getSolutionRepositoryDoc) and build this repository with nestedList and treeStore, but the treeStore, reader.Xml or nestedList don't work. The result is a simple list of all elements in repository (don't recognize tree structure). I know this has already been reported in this thread (http://www.sencha.com/forum/showthread.php?171556-Tree-and-or-NestedList-Not-Functioning-With-XML-Reader&langid=4). I ask to Ed Spencer on twitter and he said that TOUCH-1351 bug is in the 2.1 list :S (ouch! for me). And the question is: ¿Can anyone helpme to find some way to avoid this bug?.
Atte. Gerardo garrido. Chile
PD: I read thx xml in the same way it does in the thread of the bug (TOUCH-1351 (http://www.sencha.com/forum/showthread.php?171556-Tree-and-or-NestedList-Not-Functioning-With-XML-Reader&langid=4))
PD2: I convert xml to json and its works (sencha love json)
PD3: sorry for my bad bad bad english.

mitchellsimoens
12 Apr 2012, 11:25 AM
The only way to not have this happen is the nested elements in your XML must not match. The targeting of the correct level in the XML reader has this bug. In the bug report thread you referred to they use <category> at two different levels and this is where the bug in XML reader presents itself.

gergar28
12 Apr 2012, 12:07 PM
Yes, pentaho webservice repository have this structure:


<repository>
<file name="I'm directory" isDirectory="true">
<file name="I'm file" isDirectory="false" />
<file name="I'm file 2" isDirectory="false" />
</file>
<file name="I'm directory 2" isDirectory="true">
<file name="I'm file 3" isDirectory="false" />
</file>
...
...
</repository>


It's similar structure of the bug that i meant. Maybe i'm death.
You have any idea form solving this issue?
​Thanks in advance! :D

gergar28
15 Apr 2012, 10:27 AM
Bump

mitchellsimoens
16 Apr 2012, 3:45 AM
The core dev assigned the bug has not worked on it yet.

gergar28
16 Apr 2012, 7:17 PM
i trying to solved this issue converted the response xml to json object.


but i dont know how put this object into the treestore, can you tell if this solution is possible and how put the object in treestore


var data = function RespuestaJson(){
Ext.Ajax.request({
url: 'url',
params: {
component: 'getSolutionRepositoryDoc',
userid: 'joe',
password: 'password'
},
method: 'GET',
success: function(response, opts) {
me.respJson = me.ConvertXmlToJson(response.responseXML);
}
});
};


the function ConvertXmlToJson return object json


please any help about this issue i will be greatful


regards