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


Java AbortProcessingException类代码示例

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


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

示例1: processValueChange

import javax.faces.event.AbortProcessingException; //导入依赖的package包/类
/**
 * This methods is used as a callback for value-changed-event of the select
 * marketplace facelet.
 */
public void processValueChange(ValueChangeEvent event)
        throws AbortProcessingException {
	
	String selectedMarketplaceId = (String) event.getNewValue();
	
	if (selectedMarketplaceId.equals("0")) {
		marketplaceBean.setMarketplaceId(null);
	} else{
		marketplaceBean.setMarketplaceId(selectedMarketplaceId);
	}
	
    resetMembers();
    resetStage();
    this.marketplaceBean.processValueChange(event);
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:20,代码来源:TranslationBean.java

示例2: broadcastToMethodExpression

import javax.faces.event.AbortProcessingException; //导入依赖的package包/类
/**
 * Broadcast an event to a MethodExpression.
 * This can be used to support MethodBindings such as the "actionListener"
 * binding on ActionSource components:
 * <tr:commandButton actionListener="#{mybean.myActionListener}">
 */
protected final void broadcastToMethodExpression(
  FacesEvent event,
  MethodExpression method) throws AbortProcessingException
{
  if (method != null)
  {
    try
    {
      FacesContext context = getFacesContext();
      method.invoke(context.getELContext(), new Object[] { event });
    }
    catch (ELException ee)
    {
      Throwable t = ee.getCause();
      // Unwrap AbortProcessingExceptions
      if (t instanceof AbortProcessingException)
        throw ((AbortProcessingException) t);
      throw ee;
    }
  }
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:28,代码来源:UIXComponentBase.java

示例3: processEvent

import javax.faces.event.AbortProcessingException; //导入依赖的package包/类
public void processEvent(ComponentSystemEvent event)
  throws AbortProcessingException
{
  boolean inContextAtMethodInvocation = _inContext;
  if (!inContextAtMethodInvocation)
  {
    _setupContextChange();
  }

  try
  {
    super.processEvent(event);
  }
  finally
  {
    if (!inContextAtMethodInvocation)
    {
      _tearDownContextChange();
    }
  }
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:22,代码来源:UIXCollection.java

示例4: __handleBroadcast

import javax.faces.event.AbortProcessingException; //导入依赖的package包/类
static void __handleBroadcast(
  UIXHierarchy  comp,
  FacesEvent    event,
  RowKeySet     state,
  MethodExpression method) throws AbortProcessingException
{
  // Notify the specified disclosure listener method (if any)
  if (event instanceof RowDisclosureEvent)
  {
    RowDisclosureEvent dEvent = (RowDisclosureEvent) event;
    state.removeAll(dEvent.getRemovedSet());
    state.addAll(dEvent.getAddedSet());
    //pu: Implicitly record a Change for 'disclosedRowKeys' attribute
    comp.addAttributeChange("disclosedRowKeys", state);
    comp.broadcastToMethodExpression(event, method);
  }
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:18,代码来源:HierarchyUtils.java

示例5: broadcast

import javax.faces.event.AbortProcessingException; //导入依赖的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

示例6: broadcast

import javax.faces.event.AbortProcessingException; //导入依赖的package包/类
@Override
public void broadcast(FacesEvent event)
  throws AbortProcessingException
{
  if (event instanceof WrapperEvent)
  {
    final WrapperEvent wrapper = (WrapperEvent) event;
    final FacesContext context = FacesContext.getCurrentInstance();
    Runnable runner = new Runnable()
    {
      public void run()
      {
        wrapper.broadcastWrappedEvent(context);
      }
    };
    _processPhase(context, runner);
  }
  else
  {
    super.broadcast(event);
  }
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:23,代码来源:UIXComponentRefTemplate.java

示例7: broadcast

import javax.faces.event.AbortProcessingException; //导入依赖的package包/类
/**
 * Delivers an event.
 * @param event
 * @throws javax.faces.event.AbortProcessingException
 */
@Override
public void broadcast(FacesEvent event) throws AbortProcessingException
{
  if (event instanceof SelectionEvent)
  {
    //pu: Implicitly record a Change for 'selectionState' attribute
    //=-=pu: This ain't getting restored. Check with Arj or file a bug.
    addAttributeChange("selectedRowKeys",
                       getSelectedRowKeys());
    broadcastToMethodExpression(event, getSelectionListener());
  }

  HierarchyUtils.__handleBroadcast(this,
                                    event,
                                    getDisclosedRowKeys(),
                                    getRowDisclosureListener());
  super.broadcast(event);
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:24,代码来源:UIXTreeTemplate.java

示例8: processComponent

import javax.faces.event.AbortProcessingException; //导入依赖的package包/类
/**
 * Sets up the context for the child and processes it
 */
public void processComponent(
  FacesContext context,
  ComponentProcessingContext cpContext,
  UIComponent component,
  Object callbackContext) throws IOException
{
  try
  {
    process(component, cpContext);
  }
  catch (IOException ioe)
  {
    throw ioe;
  }
  catch (AbortProcessingException ape)
  {
    // we're done, so abort
    _exception = ape;
    throw ape;
  }
  catch (Exception e)
  {
    _exception = e;
  }
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:29,代码来源:UIXIteratorTemplate.java

示例9: broadcast

import javax.faces.event.AbortProcessingException; //导入依赖的package包/类
@Override
public void broadcast(FacesEvent event) throws AbortProcessingException
{
  // Notify the specified RangeChanged listener method (if any)
  if (event instanceof RangeChangeEvent)
  {
    RangeChangeEvent gtEvent = (RangeChangeEvent)event;
    // update first when the event is delivered
    setFirst(gtEvent.getNewStart());

    broadcastToMethodExpression(event, getRangeChangeListener());
  }

  // Perform standard superclass processing
  super.broadcast(event);
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:17,代码来源:UIXSelectRangeTemplate.java

示例10: broadcast

import javax.faces.event.AbortProcessingException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 *
 * Overridden to handle broadcast of the selection and the row disclosure events
 */

@Override
public void broadcast(FacesEvent event)
  throws AbortProcessingException
{
  if (event instanceof SelectionEvent)
  {
    //vg: Implicitly record a Change for 'selectionState' attribute
    addAttributeChange("selectedRowKeys", getSelectedRowKeys());
    broadcastToMethodExpression(event, getSelectionListener());
  }
  else if (event instanceof RowDisclosureEvent)
  {
    RowDisclosureEvent dEvent = (RowDisclosureEvent) event;
    RowKeySet          state = getGroupDisclosedRowKeys();

    state.removeAll(dEvent.getRemovedSet());
    state.addAll(dEvent.getAddedSet());
    //vg: Implicitly record a Change for 'groupDisclosedRowKeys' attribute
    addAttributeChange("groupDisclosedRowKeys", state);
    broadcastToMethodExpression(event, getGroupDisclosureListener());
  }
  super.broadcast(event);
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:30,代码来源:UIXListViewTemplate.java

示例11: broadcast

import javax.faces.event.AbortProcessingException; //导入依赖的package包/类
@Override
public void broadcast(FacesEvent event) throws AbortProcessingException
{
  // Notify the specified disclosure listener method (if any)
  if (event instanceof FocusEvent)
  {
    setFocusRowKey(getRowKey());
    //pu: Implicitly record a Change for 'focusPath' attribute
    addAttributeChange("focusPath",
                       getFocusRowKey());
    // it is nice to expand the focused item:
    getDisclosedRowKeys().add();

    broadcastToMethodExpression(event, getFocusListener());
  }
  else if (event instanceof RangeChangeEvent)
  {
    RangeChangeEvent rce = (RangeChangeEvent) event;
    setFirst(rce.getNewStart());
    broadcastToMethodExpression(event, getRangeChangeListener());
  }

  // Perform standard superclass processing
  super.broadcast(event);
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:26,代码来源:UIXTreeTableTemplate.java

示例12: processAction

import javax.faces.event.AbortProcessingException; //导入依赖的package包/类
/**
 * Handle the reset input action as follows, only and only if the current request is an ajax request and the
 * {@link PartialViewContext#getRenderIds()} does not return an empty collection nor is the same as
 * {@link PartialViewContext#getExecuteIds()}: find all {@link EditableValueHolder} components based on
 * {@link PartialViewContext#getRenderIds()} and if the component is not covered by
 * {@link PartialViewContext#getExecuteIds()}, then invoke {@link EditableValueHolder#resetValue()} on the
 * component.
 * @throws IllegalArgumentException When one of the client IDs resolved to a <code>null</code> component. This
 * would however indicate a bug in the concrete {@link PartialViewContext} implementation which is been used.
 */
@Override
public void processAction(ActionEvent event) throws AbortProcessingException {
	FacesContext context = FacesContext.getCurrentInstance();
	PartialViewContext partialViewContext = context.getPartialViewContext();

	if (partialViewContext.isAjaxRequest()) {
		Collection<String> renderIds = getRenderIds(partialViewContext);

		if (!renderIds.isEmpty() && !partialViewContext.getExecuteIds().containsAll(renderIds)) {
			context.getViewRoot().visitTree(createVisitContext(context, renderIds, VISIT_HINTS), VISIT_CALLBACK);
		}
	}

	if (wrapped != null && event != null) {
		wrapped.processAction(event);
	}
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:28,代码来源:ResetInputAjaxActionListener.java

示例13: createActionEventListener

import javax.faces.event.AbortProcessingException; //导入依赖的package包/类
/**
 * viewIdに対応付けられているActionListener実装クラスインスタンスを生成する.
 * <p>
 * 設定ファイル(system-event-listener.properties)で、イベント名とviewId(画面ID)
 * を組み合わせた内容が設定キーです。
 * <p>
 * 例)prerender.admin.adminHome=jp.co.opentone.bsol.mer.view.admin.AdminHomePrerenderListener
 * <p>
 * 引数prefixには上例の"prerender"に該当する文字列を指定します.
 * @param event {@link SystemEvent}
 * @param prefix 設定prefix
 * @return 生成したActionListenerインスタンス. 設定無しの場合はnull
 * @throws AbortProcessingException {@link AbortProcessingException}
 */
protected ExtendedActionListener createActionEventListener(SystemEvent event, String prefix)
    throws AbortProcessingException {
    ExtendedActionListener listener = null;

    Object source = event.getSource();
    if (source instanceof UIViewRoot) {
        UIViewRoot viewRoot = (UIViewRoot) source;
        String viewId = viewRoot.getViewId();
        if (StringUtils.isNotEmpty(viewId)) {
            // viewIdをプロパティキーに変換
            String propKey = PropertyUtil.createPropertyKeyForViewId(prefix, viewId);
            listener = createActionEventListener(propKey);
        }
    }
    return listener;
}
 
开发者ID:otsecbsol,项目名称:linkbinder,代码行数:31,代码来源:ExtendedSystemEventListener.java

示例14: processEvent

import javax.faces.event.AbortProcessingException; //导入依赖的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

示例15: createRedirectUrlFromViewId

import javax.faces.event.AbortProcessingException; //导入依赖的package包/类
/**
 * リダイレクト先のviewIdからurlを作成します.
 * @param contextPath リクエストのContextPath
 * @param viewId redirect先のviewId
 * @param paramMap パラメータmap
 * @param enc Character Encoding文字列
 * @return redirect先のurl
 */
public static String createRedirectUrlFromViewId(
        String contextPath, String viewId, Map<String, String> paramMap, String enc) {
    StringBuffer url = new StringBuffer(contextPath);
    url.append(viewId.replace(".xhtml", ".jsf"));
    try {
        if (null != paramMap && 0 < paramMap.size()) {
            for (String key : paramMap.keySet()) {
                if (-1 == url.indexOf("?")) {
                    url.append('?');
                } else {
                    url.append('&');
                }
                String value = URLEncoder.encode(paramMap.get(key), enc);
                url.append(String.format("%s=%s", key, value));
            }
        }
    } catch (UnsupportedEncodingException e) {
        // 論理的にはプログラムエラー以外発生しないエラーと考えられる。
        throw new AbortProcessingException(e);
    }
    return url.toString();
}
 
开发者ID:otsecbsol,项目名称:linkbinder,代码行数:31,代码来源:PageNavigationUtil.java


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