ExtJS - 嵌套窗口/FormPanel
这是一个主观问题,但我想了解一些关于解决这个问题的最佳方式的想法。我来给你安排一下情况。
我有一个带有一列的网格,允许用户“查看特定项目的详细信息”。网格还允许用户选择多行并“查看详细信息”这些项目。当用户单击“查看详细信息”时,网格上将弹出一个窗口,其中包含一个表单和用于在多个项目之间导航的控件(如果他们选择了多个项目)。
以下是示例图片:
我创建窗口没有问题,但我很好奇如何处理多个“FormPanels”,如果这有道理吗?我是否需要在容器面板内为他们选择的每个项目创建另一个面板,然后根据活动项目隐藏/显示(在下拉列表中显示为“项目#1”)?
我把它想象成一副纸牌,你可以在其中浏览,但我以前从未做过这样的事情。另请注意,每个项目/卡片都将预先填充网格中的信息,但如果我使用同一个商店,这应该很容易做到。
想法?
This is sort of a subjective question, but I'd like to get some ideas on the best way to lay this out. I'll set up the situation for you.
I have a grid with a column that allows the user to "View Details" on a particular item. The grid also allows the user to select multiple rows and "View Details" on those items. When the user clicks "View Details", a Window will pop over the grid, with a form inside it and controls to navigate between the multiple items (if they selected multiple items).
Here's a picture for an example:
I have no problem creating the Window, but I'm curious as to how to handle multiple "FormPanels", if that makes sense? Would I need to create another Panel inside the container Panel for each item they have selected, and then hide/show based on the active item (shown as "Item #1" in the dropdown)?
I'm thinking of it like a deck of cards in which you can navigate through, but I've never done something like this before. Also note that each item/card will be prepopulated with information from the grid, but that should be easy enough to do if I'm using the same Store.
Thoughts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,你是对的,你正在寻找的布局是
CardLayout
。您可以在 API 此处< /a>.基本思想就像你说的那样,一堆包含组件的卡片,你可以通过调用相关方法来对它们进行洗牌。
Yes you're right, and the layout you're looking for is the
CardLayout
.You can read about it in the API here. The basic idea is like you said, a stack of cards that contain components, and you shuffle through them by calling the relevant methods.