javax.faces.webapp.UIComponentClassicTagBase.getFacesContext()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(10.1k)|赞(0)|评价(0)|浏览(123)

本文整理了Java中javax.faces.webapp.UIComponentClassicTagBase.getFacesContext()方法的一些代码示例,展示了UIComponentClassicTagBase.getFacesContext()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UIComponentClassicTagBase.getFacesContext()方法的具体详情如下:
包路径:javax.faces.webapp.UIComponentClassicTagBase
类名称:UIComponentClassicTagBase
方法名:getFacesContext

UIComponentClassicTagBase.getFacesContext介绍

暂无

代码示例

代码示例来源:origin: javax/javaee-web-api

/**
 * <p>Locate and return the nearest enclosing {@link UIComponentClassicTagBase}
 * if any; otherwise, return <code>null</code>.</p>
 *
 * @param context <code>PageContext</code> for the current page
 *
 * @return the parent tag
 */
public static UIComponentClassicTagBase getParentUIComponentClassicTagBase(PageContext context)
{
  return _getParentUIComponentClassicTagBase(getFacesContext(context));
}

代码示例来源:origin: com.sun.faces/jsf-api

/**
 * <p>Locate and return the nearest enclosing {@link UIComponentClassicTagBase}
 * if any; otherwise, return <code>null</code>.</p>
 *
 * @param context <code>PageContext</code> for the current page
 */
public static UIComponentClassicTagBase getParentUIComponentClassicTagBase(PageContext context)
{
  return _getParentUIComponentClassicTagBase(getFacesContext(context));
}

代码示例来源:origin: javax.faces/javax.faces-api

/**
 * <p>Locate and return the nearest enclosing {@link UIComponentClassicTagBase}
 * if any; otherwise, return <code>null</code>.</p>
 *
 * @param context <code>PageContext</code> for the current page
 *
 * @return the parent tag
 */
public static UIComponentClassicTagBase getParentUIComponentClassicTagBase(PageContext context)
{
  return _getParentUIComponentClassicTagBase(getFacesContext(context));
}

代码示例来源:origin: org.glassfish/javax.faces

/**
 * <p>Locate and return the nearest enclosing {@link UIComponentClassicTagBase}
 * if any; otherwise, return <code>null</code>.</p>
 *
 * @param context <code>PageContext</code> for the current page
 *
 * @return the parent tag
 */
public static UIComponentClassicTagBase getParentUIComponentClassicTagBase(PageContext context)
{
  return _getParentUIComponentClassicTagBase(getFacesContext(context));
}

代码示例来源:origin: javax.faces/com.springsource.javax.faces

private String generateIncrementedId (String componentId) {
  Map<String,Object> requestMap = getFacesContext().getExternalContext().getRequestMap();
  Integer serialNum = (Integer) requestMap.get(componentId);
  if (null == serialNum) {
    serialNum = 1;
  } else {
    serialNum = serialNum.intValue() + 1;
  }
  requestMap.put(componentId, serialNum);
  componentId = componentId + UNIQUE_ID_PREFIX + serialNum.intValue();
  return componentId;
}

代码示例来源:origin: eclipse-ee4j/mojarra

/**
 * <p>Locate and return the nearest enclosing {@link UIComponentClassicTagBase}
 * if any; otherwise, return <code>null</code>.</p>
 *
 * @param context <code>PageContext</code> for the current page
 *
 * @return the parent tag
 */
public static UIComponentClassicTagBase getParentUIComponentClassicTagBase(PageContext context)
{
  return _getParentUIComponentClassicTagBase(getFacesContext(context));
}

代码示例来源:origin: org.jboss.spec.javax.faces/jboss-jsf-api_2.0_spec

/**
 * <p>Locate and return the nearest enclosing {@link UIComponentClassicTagBase}
 * if any; otherwise, return <code>null</code>.</p>
 *
 * @param context <code>PageContext</code> for the current page
 */
public static UIComponentClassicTagBase getParentUIComponentClassicTagBase(PageContext context)
{
  return _getParentUIComponentClassicTagBase(getFacesContext(context));
}

