Jstree 与 Struts2

发布于 2024-12-08 17:39:25 字数 223 浏览 6 评论 0原文

我正在从 struts2 创建 jstree。树是由 JSON 和 JSON 生成的JSON 是从 Action 类创建的。我还使用带有树的搜索插件。当我在搜索框中输入树中不存在的任何单词时,我将显示“无可显示”。而不是树。意味着如果树显示在任何 div 中,则在搜索错误时我将在同一 div 中显示错误消息。 现在我的问题是我想清除清除按钮上的消息并再次显示同一棵树,而不向服务器发出任何调用

I am creating jstree from struts2. Tree is generated from JSON & JSON is created from Action class. I am also using a search plugin with tree. When I type any word into the search box which is not present in tree then I am displaying "Nothing To Display." instead of tree. means if tree is displayed in any div then on the search error I am displaying error message in the same div.
Now my problem is I want to clear that message on Clear Button and display the same tree again without giving any call to Server.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情仇皆在手 2024-12-15 17:39:25

你能提供jsfiddle示例吗?不确定我是否理解你的问题......

你可以将你的 json 存储在 javascript 变量中,然后在清除后使用它。

Can you provide jsfiddle sample? Not sure if I understood your question ....

You can store your json in javascript variable and then use it after clear.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文