Java Code Examples for javax.faces.component.UIComponent#processUpdates()

The following examples show how to use javax.faces.component.UIComponent#processUpdates() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractDataView.java    From XPagesExtensionLibrary with Apache License 2.0 5 votes vote down vote up
@Override
protected void revokeControlData(List<ShadowedObject> shadowedObjects,
        FacesContext context) {
    if (null != processFacetsForPhase && ExtLibUtil.isXPages852()) {
        try {
            // workaround for SPR#MKEE8BFEDR: Repeat, input values in header
            // are not processed when submitted.
            if (getFacetCount() > 0) {
                int phaseOrdinal = processFacetsForPhase.getOrdinal();
                for (UIComponent facet : TypedUtil.getFacets(this).values()) {
                    if (!facet.isRendered()) {
                        continue;
                    }
                    if (phaseOrdinal == PhaseId.APPLY_REQUEST_VALUES
                            .getOrdinal()) {
                        facet.processDecodes(context);
                        continue;
                    }
                    if (phaseOrdinal == PhaseId.UPDATE_MODEL_VALUES
                            .getOrdinal()) {
                        facet.processUpdates(context);
                        continue;
                    }
                    if (phaseOrdinal == PhaseId.PROCESS_VALIDATIONS
                            .getOrdinal()) {
                        facet.processValidators(context);
                        continue;
                    }
                }
            }
        }
        finally {
            processFacetsForPhase = null;
        }
    }
    super.revokeControlData(shadowedObjects, context);
}
 
Example 2
Source File: UISwitchFacet.java    From XPagesExtensionLibrary with Apache License 2.0 5 votes vote down vote up
@Override
public void processUpdates(FacesContext context) {
    if (!isRendered()) {
        return;
    }
	UIComponent facet = selectFacet(); 
	if(facet!=null) {
		try {
			facet.processUpdates(context);
		} finally {
        	unselectFacet();
		}
    }
}
 
Example 3
Source File: UIDataRepeater.java    From fenixedu-academic with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void processUpdates(FacesContext context) {
    int first = getFirst();
    int rows = getRows();
    int last;
    if (rows == 0) {
        last = getRowCount();
    } else {
        last = first + rows;
    }
    for (int rowIndex = first; rowIndex < last; rowIndex++) {
        setRowIndex(rowIndex);
        if (isRowAvailable()) {
            for (Iterator it = getChildren().iterator(); it.hasNext();) {
                UIComponent child = (UIComponent) it.next();
                // For some reason its necessary to touch Id property,
                // otherwise the child control will not call getClientId
                // on
                // parent (NamingContainer)
                child.setId(child.getId());

                if (!child.isRendered()) {
                    continue;
                }
                child.processUpdates(context);
            }
        }
    }

    setRowIndex(-1);

    super.processUpdates(context);
}