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


Java ActionListener.processAction方法代码示例

本文整理汇总了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);
    }
  }
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:23,代码来源:UIXProgressTemplate.java

示例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);
            }
        }
    }
}
 
开发者ID:otsecbsol,项目名称:linkbinder,代码行数:17,代码来源:PreValidateEventListener.java

示例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);
  }
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:29,代码来源:UIXSingleStepTemplate.java

示例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);
        }
    }
}
 
开发者ID:qjafcunuas,项目名称:jbromo,代码行数:15,代码来源:UIDynamicTabPanel.java

示例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();
    }
  }
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:58,代码来源:UIXCommandTemplate.java

示例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);
  }
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:63,代码来源:UIXSelectInputTemplate.java

示例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();
    }
  }
}
 
开发者ID:alessandroleite,项目名称:maven-jdev-plugin,代码行数:57,代码来源:UIXCommandTemplate.java


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