Wicket 中有静态树组件吗?
有人知道 Apache Wicket 中的无状态树组件与 Swing 中的 JTree
/TreeModel
概念类似吗?我专门寻找静态树,即没有花哨的 AJAX 或类似的东西——只是一种简单明了的显示树模型的方法。
Is anyone aware of a stateless tree component in Apache Wicket that works similarly to the JTree
/TreeModel
concept in Swing? I'm specifically looking for a static tree, i.e. no fancy AJAX or the like — just a plain and simple way of displaying a tree model.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您说您想要一个静态的、无 AJAX 的树...它是否必须是一个正式的树组件?如果没有,您也许可以使用递归面板来模拟树,如图所示 这里在Wicket示例中(源代码)。不过,这实际上取决于您的用例。
我还建议继续使用其中一棵奇特的树,例如 这个,并覆盖单击树的行为以“不执行任何操作”。不幸的是,看起来展开/折叠方法是内置在如此深的层次上的,这是不可能的。没有内置类可以完全满足您的要求。
You say you want a static, AJAX-less tree... does it even have to be a formal tree component? If not, you might be able to use recursive panels to mimic a tree, as illustrated here in the Wicket Examples (source code). It really depends on your use case, though.
I was also going to suggest going ahead and using one of the fancy trees, like this one, and overriding the behavior of clicking on the tree to "do nothing." Unfortunately, it looks like the expand/collapse methods are built in at such a deep level that that's not possible. There is no built-in class that does exactly what you want.