【问题标题】:JSTree Generating Links that are not usable in JSP page w/ Struts2JSTree 生成在带有 Struts2 的 JSP 页面中不可用的链接
【发布时间】:2010-08-30 23:32:47
【问题描述】:

我在我的 JSP 页面(Struts2 webapp 的一部分)中有一个用 JSTree 生成的树,如下所示:

<div class="panel">
<div id="demo1" class="demo">
<ul>
  <li id="node"><a href="#"><s:property value="product"/></a>
  <ul>

  <li id="node">
    <a href="#">Dependents</a>
    <ul>
      <s:iterator value="dependentsList" id="dependent">
      <li id="node">
          <a href="#">
          <s:property value="productName"/></a>
          <ul>
            <li> 
                <a href="#">
                Version Number: <s:property value="version" />
                </a>
            </li>
            <s:if test="documentationLink != ''">
            <li> 
                    <a href="<s:property value="documentationLink" />">
                    Link to Product Documentation 
                    </a>
            </li>
            </s:if>
        </ul>
      </li>
      </s:iterator>
    </ul>
  </li>
  </ul>
  </li>
</ul>
</div>
<script type="text/javascript" >
$(function () {
    $("#demo1").jstree(
    { 
        "core" :
        {
            "initially_open" : [ "#node" ]
        },
        "themes" :
        {
            "theme" : "default",
            "icons" : false
        },
        "plugins" : [ "themes", "html_data", "ui"]

    });
});
</script>

问题是产品文档的链接显示在我的浏览器底部状态栏上(我尝试同时使用 Firefox 和 Internet Explorer),但是当我点击它们时,什么也没有弹出(我检查了我的 HTML 源代码,并且锚标记显示正确的 URL 链接)。谁能弄清楚为什么我的链接不起作用?我正在使用最新版本的 JQuery 和 JSTree。谢谢!

【问题讨论】:

    标签: java jquery jsp struts2 jstree


    【解决方案1】:

    删除 UI 插件后我的链接可以正常工作,我猜 UI 插件不喜欢使用 HTML 链接...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-07-16
      • 1970-01-01
      • 1970-01-01
      • 2012-11-17
      • 2015-09-13
      • 1970-01-01
      • 2011-08-24
      • 1970-01-01
      相关资源
      最近更新 更多