New issue 576 by Din...@gmail.com: Bug TreeNode : case "Tree with Types"
does not work when "rootNode" is set
http://code.google.com/p/struts2-jquery/issues/detail?id=576
(This is for feature requests and bugs in Struts2 jQuery Plugin - for
getting help, please use the User Group.
http://groups.google.com/group/struts2-jquery )
What steps will reproduce the problem?
1.
In JSP :
<s:url id="urlTree" action="model_update_item"/>
<s:set id="contextPath"
value="#request.get('javax.servlet.forward.context_path')" />
<sjt:tree
id="treeDynamicAjax"
jstreetheme="default"
rootNode="nodes"
childCollectionProperty="children"
nodeTitleProperty="title"
nodeIdProperty="id"
nodeHref="%{urlTree}"
nodeHrefParamName="uri"
nodeTargets="result"
types="{
'valid_children' : [ 'root' ],
'types' : {
'root' : {
'icon' : {
'image' : '%{contextPath}/icone/root.png'
},
'valid_children' : [ 'folder', 'file' ],
},
'folder' : {
'icon' : {
'image' : '%{contextPath}/icone/folder.png'
},
'valid_children' : [ 'folder', 'file' ],
},
'file' : {
'icon' : {
'image' : '%{contextPath}/icone/file.png'
},
'valid_children' : [ 'none' ],
}
}
}"
/>
2.
In action :
nodes = new TreeNode(" (Base)");
nodes.setId(...);
nodes.setState(TreeNode.NODE_STATE_OPEN);
nodes.setType("root");
nodes.setChildren(new LinkedList<TreeNode>());
for () {...}
What is the expected output? What do you see instead?
Generate result like the "Tree with Types" example.
Which struts2 version?
2.2.1.1
Which struts2-jquery plugin version?
3.1.0
Please provide any additional information below.
Comment #1 on issue 576 by johgep: Bug TreeNode : case "Tree with Types"
does not work when "rootNode" is set
http://code.google.com/p/struts2-jquery/issues/detail?id=576
Does it work when you add the nodeTypeProperty attribute to your tree tag?
<sjt:tree ... nodeTypeProperty="type" />
Good idea but it doesn't work :(
--
Enviado desde mi dispositivo móvil
*Saludos*
*Bruno F. Palacios*
*Analista Programador - Departamento Soluciones de Negocio*
*Proyectos Outsourcing
*
*GMD S.A. - Corporación Graña y Montero*
Psje. Acuña 127
Of. 605 - Centro de Lima
Teléfono: 4283890 - Anexo: 6148
Correo Laboral : bpal...@gmd.com.pe
*Cel Movistar: 968386383 RPM:*0351117*
Correo Personal : bfpal...@gmail.com
skype: bfpalacios
twitter: @bfpalacios
Can the new version(3.2.0) can fix this problem?
Yes, 3.2.0 fix this issue !! Great ! :)