Search in sources :

Example 21 with UIData

use of javax.faces.component.UIData in project TNTConcept by autentia.

the class PositionBean method deleteTag.

public String deleteTag() {
    final UIData table = (UIData) FacesUtils.getComponent("position:tags");
    final Tag toDelete = (Tag) table.getRowData();
    position.getTags().remove(toDelete);
    return NavigationResults.EDIT;
}
Also used : Tag(com.autentia.tnt.businessobject.Tag) UIData(javax.faces.component.UIData)

Example 22 with UIData

use of javax.faces.component.UIData in project liferay-faces-alloy by liferay.

the class Paginator method getUIData.

public final UIData getUIData() {
    UIData uiData = null;
    String for_ = getFor();
    if (for_ == null) {
        uiData = getUIDataParent(this);
    } else {
        UIComponent forComponent = findComponent(for_);
        if (forComponent != null) {
            if (forComponent instanceof UIData) {
                uiData = (UIData) forComponent;
            }
        }
    }
    return uiData;
}
Also used : UIComponent(javax.faces.component.UIComponent) UIData(javax.faces.component.UIData)

Example 23 with UIData

use of javax.faces.component.UIData in project liferay-faces-alloy by liferay.

the class Paginator method getExecute.

@Override
public String getExecute() {
    String execute = super.getExecute();
    if ((execute != null) && execute.contains("@for")) {
        UIData uiData = getUIData();
        if (uiData != null) {
            String uiDataId = uiData.getId();
            execute = execute.replace("@for", uiDataId);
        }
    }
    return execute;
}
Also used : UIData(javax.faces.component.UIData)

Example 24 with UIData

use of javax.faces.component.UIData in project liferay-faces-alloy by liferay.

the class Paginator method getUIDataParent.

private UIData getUIDataParent(UIComponent uiComponent) {
    UIData uiDataParent = null;
    UIComponent parent = uiComponent.getParent();
    if (parent != null) {
        if (parent instanceof UIData) {
            uiDataParent = (UIData) parent;
        } else {
            uiDataParent = getUIDataParent(parent);
        }
    }
    return uiDataParent;
}
Also used : UIComponent(javax.faces.component.UIComponent) UIData(javax.faces.component.UIData)

Example 25 with UIData

use of javax.faces.component.UIData in project primefaces by primefaces.

the class RowExpressionResolver method resolveClientIds.

@Override
public String resolveClientIds(FacesContext context, UIComponent source, UIComponent last, String expression, Set<SearchExpressionHint> hints) {
    int row = validate(context, source, last, expression);
    UIData data = (UIData) last;
    char separatorChar = UINamingContainer.getSeparatorChar(context);
    StringBuilder clientIds = new StringBuilder();
    for (UIComponent column : data.getChildren()) {
        // handle dynamic columns
        if (column instanceof Columns) {
            List<DynamicColumn> dynamicColumns = ((Columns) column).getDynamicColumns();
            for (int i = 0; i < dynamicColumns.size(); i++) {
                DynamicColumn dynamicColumn = dynamicColumns.get(i);
                for (UIComponent comp : column.getChildren()) {
                    if (clientIds.length() > 0) {
                        clientIds.append(" ");
                    }
                    clientIds.append(data.getClientId(context));
                    clientIds.append(separatorChar);
                    clientIds.append(row);
                    clientIds.append(separatorChar);
                    clientIds.append(dynamicColumn.getId());
                    clientIds.append(separatorChar);
                    clientIds.append(i);
                    clientIds.append(separatorChar);
                    clientIds.append(comp.getId());
                }
            }
        } else if (column instanceof UIColumn) {
            for (UIComponent cell : column.getChildren()) {
                if (clientIds.length() > 0) {
                    clientIds.append(" ");
                }
                clientIds.append(data.getClientId(context));
                clientIds.append(separatorChar);
                clientIds.append(row);
                clientIds.append(separatorChar);
                clientIds.append(cell.getId());
            }
        }
    }
    return clientIds.toString();
}
Also used : UIColumn(javax.faces.component.UIColumn) UIComponent(javax.faces.component.UIComponent) Columns(org.primefaces.component.columns.Columns) DynamicColumn(org.primefaces.component.api.DynamicColumn) SearchExpressionHint(org.primefaces.expression.SearchExpressionHint) UIData(javax.faces.component.UIData)

Aggregations

UIData (javax.faces.component.UIData)46 UIComponent (javax.faces.component.UIComponent)6 Tag (com.autentia.tnt.businessobject.Tag)3 Position (com.autentia.tnt.businessobject.Position)2 User (com.autentia.tnt.businessobject.User)2 Paginator (com.liferay.faces.alloy.component.paginator.Paginator)2 SearchExpressionHint (org.primefaces.expression.SearchExpressionHint)2 ActivityFile (com.autentia.tnt.businessobject.ActivityFile)1 CommissioningFile (com.autentia.tnt.businessobject.CommissioningFile)1 CommissioningPaymentData (com.autentia.tnt.businessobject.CommissioningPaymentData)1 Contact (com.autentia.tnt.businessobject.Contact)1 ContactInfo (com.autentia.tnt.businessobject.ContactInfo)1 Department (com.autentia.tnt.businessobject.Department)1 Interaction (com.autentia.tnt.businessobject.Interaction)1 Organization (com.autentia.tnt.businessobject.Organization)1 Locale (java.util.Locale)1 Matcher (java.util.regex.Matcher)1 FacesException (javax.faces.FacesException)1 UIColumn (javax.faces.component.UIColumn)1 UIInput (javax.faces.component.UIInput)1