clientIds += data.getClientId(context) + seperatorChar + row + seperatorChar + dynamicColumn.getId() + seperatorChar + i + seperatorChar + comp.getId(); clientIds += data.getClientId(context) + seperatorChar + row + seperatorChar + cell.getId();
public String getClientId(FacesContext context) { String clientId2 = super.getClientId(context); int rowIndex = getRowIndex(); if (rowIndex == -1) { return clientId2; } else { return clientId2 + "_" + rowIndex; } }
@Override public String getClientId(FacesContext context) { String clientId = super.getClientId(context); int rowIndex = getRowIndex(); if (rowIndex == -1) { return clientId; } else { return clientId + "_" + rowIndex; } }
public String nodeStateId(final FacesContext facesContext) { final String clientId = getClientId(facesContext); final UIData data = ComponentUtils.findAncestor(this, UIData.class); final String dataId = data.getClientId(facesContext); return clientId.substring(dataId.length() + 1); } }
/** * @return the page index of the uidata */ public int getPageIndex() { UIData uiData = getUIData(); int rows = uiData.getRows(); if (0 == rows) { throw new FacesException("You need to set a value to the 'rows' attribute of component '" + uiData.getClientId(getFacesContext()) + "'" ); } int pageIndex; if (rows > 0) { pageIndex = uiData.getFirst() / rows + 1; } else { log.warn("DataTable " + uiData.getClientId(FacesContext.getCurrentInstance()) + " has invalid rows attribute."); pageIndex = 0; } if (uiData.getFirst() % rows > 0) { pageIndex++; } return pageIndex; }
private static void updateColumnCells(UIData table, int index, int rowCount) { FacesContext context = FacesContext.getCurrentInstance(); String tableId = table.getClientId(context); char separator = UINamingContainer.getSeparatorChar(context); Collection<String> renderIds = getContext().getRenderIds(); UIColumn column = findColumn(table, index); if (column != null) { for (UIComponent cell : column.getChildren()) { String cellId = cell.getId(); for (int rowIndex = 0; rowIndex < rowCount; rowIndex++) { renderIds.add(format("%s%c%d%c%s", tableId, separator, rowIndex, separator, cellId)); } } } }
private static void updateColumnCells(UIData table, int index, int rowCount) { FacesContext context = FacesContext.getCurrentInstance(); String tableId = table.getClientId(context); char separator = UINamingContainer.getSeparatorChar(context); Collection<String> renderIds = getContext().getRenderIds(); UIColumn column = findColumn(table, index); if (column != null) { for (UIComponent cell : column.getChildren()) { String cellId = cell.getId(); for (int rowIndex = 0; rowIndex < rowCount; rowIndex++) { renderIds.add(format("%s%c%d%c%s", tableId, separator, rowIndex, separator, cellId)); } } } }
boolean returnValue = this.getClientId(context).equals(clientId);
private static void updateRowCells(UIData table, int index) { FacesContext context = FacesContext.getCurrentInstance(); String tableId = table.getClientId(context); char separator = UINamingContainer.getSeparatorChar(context); Collection<String> renderIds = getContext().getRenderIds(); for (UIComponent column : table.getChildren()) { if (column instanceof UIColumn) { for (UIComponent cell : column.getChildren()) { renderIds.add(format("%s%c%d%c%s", tableId, separator, index, separator, cell.getId())); } } else if (column instanceof UIData) { // <p:columns>. updateRowCells((UIData) column, renderIds, tableId, index, separator); } } }
private static void updateRowCells(UIData table, int index) { FacesContext context = FacesContext.getCurrentInstance(); String tableId = table.getClientId(context); char separator = UINamingContainer.getSeparatorChar(context); Collection<String> renderIds = getContext().getRenderIds(); for (UIComponent column : table.getChildren()) { if (column instanceof UIColumn) { for (UIComponent cell : column.getChildren()) { renderIds.add(format("%s%c%d%c%s", tableId, separator, index, separator, cell.getId())); } } else if (column instanceof UIData) { // <p:columns>. updateRowCells((UIData) column, renderIds, tableId, index, separator); } } }
clientIds += data.getClientId(context) + seperatorChar + row + seperatorChar + dynamicColumn.getId() + seperatorChar + i + seperatorChar + comp.getId(); clientIds += data.getClientId(context) + seperatorChar + row + seperatorChar + cell.getId();
private void addUIData(UIData component, FacesContext facesContext) String parentClientID = component.getClientId(facesContext); addAncestors(parentClientID, component.getClientId(facesContext)); for (Iterator facetsAndChildren = component.getFacetsAndChildren(); facetsAndChildren.hasNext();)
uiData.getClientId(FacesContext.getCurrentInstance()) + " has invalid rows attribute."); pageIndex = 0;
_rowStates.put(getClientId(facesContext), saveDescendantComponentStates(getChildren().iterator(), false)); Object rowState = _rowStates.get(getClientId(facesContext)); if (rowState == null)
final String baseClientId = getClientId(context);
baseClientId = data.getClientId(context); data.setRowIndex(originalRowIndex);
table.setAttribute(HTML.ONKEYDOWN_ATTR, "Ice.DatPagKybrd(this.id, event);"); table.setAttribute(HTML.NAME_ATTR, scroller.getUIData().getClientId(facesContext)); Element tr = domContext.createElement(HTML.TR_ELEM); table.appendChild(tr);