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


Java AjaxBehaviorEvent.getBehavior方法代码示例

本文整理汇总了Java中javax.faces.event.AjaxBehaviorEvent.getBehavior方法的典型用法代码示例。如果您正苦于以下问题:Java AjaxBehaviorEvent.getBehavior方法的具体用法?Java AjaxBehaviorEvent.getBehavior怎么用?Java AjaxBehaviorEvent.getBehavior使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.faces.event.AjaxBehaviorEvent的用法示例。


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

示例1: queueEvent

import javax.faces.event.AjaxBehaviorEvent; //导入方法依赖的package包/类
public void queueEvent(FacesEvent event) {
	FacesContext context = getFacesContext();

	if (isRequestSource(context, this) && event instanceof AjaxBehaviorEvent) {
		Map<String, String> params = context.getExternalContext().getRequestParameterMap();
		String eventName = params.get(Constants.RequestParams.PARTIAL_BEHAVIOR_EVENT_PARAM);
		String clientId = this.getClientId(context);
		AjaxBehaviorEvent behaviorEvent = (AjaxBehaviorEvent) event;

		String activeIndex = params.get(clientId + "_active");
		Tab tab = activeIndex != null ? getTabWithIndex(Integer.valueOf(activeIndex)) : null;

		if (eventName.equals("tabChange")) {
			TabChangeEvent changeEvent = new TabChangeEvent(this, behaviorEvent.getBehavior(), tab);
			changeEvent.setPhaseId(behaviorEvent.getPhaseId());
			super.queueEvent(changeEvent);
		}
	} else {
		super.queueEvent(event);
	}
}
 
开发者ID:edvin,项目名称:tornadofaces,代码行数:22,代码来源:TabParent.java

示例2: queueEvent

import javax.faces.event.AjaxBehaviorEvent; //导入方法依赖的package包/类
public void queueEvent(FacesEvent event) {
	FacesContext context = getFacesContext();

	if (isRequestSource(context, this) && event instanceof AjaxBehaviorEvent) {
		Map<String, String> params = context.getExternalContext().getRequestParameterMap();
		String eventName = params.get(PARTIAL_BEHAVIOR_EVENT_PARAM);
		AjaxBehaviorEvent behaviorEvent = (AjaxBehaviorEvent) event;

		if (eventName.equals("flip")) {
			FlipPanelEvent flipPanelEvent = new FlipPanelEvent(this, behaviorEvent.getBehavior());
			flipPanelEvent.setPhaseId(behaviorEvent.getPhaseId());
			super.queueEvent(flipPanelEvent);
		}
	} else {
		super.queueEvent(event);
	}
}
 
开发者ID:edvin,项目名称:tornadofaces,代码行数:18,代码来源:FlipPanel.java

示例3: queueEvent

import javax.faces.event.AjaxBehaviorEvent; //导入方法依赖的package包/类
public void queueEvent(FacesEvent event) {
	FacesContext context = getFacesContext();

	if (isRequestSource(context, this) && event instanceof AjaxBehaviorEvent) {
		Map<String, String> params = context.getExternalContext().getRequestParameterMap();
		String eventName = params.get(Constants.RequestParams.PARTIAL_BEHAVIOR_EVENT_PARAM);
		String clientId = getClientId(context);
		AjaxBehaviorEvent behaviorEvent = (AjaxBehaviorEvent) event;

		String expandedRowKey = getRequestedExpandRowKey(context);
		if (expandedRowKey != null)
			setRowIndexForRowKey(expandedRowKey);

		if (eventName.equals("rowSelect")) {
			String selectedRowKey = params.get(clientId + "_selected");
			setRowIndexForRowKey(selectedRowKey);
			SelectionEvent se = new SelectionEvent(this, behaviorEvent.getBehavior(), getRowData());
			se.setPhaseId(behaviorEvent.getPhaseId());
			super.queueEvent(se);
			return;
		}

	}

	super.queueEvent(event);
}
 
开发者ID:edvin,项目名称:tornadofaces,代码行数:27,代码来源:Table.java

示例4: queueEvent

import javax.faces.event.AjaxBehaviorEvent; //导入方法依赖的package包/类
public void queueEvent(FacesEvent event) {
	FacesContext context = getFacesContext();

	if (isRequestSource(context, this) && event instanceof AjaxBehaviorEvent) {
		Map<String, String> params = context.getExternalContext().getRequestParameterMap();
		String eventName = params.get(PARTIAL_BEHAVIOR_EVENT_PARAM);
		AjaxBehaviorEvent behaviorEvent = (AjaxBehaviorEvent) event;

		if (eventName.equals("change")) {
			SwitchEvent switchEvent = new SwitchEvent(this, behaviorEvent.getBehavior());
			switchEvent.setPhaseId(behaviorEvent.getPhaseId());
			super.queueEvent(switchEvent);
		}
	} else {
		super.queueEvent(event);
	}
}
 
开发者ID:edvin,项目名称:tornadofaces,代码行数:18,代码来源:Switch.java


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