代码示例来源:origin: jboss/jboss-javaee-specs

/**
 * <p>Locate and return the nearest enclosing {@link UIComponentClassicTagBase}
 * if any; otherwise, return <code>null</code>.</p>
 *
 * @param context <code>PageContext</code> for the current page
 *
 * @return the parent tag
 */
public static UIComponentClassicTagBase getParentUIComponentClassicTagBase(PageContext context)
{
  return _getParentUIComponentClassicTagBase(getFacesContext(context));
}

代码示例来源:origin: org.apache.myfaces.core/myfaces-api

@SuppressWarnings("unchecked")
private Set<String> getPreviousJspIdsSet()
{
  Set<String> previousJspIdsSet =
      (Set<String>)getFacesContext().getAttributes().get(PREVIOUS_JSP_IDS_SET);
  if (previousJspIdsSet == null)
  {
    previousJspIdsSet = new HashSet<String>();
    // Add it to the context! The next time is called
    // this method it takes the ref from the RequestContext
    getFacesContext().getAttributes().put(PREVIOUS_JSP_IDS_SET, previousJspIdsSet);
  }
  return previousJspIdsSet;
}

代码示例来源:origin: eclipse-ee4j/mojarra

/**
 * <p>Locate and return the nearest enclosing {@link UIComponentClassicTagBase}
 * if any; otherwise, return <code>null</code>.</p>
 *
 * @param context <code>PageContext</code> for the current page
 *
 * @return the parent tag
 */
public static UIComponentClassicTagBase getParentUIComponentClassicTagBase(PageContext context)
{
  return _getParentUIComponentClassicTagBase(getFacesContext(context));
}

代码示例来源:origin: org.glassfish/jakarta.faces

/**
 * <p>Locate and return the nearest enclosing {@link UIComponentClassicTagBase}
 * if any; otherwise, return <code>null</code>.</p>
 *
 * @param context <code>PageContext</code> for the current page
 *
 * @return the parent tag
 */
public static UIComponentClassicTagBase getParentUIComponentClassicTagBase(PageContext context)
{
  return _getParentUIComponentClassicTagBase(getFacesContext(context));
}

代码示例来源:origin: org.apache.myfaces/com.springsource.org.apache.myfaces.javax.faces

private boolean isIncludedOrForwarded() {
  return getFacesContext().getExternalContext().getRequestMap().
      containsKey("javax.servlet.include.request_uri");
}

代码示例来源:origin: org.apache.myfaces/com.springsource.org.apache.myfaces.javax.faces

private String createNextId(String componentId)
{
  Integer currentCounter = (Integer) getFacesContext().getExternalContext().getRequestMap().get(componentId);
  int iCurrentCounter = 1;
  if (currentCounter != null)
  {
    iCurrentCounter = currentCounter.intValue();
    iCurrentCounter++;
  }
  getFacesContext().getExternalContext().getRequestMap().put(componentId, new Integer(iCurrentCounter));
  componentId = componentId + UNIQUE_ID_PREFIX + iCurrentCounter;
  return componentId;
}

代码示例来源:origin: org.apache.myfaces/com.springsource.org.apache.myfaces.javax.faces

/**
 * Invoke encodeChildren on the associated UIComponent. Subclasses can
 * override this method to perform custom processing before or after
 * the UIComponent method invocation. This is only invoked for components
 * whose getRendersChildren method returns true.
 */
protected void encodeChildren()
    throws IOException
{
  if (log.isLoggable(Level.FINE))
    log.fine("Entered encodeChildren for client-Id: " + _componentInstance.getClientId(getFacesContext()));
  _componentInstance.encodeChildren(getFacesContext());
  if (log.isLoggable(Level.FINE))
    log.fine("Exited encodeChildren for client-Id: " + _componentInstance.getClientId(getFacesContext()));
}

代码示例来源:origin: org.apache.myfaces/com.springsource.org.apache.myfaces.javax.faces

