日期:2014-05-16  浏览次数:20361 次

jquery的导航页面四(nodeDocPage.jsp续)
    function initPageFromAssociation() {
        $("div#navi_subnode_div").empty();
        $("div#navi_toolbar_div").empty();
        initToolBar();
        $("div#navi_toolbar_div > span").each(
        function() {
        toolBarHover($(this));
        }
        );
 
        // 设置隐藏itemID(i)的值
        <%
        String last_item_id = "";
        String last_item_name = "";
        String last_item_level = "";
        List navigation_toolbar_list = (List)request.getAttribute("navigation_toolbar_list");

        if( navigation_toolbar_list != null && navigation_toolbar_list.size() > 0) {
            int length = navigation_toolbar_list.size();
           
            last_item_id = (String) ((Map) navigation_toolbar_list.get(length - 1)).get("item_id");
            last_item_name = (String) ((Map) navigation_toolbar_list.get(length - 1)).get("item_name");
            last_item_level = (String) ((Map) navigation_toolbar_list.get(length - 1)).get("level");
           
            for(int i = 0; i < length; i++) {
                Map map = (Map) navigation_toolbar_list.get(i);
                String item_id = (String) map.get("item_id");
                String item_name = (String) map.get("item_name");
        %>
        $("#itemId" + "<%=i%>").val("<%=item_id%>");
        <%
            }
        }%>
        $("#itemId").val("<%=last_item_id%>");
        $("#level_id").val("<%=last_item_level%>");

//设置默认的文档类型
    $("#materialType").val(selected_doc_type);
          
        var node=$("<a href='#' id='"+ $("#itemId").val() +"' level='"+ $("#level_id").val() +"'><%=last_item_name%></a>");
   
        // 从后台取出子节点
        $.getJSON(
            root_url + "pages/navigation/gotoKBNavi.do?actionFlag=displayByJsonOut&d=" + (new Date()).getTime() + "&colID=<%=colID%>&" + $("#selectDictForm").serialize(),
function(data) {
if (data != null && data.result_code == "1") {
var level = parseInt(navigation_bar_list.length);
&nb