/** * <p>The default behavior of this method is to * call {@link PartialViewContext#getExecuteIds()} * on the wrapped {@link PartialViewContext} object.</p> * * @see PartialViewContext#getExecuteIds() */ @Override public Collection<String> getExecuteIds() { return getWrapped().getExecuteIds(); }
@Override public Collection<String> getExecuteIds() { return getWrapped().getExecuteIds(); }
/** * <p>The default behavior of this method is to * call {@link PartialViewContext#getExecuteIds()} * on the wrapped {@link PartialViewContext} object.</p> * * @see PartialViewContext#getExecuteIds() */ @Override public Collection<String> getExecuteIds() { return getWrapped().getExecuteIds(); }
/** * <p>The default behavior of this method is to * call {@link PartialViewContext#getExecuteIds()} * on the wrapped {@link PartialViewContext} object.</p> * * @see PartialViewContext#getExecuteIds() */ @Override public Collection<String> getExecuteIds() { return getWrapped().getExecuteIds(); }
/** * <p>The default behavior of this method is to * call {@link PartialViewContext#getExecuteIds()} * on the wrapped {@link PartialViewContext} object.</p> * * @see PartialViewContext#getExecuteIds() */ public Collection<String> getExecuteIds() { return getWrapped().getExecuteIds(); }
/** * <p>The default behavior of this method is to * call {@link PartialViewContext#getExecuteIds()} * on the wrapped {@link PartialViewContext} object.</p> * * @see PartialViewContext#getExecuteIds() */ @Override public Collection<String> getExecuteIds() { return getWrapped().getExecuteIds(); }
/** * <p>The default behavior of this method is to * call {@link PartialViewContext#getExecuteIds()} * on the wrapped {@link PartialViewContext} object.</p> * * @see PartialViewContext#getExecuteIds() */ @Override public Collection<String> getExecuteIds() { return getWrapped().getExecuteIds(); }
/** * <p>The default behavior of this method is to * call {@link PartialViewContext#getExecuteIds()} * on the wrapped {@link PartialViewContext} object.</p> * * @see PartialViewContext#getExecuteIds() */ @Override public Collection<String> getExecuteIds() { return getWrapped().getExecuteIds(); }
/** * <p>The default behavior of this method is to * call {@link PartialViewContext#getExecuteIds()} * on the wrapped {@link PartialViewContext} object.</p> * * @see PartialViewContext#getExecuteIds() */ @Override public Collection<String> getExecuteIds() { return getWrapped().getExecuteIds(); }
/** * <p>The default behavior of this method is to * call {@link PartialViewContext#getExecuteIds()} * on the wrapped {@link PartialViewContext} object.</p> * * @see PartialViewContext#getExecuteIds() */ @Override public Collection<String> getExecuteIds() { return getWrapped().getExecuteIds(); }
UIViewRoot viewRoot = context.getViewRoot(); PartialViewContext partialViewContext = facesContext.getPartialViewContext(); Set<EditableValueHolder> inputs = new HashSet<EditableValueHolder>(); // First find all to be rendered inputs and add them to the set. findAndAddEditableValueHolders(partialViewContext.getRenderIds(), inputs); // Then find all executed inputs and remove them from the set. findAndRemoveEditableValueHolders(partialViewContext.getExecuteIds(), inputs); // The set now contains inputs which are to be rendered, but which are not been executed. Reset them. for (EditableValueHolder input : inputs) { input.resetValue(); }
private void processPartialExecute(UIViewRoot viewRoot, PhaseId phaseId) { PartialViewContext pvc = _facesContext.getPartialViewContext(); Collection<String> executeIds = pvc.getExecuteIds(); if (executeIds == null || executeIds.isEmpty()) { return; } Set<VisitHint> hints = new HashSet<VisitHint>(); hints.add(VisitHint.EXECUTE_LIFECYCLE); hints.add(VisitHint.SKIP_UNRENDERED); VisitContext visitCtx = VisitContext.createVisitContext(_facesContext, executeIds, hints); viewRoot.visitTree(visitCtx, new PhaseAwareVisitCallback(_facesContext, phaseId)); }
private void processPartialExecute(UIViewRoot viewRoot, PhaseId phaseId) { PartialViewContext pvc = _facesContext.getPartialViewContext(); Collection<String> executeIds = pvc.getExecuteIds(); if (executeIds == null || executeIds.isEmpty()) { return; } Set<VisitHint> hints = new HashSet<VisitHint>(); hints.add(VisitHint.EXECUTE_LIFECYCLE); hints.add(VisitHint.SKIP_UNRENDERED); VisitContext visitCtx = VisitContext.createVisitContext(_facesContext, executeIds, hints); viewRoot.visitTree(visitCtx, new PhaseAwareVisitCallback(_facesContext, phaseId)); }
@Override public Collection<String> getExecuteIds() { assertNotReleased(); if (detectContextMode() == ContextMode.EXTENDED) { if (executeIds == null) { executeIds = new LinkedHashSet<String>(); visitActivatorAtExecute(); } return executeIds; } else { return wrappedViewContext.getExecuteIds(); } }
private void processPartialExecute(UIViewRoot viewRoot, PhaseId phaseId) { PartialViewContext pvc = _facesContext.getPartialViewContext(); Collection<String> executeIds = pvc.getExecuteIds(); if (executeIds == null || executeIds.isEmpty()) { return; } VisitContext visitCtx = getVisitContextFactory().getVisitContext(_facesContext, executeIds, PARTIAL_EXECUTE_HINTS); viewRoot.visitTree(visitCtx, new PhaseAwareVisitCallback(_facesContext, phaseId)); }
/** * 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) { FacesContext context = FacesContext.getCurrentInstance(); PartialViewContext partialViewContext = context.getPartialViewContext(); if (partialViewContext.isAjaxRequest()) { Collection<String> renderIds = partialViewContext.getRenderIds(); 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); } }
private void applyNGSyncModelValues() { FacesContext ctx = FacesContext.getCurrentInstance(); PartialViewContext pvc = ctx.getPartialViewContext(); Collection<String> executeIDs = pvc.getExecuteIds(); if (null != executeIDs) { for (String clientID : executeIDs) { UIViewRoot viewRoot = ctx.getViewRoot(); UIComponent c = viewRoot.findComponent(clientID); if (c == null) { c = findByID(viewRoot, clientID); if (null == c) throw new FacesException("Couldn't find the component with the id " + clientID + ". Possibly this is a configuration error."); } if (c instanceof PuiSync) { if (c.isInView()) { // PuiSync syncElement = (PuiSync) c; c.decode(ctx); } } } } }
protected Clicked wasClicked(final ValidationContext context, final UICommand command) { String clientId = command.getClientId(context.getFacesContext()); String value = context.getFacesContext().getExternalContext().getRequestParameterMap().get(clientId); if (value != null && (value.equals(clientId) || value.equals(command.getValue()))) { return new Clicked(true, clientId); } Clicked clicked = wasComponentWithRowIdClicked(context, command, clientId); if (clicked.isClicked()) { return clicked; } PartialViewContext partialContext = context.getFacesContext().getPartialViewContext(); if (partialContext != null && partialContext.isPartialRequest()) { // Is an ajax call partially processing the component tree Collection<String> execIds = partialContext.getExecuteIds(); return new Clicked(execIds.contains(clientId)); } return new Clicked(false); }
/** * If this is invoked during a hashparam postback, then decode as if immediate=true to save lifecycle overhead. */ @Override public void processDecodes(FacesContext context) { if (isHashParamRequest(context) && Ajax.getContext().getExecuteIds().contains(getClientId(context))) { String oldHashQueryString = getHashQueryString(); Map<String, List<String>> hashParams = toParameterMap(getRequestParameter(context, "hash")); for (HashParam hashParam : getHashParameters(context)) { List<String> values = hashParams.get(hashParam.getName()); hashParam.decodeImmediately(context, values != null ? values.get(0) : ""); } String newHashQueryString = getHashQueryString(); if (!Objects.equals(oldHashQueryString, newHashQueryString)) { fireEvent(new HashChangeEvent(context, oldHashQueryString, newHashQueryString)); } renderResponse(); } }
/** * If this is invoked during a hashparam postback, then decode as if immediate=true to save lifecycle overhead. */ @Override public void processDecodes(FacesContext context) { if (isHashParamRequest(context) && Ajax.getContext().getExecuteIds().contains(getClientId(context))) { String oldHashQueryString = getHashQueryString(); Map<String, List<String>> hashParams = toParameterMap(getRequestParameter(context, "hash")); for (HashParam hashParam : getHashParameters(context)) { List<String> values = hashParams.get(hashParam.getName()); hashParam.decodeImmediately(context, values != null ? values.get(0) : ""); } String newHashQueryString = getHashQueryString(); if (!Objects.equals(oldHashQueryString, newHashQueryString)) { fireEvent(new HashChangeEvent(context, oldHashQueryString, newHashQueryString)); } renderResponse(); } }