/**
 * Invoke encodeEnd on the associated UIComponent. Subclasses can override this
 * method to perform custom processing before or after the UIComponent method
 * invocation.
 */
protected void encodeEnd()
    throws IOException
{
  if (log.isLoggable(Level.FINE))
    log.fine("Entered encodeEnd for client-Id: " + _componentInstance.getClientId(getFacesContext()));
  _componentInstance.encodeEnd(getFacesContext());
  if (log.isLoggable(Level.FINE))
    log.fine("Exited encodeEnd for client-Id: " + _componentInstance.getClientId(getFacesContext()));
}

代码示例来源:origin: org.apache.myfaces/com.springsource.org.apache.myfaces.javax.faces

private Set<String> getPreviousJspIdsSet()
{
  Set<String> previousJspIdsSet = (Set<String>) getFacesContext().getExternalContext()
      .getRequestMap().get(PREVIOUS_JSP_IDS_SET);
  if (previousJspIdsSet == null)
  {
    previousJspIdsSet = new HashSet<String>();
    //Add it to the context! The next time is called
    //this method it takes the ref from the RequestContext
    getFacesContext().getExternalContext().getRequestMap()
      .put(PREVIOUS_JSP_IDS_SET, previousJspIdsSet);
  }
  return previousJspIdsSet;
}

代码示例来源:origin: org.apache.myfaces/com.springsource.org.apache.myfaces.javax.faces

/**
 * Invoke encodeBegin on the associated UIComponent. Subclasses can
 * override this method to perform custom processing before or after
 * the UIComponent method invocation.
 */
protected void encodeBegin()
    throws IOException
{
  if (log.isLoggable(Level.FINE))
    log.fine("Entered encodeBegin for client-Id: " + _componentInstance.getClientId(getFacesContext()));
  _componentInstance.encodeBegin(getFacesContext());
  if (log.isLoggable(Level.FINE))
    log.fine("Exited encodeBegin");
}

代码示例来源:origin: javax.faces/com.springsource.javax.faces

/**
 * <p>Locate and return the nearest enclosing {@link UIComponentClassicTagBase}
 * if any; otherwise, return <code>null</code>.</p>
 *
 * @param context <code>PageContext</code> for the current page
 */
public static UIComponentClassicTagBase getParentUIComponentClassicTagBase(PageContext context) {
  FacesContext facesContext = getFacesContext(context);
  List list = (List) facesContext.getExternalContext().getRequestMap()
     .get(COMPONENT_TAG_STACK_ATTR);
  if (list != null) {
    return ((UIComponentClassicTagBase) list.get(list.size() - 1));
  } else {
    return (null);
  }
}

代码示例来源:origin: org.apache.myfaces.core/myfaces-api

/**
 * Invoke encodeBegin on the associated UIComponent. Subclasses can override this method to perform custom
 * processing before or after the UIComponent method invocation.
 */
protected void encodeBegin() throws IOException
{
  if (log.isLoggable(Level.FINE))
  {
    log.fine("Entered encodeBegin for client-Id: " + _componentInstance.getClientId(getFacesContext()));
  }
  _componentInstance.encodeBegin(getFacesContext());
  if (log.isLoggable(Level.FINE))
  {
    log.fine("Exited encodeBegin");
  }
}

代码示例来源:origin: org.apache.myfaces.core/myfaces-api

/**
 * Invoke encodeChildren on the associated UIComponent. Subclasses can override this method to perform custom
 * processing before or after the UIComponent method invocation. This is only invoked for components whose
 * getRendersChildren method returns true.
 */
protected void encodeChildren() throws IOException
{
  if (log.isLoggable(Level.FINE))
  {
    log.fine("Entered encodeChildren for client-Id: " + _componentInstance.getClientId(getFacesContext()));
  }
  _componentInstance.encodeChildren(getFacesContext());
  if (log.isLoggable(Level.FINE))
  {
    log.fine("Exited encodeChildren for client-Id: " + _componentInstance.getClientId(getFacesContext()));
  }
}

相关文章

微信公众号

最新文章

更多

UIComponentClassicTagBase类方法