本文整理汇总了Java中javax.faces.event.FacesEvent.getSource方法的典型用法代码示例。如果您正苦于以下问题:Java FacesEvent.getSource方法的具体用法?Java FacesEvent.getSource怎么用?Java FacesEvent.getSource使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.faces.event.FacesEvent
的用法示例。
在下文中一共展示了FacesEvent.getSource方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: queueEvent
import javax.faces.event.FacesEvent; //导入方法依赖的package包/类
/**
* Queues an event. If there is a currency set on this table, then
* the event will be wrapped so that when it is finally delivered, the correct
* currency will be restored.
* @param event a FacesEvent
*/
@Override
public void queueEvent(FacesEvent event)
{
if (event.getSource() == this)
{
// Remember non-SelectionEvents on ourselves. This
// is a hack to support validation in tableSelectXyz.
if (!(event instanceof SelectionEvent))
{
InternalState iState = _getInternalState(true);
iState._hasEvent = true;
}
}
// we want to wrap up
// the event so we can execute it in the correct context (with the correct
// rowKey/rowData):
Object currencyKey = getRowKey();
event = new TableRowEvent(this, event, currencyKey);
// Queue a CollectionContextEvent in order to allow this class to setup the component change
// before sub-classes attempt to process the table row event instance.
super.queueEvent(new CollectionContextEvent(this, event));
}
示例2: queueEvent
import javax.faces.event.FacesEvent; //导入方法依赖的package包/类
@Override
public void queueEvent(FacesEvent e)
{
if ((e instanceof PollEvent) && (e.getSource() == this))
{
if (isImmediate())
{
e.setPhaseId(PhaseId.ANY_PHASE);
}
else
{
e.setPhaseId(PhaseId.INVOKE_APPLICATION);
}
}
super.queueEvent(e);
}
示例3: queueEvent
import javax.faces.event.FacesEvent; //导入方法依赖的package包/类
/**
* * We don't want to update model if we have validation errors
* on the page, so if not immediate, queue the event in
* INVOKE_APPLICATION phase.
*/
@Override
public void queueEvent(FacesEvent e)
{
if ((e instanceof RangeChangeEvent) && (e.getSource() == this))
{
if (isImmediate())
{
e.setPhaseId(PhaseId.ANY_PHASE);
}
else
{
e.setPhaseId(PhaseId.INVOKE_APPLICATION);
}
}
super.queueEvent(e);
}
示例4: queueEvent
import javax.faces.event.FacesEvent; //导入方法依赖的package包/类
@Override
public void queueEvent(FacesEvent e)
{
if ((e instanceof DisclosureEvent) && (e.getSource() == this))
{
if (isImmediate())
{
e.setPhaseId(PhaseId.ANY_PHASE);
}
else
{
e.setPhaseId(PhaseId.INVOKE_APPLICATION);
}
}
super.queueEvent(e);
}
示例5: queueEvent
import javax.faces.event.FacesEvent; //导入方法依赖的package包/类
@Override
public void queueEvent(FacesEvent e)
{
if (e.getSource() == this && e instanceof ActionEvent)
{
if (isImmediate())
e.setPhaseId(PhaseId.ANY_PHASE);
else
e.setPhaseId(PhaseId.INVOKE_APPLICATION);
}
super.queueEvent(e);
}
示例6: queueEvent
import javax.faces.event.FacesEvent; //导入方法依赖的package包/类
@Override
public void queueEvent(FacesEvent e)
{
if (e.getSource() == this)
{
if (getActionType() == PREVIOUS_ACTION_TYPE)
e.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
else
e.setPhaseId(PhaseId.INVOKE_APPLICATION);
}
super.queueEvent(e);
}