ExtJS - 嵌套窗口/FormPanel

发布于 2024-11-16 18:11:48 字数 488 浏览 2 评论 0原文

这是一个主观问题,但我想了解一些关于解决这个问题的最佳方式的想法。我来给你安排一下情况。

我有一个带有一列的网格,允许用户“查看特定项目的详细信息”。网格还允许用户选择多行并“查看详细信息”这些项目。当用户单击“查看详细信息”时,网格上将弹出一个窗口,其中包含一个表单和用于在多个项目之间导航的控件(如果他们选择了多个项目)。

以下是示例图片: ExtJS Mockup

我创建窗口没有问题,但我很好奇如何处理多个“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:
ExtJS Mockup

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 技术交流群。

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

发布评论

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

评论(1

撞了怀 2024-11-23 18:11:48

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.

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