我尝试使用com.jgeppert.struts2.jquery's tree plugin将treetag功能添加到我的JSP中。
问题在于,当我添加标签时,页面其余部分的所有css样式都会更改为插件自带的css。
有关如何解决此问题的任何想法?
我只是尝试将此div添加到我的页面,但它会影响JSP中的所有内容:
<sj:div>
<sj:head locale="fr" jqueryui="true" jquerytheme="redmond" />
<sjt:tree id="treeStatic" jstreetheme="default"
openAllOnLoad="false" id="treeDynamicCheckboxes"
jstreetheme="apple" rootNode="nodes"
childCollectionProperty="children" nodeTitleProperty="title"
nodeIdProperty="id" openAllOnLoad="true" checkbox="true"
checkboxCheckAllTopics="checkAllNodesTopic"
checkboxUncheckAllTopics="uncheckAllNodesTopic"
checkboxShowTopics="showCheckboxesTopic"
checkboxHideTopics="hideCheckboxesTopic"
onClickTopics="treeClicked">
<sjt:treeItem title="Struts2">
<sjt:treeItem title="General">
<sjt:treeItem title="Struts2"
href="http://struts.apache.org/2.x/index.html" />
<sjt:treeItem title="Struts2 @ Facebook"
href="http://www.facebook.com/pages/Struts2-Users/103890046351798" />
</sjt:treeItem>
<sjt:treeItem title="Plugins">
<sjt:treeItem title="Struts2 Plugins"
href="https://cwiki.apache.org/S2PLUGINS/home.html" />
<sjt:treeItem title="Struts2 jQuery Plugin"
href="http://code.google.com/p/struts2-jquery/" />
<sjt:treeItem title="Struts2 Full Hibernate Plugin"
href="http://code.google.com/p/full-hibernate-plugin-for-struts2/" />
</sjt:treeItem>
<sjt:treeItem title="Blogs">
<sjt:treeItem title="Struts2 jQuery News"
href="http://www.jgeppert.com/category/java/struts2-jquery/" />
</sjt:treeItem>
<sjt:treeItem title="AJAX Links">
<s:url id="ajax1" value="/ajax1.action" />
<sjt:treeItem title="Ajax 1" href="%{ajax1}" targets="result" />
<s:url id="ajax2" value="/ajax2.action" />
<sjt:treeItem title="Ajax 2" href="%{ajax2}" targets="result"
effect="highlight" effectDuration="2500" />
<s:url id="ajax3" value="/ajax3.action" />
<sjt:treeItem title="Ajax 3" href="%{ajax3}" targets="result"
onBeforeTopics="beforeLink" onCompleteTopics="completeLink" />
<s:url id="ajax4" value="/ajax4.action" />
<sjt:treeItem title="Ajax 4" href="%{ajax4}" targets="result"
effect="bounce" effectDuration="1000" />
</sjt:treeItem>
</sjt:treeItem>
</sjt:tree>
<sj:submit formIds="treeForm" targets="result3" button="true" />
<sj:submit onClickTopics="checkAllNodesTopic"
value="Check all Nodes" button="true" />
<sj:submit onClickTopics="uncheckAllNodesTopic"
value="Uncheck all Nodes" button="true" />
<sj:submit onClickTopics="showCheckboxesTopic"
value="Show Checkboxes" button="true" />
<sj:submit onClickTopics="hideCheckboxesTopic"
value="Hide Checkboxes" button="true" />
<strong>Result Div :</strong>
<div id="result" class="result ui-widget-content ui-corner-all">Click
on the AJAX Links above.</div>
</sj:div>