开发者

JSTree Generating Links that are not usable in JSP page w/ Struts2

开发者 https://www.devze.com 2023-01-13 23:38 出处:网络
I have a tree generated with JSTree in my JSP page (part of a Struts2 webapp) as follows: <div class=\"panel\">

I have a tree generated with JSTree in my JSP page (part of a Struts2 webapp) as follows:

<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>

Thing is the links to product documentation show up on my browser (I tried using b开发者_Python百科oth Firefox and Internet Explorer) on the bottom status bar, but when I click on them, nothing pops up (I checked my HTML source code, and the anchor tags are showing the correct URL links). Could anyone figure out why my links aren't working? I am using both the latest versions of JQuery and JSTree. Thanks!


I got the links to work after removing the UI plugin, I guess the UI plugin doesn't like to work with HTML links...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号