/** * <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)); }
/** * <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)); }
/** * <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)); }
/** * <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)); }
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; }
/** * <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)); }
/** * <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)); }
/** * <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)); }
@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; }
/** * <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)); }
/** * <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)); }
private boolean isIncludedOrForwarded() { return getFacesContext().getExternalContext().getRequestMap(). containsKey("javax.servlet.include.request_uri"); }
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; }
/** * 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())); }
/** * 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())); }
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; }
/** * 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"); }
/** * <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); } }
/** * 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"); } }
/** * 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())); } }