0

iterate tree in zscript gives error

asked 2013-02-01 09:50:52 +0800

kazma gravatar image kazma
15 3

updated 2013-02-01 09:53:34 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...
<zscript><![CDATA[//@IMPORT 
    import org.apache.log4j.Logger;
    import zk.usersroles.dynamictree.*;
    import java.util.*;
    import java.lang.*;
      ]]></zscript>


      <zscript><![CDATA[

    Logger logger = Logger.getLogger(this.getClass().getName());

    void getRolesMenuAccess() {

        String roleId = (String) Sessions.getCurrent().getAttribute("roleId");
        TreeNodeDataBase tndb = new TreeNodeDataBase();
        List menuRoleIdLst = new ArrayList();
        menuRoleIdLst =tndb.getUsersRoles(roleId, "");

        logger.info("iiiiiiiiiiiiiii");
        Treechildren tc = tree.getTreechildren();
        Collection<Treeitem> lista = tc.getItems();
        logger.info(lista.size());
        Iterator it = lista.iterator();

        //while (it.hasNext()){

            //Treeitem treeitem = it.next();
            //logger.info("sssssssss "+ treeitem.getId());
        //}

    }


    this.getRolesMenuAccess();
]]>


            </zscript>

this code return the following error on this line code: Collection<treeitem> lista = tc.getItems();

can someone tell me why ?

delete flag offensive retag edit

Comments

your code are too limited, please provide reproducible code if possible. and if there is any error stack trace, provide it will be helpful too.

dennis ( 2013-02-04 01:09:16 +0800 )edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2013-02-01 09:50:52 +0800

Seen: 14 times

Last updated: Feb 01 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More