本文整理汇总了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);
}
}
示例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);
}
}
示例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);
}
示例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);
}
}