当前位置: 首页>>代码示例>>Java>>正文


Java TabChangeEvent类代码示例

本文整理汇总了Java中org.primefaces.event.TabChangeEvent的典型用法代码示例。如果您正苦于以下问题:Java TabChangeEvent类的具体用法?Java TabChangeEvent怎么用?Java TabChangeEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TabChangeEvent类属于org.primefaces.event包,在下文中一共展示了TabChangeEvent类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onTabChange

import org.primefaces.event.TabChangeEvent; //导入依赖的package包/类
/**
 * Method called when the tab is changed.
 * @param event The PrimeFaces tabChange event.
 */
public void onTabChange(TabChangeEvent event) {
    if (event == null || !(event.getComponent() instanceof TabView)) {
        throw new IllegalArgumentException("The event cant be null.");
    }
    TabView tv = (TabView) event.getComponent();
    this.activeTabIndex = tv.getActiveIndex();
}
 
开发者ID:stefanoberdoerfer,项目名称:exmatrikulator,代码行数:12,代码来源:GradeScriptController.java

示例2: testOnTabChangedComponentNull

import org.primefaces.event.TabChangeEvent; //导入依赖的package包/类
/**
 * Tests if an IllegalArgumentException gets thrown if the tab change
 * ui callback has no TabView component
 */
@Test(expected = IllegalArgumentException.class)
public void testOnTabChangedComponentNull() {
    TabChangeEvent eventMock = mock(TabChangeEvent.class);
    when(eventMock.getComponent()).thenReturn(null);
    scriptController.onTabChange(eventMock);
}
 
开发者ID:stefanoberdoerfer,项目名称:exmatrikulator,代码行数:11,代码来源:GradeScriptControllerTest.java

示例3: testOnTabChanged

import org.primefaces.event.TabChangeEvent; //导入依赖的package包/类
/**
 * Tests if an IllegalArgumentException gets thrown if the tab change
 * ui callback has no TabView component
 */
@Test
public void testOnTabChanged() {
    int newTabIdx = 1;
    TabChangeEvent eventMock = mock(TabChangeEvent.class);
    TabView tabViewMock = mock(TabView.class);
    when(tabViewMock.getActiveIndex()).thenReturn(newTabIdx);
    when(eventMock.getComponent()).thenReturn(tabViewMock);
    scriptController.onTabChange(eventMock);
    assertTrue(scriptController.getActiveTabIndex() == newTabIdx);
    assertSame(scriptController.getActiveParticipationType(),
            (course.getParticipationTypes().get(newTabIdx)));
}
 
开发者ID:stefanoberdoerfer,项目名称:exmatrikulator,代码行数:17,代码来源:GradeScriptControllerTest.java

示例4: onTabChange

import org.primefaces.event.TabChangeEvent; //导入依赖的package包/类
public void onTabChange(TabChangeEvent event) {
    if (event.getTab().getId().equals("notifications")) {
        displayNotification();
    }
}
 
开发者ID:pengchengluo,项目名称:Peking-University-Open-Research-Data-Platform,代码行数:6,代码来源:BuiltinUserPage.java

示例5: onChange

import org.primefaces.event.TabChangeEvent; //导入依赖的package包/类
public void onChange(TabChangeEvent event) {
    TabView parent = (TabView) event.getTab().getParent();
    this.tabIndex = parent.getActiveIndex();
    this.currentTestPlan = projectBean.getWorkload().getTestPlans().get(tabIndex);
}
 
开发者ID:intuit,项目名称:Tank,代码行数:6,代码来源:WorkloadScripts.java

示例6: onTabChange

import org.primefaces.event.TabChangeEvent; //导入依赖的package包/类
public void onTabChange(TabChangeEvent event) 
{   
    TabView tabView = (TabView) event.getComponent();
    activeTabIndex= tabView.getChildren().indexOf(event.getTab());
}
 
开发者ID:stephanrauh,项目名称:BabbageFaces,代码行数:6,代码来源:MenuController.java

示例7: onTabChange

import org.primefaces.event.TabChangeEvent; //导入依赖的package包/类
public void onTabChange(TabChangeEvent event) {
    FacesMessage msg = new FacesMessage("Tab Changed", "Active Tab: " + event.getTab().getTitle());

    FacesContext.getCurrentInstance().addMessage(null, msg);
}
 
开发者ID:websphere,项目名称:PrimefacesShowcase,代码行数:6,代码来源:TabBean.java

示例8: onPlayerChange

import org.primefaces.event.TabChangeEvent; //导入依赖的package包/类
public void onPlayerChange(TabChangeEvent event) {
    FacesMessage msg = new FacesMessage("Tab Changed", "Active Player: " + ((Player) event.getData()).getName());

    FacesContext.getCurrentInstance().addMessage(null, msg);
}
 
开发者ID:websphere,项目名称:PrimefacesShowcase,代码行数:6,代码来源:TabBean.java

示例9: tabChanged

import org.primefaces.event.TabChangeEvent; //导入依赖的package包/类
/**
 * Track that the currently selected tab has changed.
 * @param event
 */
public void tabChanged(TabChangeEvent event){
    TabView tv = (TabView)event.getTab().getParent();
    activeTabId = tv.getActiveIndex();
}
 
开发者ID:metno,项目名称:metadata-editor,代码行数:9,代码来源:EditorBean.java

示例10: groupChangeEvent

import org.primefaces.event.TabChangeEvent; //导入依赖的package包/类
/**
 *
 *
 * @param event
 */
public void groupChangeEvent(TabChangeEvent event) {
  // ..
}
 
开发者ID:UniversityOfWuerzburg-ChairCompSciVI,项目名称:ueps,代码行数:9,代码来源:ExGroupTableBean.java


注:本文中的org.primefaces.event.TabChangeEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。