Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用 GXT 2.1.1,我想将小部件值从一个选项卡传递到另一个选项卡。例如,我创建了两个选项卡,第一个选项卡在网格中显示学生的所有信息,包括姓名、加入日期、选择的课程....在其他选项卡中,我想显示学生信息。当用户从网格中选择学生时,应该将他带到下一个选项卡,其中包含该特定学生的所有详细信息。
将侦听器添加到网格(行单击)或添加“查看”按钮作为列之一并向其添加 clickListener。在侦听器中,获取学生的 id 并调用第二个选项卡上的方法以显示详细信息。然后只需调用
tabPanel.setSelection(secondTab); // tabPanel instance of TabPanel // secondTab instance of TabItem
这应该这样做。