/** Return the form ID of the form containing the given component */ public static String getFormId(FacesContext context, UIComponent component) { while (component != null && !(component instanceof UIForm)) { component = component.getParent(); } if (component != null) return ((UIForm) component).getId(); return null; }
/** Return the form ID of the form containing the given component */ public static String getFormId(FacesContext context, UIComponent component) { while (component != null && !(component instanceof UIForm)) { component = component.getParent(); } if (component != null) return ((UIForm) component).getId(); return null; }
/** Return the form ID of the form containing the given component */ public static String getFormId(FacesContext context, UIComponent component) { while (component != null && !(component instanceof UIForm)) { component = component.getParent(); } if (component != null) return ((UIForm) component).getId(); return null; }
public static void addForm(final FacesContext context, final UIForm form) { final Map map = context.getExternalContext().getRequestMap(); List forms = (List) map.get(KEY); if (forms == null) { forms = new ArrayList(); map.put(KEY, forms); registerRendererListener(form.getParent()); } forms.add(form.getId()); }
public boolean isListenerForSource(final Object source) { if (EnvUtils.isICEfacesView(FacesContext.getCurrentInstance()) && (source instanceof UIForm)) { UIForm form = (UIForm) source; String componentId = form.getId() + ID_SUFFIX; // Guard against duplicates within the same JSF lifecycle for (UIComponent comp : form.getParent().getChildren()) { if (componentId.equals(comp.getId())) { return false; } } return true; } else { return false; } } }
return false; String componentId = htmlForm.getId() + CAPTURE_SUBMIT_SUFFIX; if (!partialStateSaving) { for (UIComponent child : htmlForm.getChildren()) {
public boolean isListenerForSource(final Object source) { if (!(source instanceof UIForm)) { return false; } FacesContext facesContext = FacesContext.getCurrentInstance(); if (!EnvUtils.isICEfacesView(facesContext)) { return false; } UIForm htmlForm = (UIForm) source; String componentId = htmlForm.getId() + ID_SUFFIX; if (!partialStateSaving) { for (UIComponent child : htmlForm.getChildren()) { String id = child.getId(); if ((null != id) && id.endsWith(ID_SUFFIX)) { return false; } } } // Guard against duplicates within the same JSF lifecycle for (UIComponent comp : htmlForm.getChildren()) { if (componentId.equals(comp.getId())) { return false; } } return true; } }
public void processEvent(final SystemEvent event) throws AbortProcessingException { final UIForm form = (UIForm) event.getSource(); String componentId = form.getId() + CAPTURE_SUBMIT_SUFFIX;
public void processEvent(final SystemEvent event) throws AbortProcessingException { UIForm form = (UIForm) ((ComponentSystemEvent) event).getComponent(); String componentId = form.getId() + ID_SUFFIX; FacesContext context = FacesContext.getCurrentInstance(); ExternalContext externalContext = context.getExternalContext();