Jstree 与 Struts2
我正在从 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你能提供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.