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;
}
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;
}
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;
}
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;
}
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();
}
Aggregations