本文整理汇总了Java中javax.faces.event.ActionListener.processAction方法的典型用法代码示例。如果您正苦于以下问题:Java ActionListener.processAction方法的具体用法?Java ActionListener.processAction怎么用?Java ActionListener.processAction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.faces.event.ActionListener
的用法示例。
在下文中一共展示了ActionListener.processAction方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: broadcast
import javax.faces.event.ActionListener; //导入方法依赖的package包/类
@Override
public void broadcast(FacesEvent event) throws AbortProcessingException
{
super.broadcast(event);
// Notify the specified action listener method (if any),
// and the default action listener
if (event instanceof ActionEvent)
{
FacesContext context = getFacesContext();
MethodBinding mb = getActionListener();
if (mb != null)
mb.invoke(context, new Object[] { event });
ActionListener defaultActionListener =
context.getApplication().getActionListener();
if (defaultActionListener != null)
{
defaultActionListener.processAction((ActionEvent) event);
}
}
}
示例2: processEvent
import javax.faces.event.ActionListener; //导入方法依赖的package包/类
@Override
public void processEvent(SystemEvent event) throws AbortProcessingException {
if (event instanceof PreValidateEvent) {
UIViewRoot viewRoot = getUIViewRoot(event);
if (null != viewRoot) {
ActionListener listener
= createActionEventListener(event, PROP_VALIDATOR_PREFIX);
if (null != listener) {
// PreValidaeEventは必要な場合だけ登録されるので、存在しない場合でも
// エラーではありません.
ActionEvent ae = new ActionEvent(viewRoot);
listener.processAction(ae);
}
}
}
}
示例3: broadcast
import javax.faces.event.ActionListener; //导入方法依赖的package包/类
@Override
public void broadcast(FacesEvent event) throws AbortProcessingException
{
// Perform standard superclass processing
super.broadcast(event);
FacesContext context = getFacesContext();
// Notify the specified listener method (if any)
if (event instanceof ActionEvent)
{
if (getActionType() == PREVIOUS_ACTION_TYPE)
{
broadcastToMethodBinding(event, getPreviousActionListener());
}
else
{
broadcastToMethodBinding(event, getNextActionListener());
}
ActionListener defaultActionListener =
context.getApplication().getActionListener();
if (defaultActionListener != null)
defaultActionListener.processAction((ActionEvent) event);
}
}
示例4: actionListener
import javax.faces.event.ActionListener; //导入方法依赖的package包/类
/**
* Execute action listeners on a tab.
* @param index the index of the tab to execute action listeners.
*/
private void actionListener(final int index) {
final UIComponent component = getItemComponent(index);
final ActionListener[] actions = (ActionListener[]) component.getAttributes().get("actionListeners");
if (actions != null && actions.length > 0) {
final ActionEvent event = new ActionEvent(component);
for (final ActionListener action : actions) {
action.processAction(event);
}
}
}
示例5: broadcast
import javax.faces.event.ActionListener; //导入方法依赖的package包/类
@Override
public void broadcast(FacesEvent event) throws AbortProcessingException
{
// Perform special processing for ActionEvents: tell
// the RequestContext to remember this command instance
// so that the NavigationHandler can locate us to queue
// a LaunchEvent.
if (event instanceof ActionEvent)
{
RequestContext afContext = RequestContext.getCurrentInstance();
afContext.getDialogService().setCurrentLaunchSource(this);
try
{
// Perform standard superclass processing
super.broadcast(event);
// Notify the specified action listener method (if any),
// and the default action listener
broadcastToMethodBinding(event, getActionListener());
FacesContext context = getFacesContext();
ActionListener defaultActionListener =
context.getApplication().getActionListener();
if (defaultActionListener != null)
{
defaultActionListener.processAction((ActionEvent) event);
}
}
finally
{
afContext.getDialogService().setCurrentLaunchSource(null);
}
}
else
{
// Perform standard superclass processing
super.broadcast(event);
if (event instanceof LaunchEvent)
{
broadcastToMethodExpression(event, getLaunchListener());
boolean useWindow =
Boolean.TRUE.equals(getAttributes().get("useWindow"));
((LaunchEvent) event).launchDialog(useWindow);
}
else if (event instanceof ReturnEvent)
{
broadcastToMethodExpression(event, getReturnListener());
// =-=AEW: always jump to render response??? Seems the safest
// option, because we don't want to immediately update a model
// or really perform any validation.
getFacesContext().renderResponse();
}
}
}
示例6: broadcast
import javax.faces.event.ActionListener; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void broadcast(FacesEvent event) throws AbortProcessingException
{
if (event instanceof ActionEvent)
{
RequestContext afContext = RequestContext.getCurrentInstance();
afContext.getDialogService().setCurrentLaunchSource(this);
try
{
// Perform standard superclass processing
super.broadcast(event);
// Notify the specified action listener method (if any),
// and the default action listener
broadcastToMethodBinding(event, getActionListener());
FacesContext context = getFacesContext();
ActionListener defaultActionListener =
context.getApplication().getActionListener();
if (defaultActionListener != null)
{
defaultActionListener.processAction((ActionEvent) event);
}
}
finally
{
afContext.getDialogService().setCurrentLaunchSource(null);
}
}
else if (event instanceof LaunchEvent)
{
// =-=AEW Support launch listeners on SelectInput?
// super.broadcast(event);
//
// __broadcast(event, getLaunchListener());
((LaunchEvent) event).launchDialog(true);
}
else if (event instanceof ReturnEvent)
{
super.broadcast(event);
broadcastToMethodExpression(event, getReturnListener());
Object returnValue = ((ReturnEvent) event).getReturnValue();
if (returnValue != null)
{
setSubmittedValue(returnValue);
}
// =-=AEW: always jump to render response??? Seems the safest
// option, because we don't want to immediately update a model
// or really perform any validation.
getFacesContext().renderResponse();
}
else
{
super.broadcast(event);
}
}
示例7: broadcast
import javax.faces.event.ActionListener; //导入方法依赖的package包/类
public void broadcast(FacesEvent event) throws AbortProcessingException
{
// Perform special processing for ActionEvents: tell
// the RequestContext to remember this command instance
// so that the NavigationHandler can locate us to queue
// a LaunchEvent.
if (event instanceof ActionEvent)
{
RequestContext afContext = RequestContext.getCurrentInstance();
afContext.getDialogService().setCurrentLaunchSource(this);
try
{
// Perform standard superclass processing
super.broadcast(event);
// Notify the specified action listener method (if any),
// and the default action listener
__broadcast(event, getActionListener());
FacesContext context = getFacesContext();
ActionListener defaultActionListener =
context.getApplication().getActionListener();
if (defaultActionListener != null)
{
defaultActionListener.processAction((ActionEvent) event);
}
}
finally
{
afContext.getDialogService().setCurrentLaunchSource(null);
}
}
else
{
// Perform standard superclass processing
super.broadcast(event);
if (event instanceof LaunchEvent)
{
__broadcast(event, getLaunchListener());
boolean useWindow =
Boolean.TRUE.equals(getAttributes().get("useWindow"));
((LaunchEvent) event).launchDialog(useWindow);
}
else if (event instanceof ReturnEvent)
{
__broadcast(event, getReturnListener());
// =-=AEW: always jump to render response??? Seems the safest
// option, because we don't want to immediately update a model
// or really perform any validation.
getFacesContext().renderResponse();
}
}
}