/** * Generates the name (= id) of the editing component so that * the STable implementation knows to associate the input * value with the correct data row/columns * * Applies the unqique id/name for a component of the rows/column * to the cell component. * * @param component The edit component to rename * @param row Data row of this edit component * @param col Data column of this edit component */ protected void nameEditorComponent(final SComponent component, final int row, final int col) { nameBuffer.setLength(0); nameBuffer.append(this.getName()).append("_e_"); nameBuffer.append(row); nameBuffer.append('_').append(col); component.setNameRaw(nameBuffer.toString()); }
/** * Generates the name (= id) of the editing component so that * the STable implementation knows to associate the input * value with the correct data row/columns * * Applies the unqique id/name for a component of the rows/column * to the cell component. * * @param component The edit component to rename * @param row Data row of this edit component * @param col Data column of this edit component */ protected void nameRendererComponent(final SComponent component, final int row, final int col) { nameBuffer.setLength(0); nameBuffer.append(this.getName()).append('_'); if (row == -1) nameBuffer.append('h'); else nameBuffer.append(row); nameBuffer.append('_').append(col); component.setNameRaw(nameBuffer.toString()); }
public Handler getHandler() { int indexOffset = 0; if (component.isHeaderVisible()) { ++indexOffset; } UpdateHandler handler = new UpdateHandler("selectionTable"); handler.addParameter(component.getName()); handler.addParameter(new Integer(indexOffset)); handler.addParameter(Utils.listToJsArray(deselectedIndices)); handler.addParameter(Utils.listToJsArray(selectedIndices)); if (isSelectionColumnVisible(component)) { String exception = null; List<String> deselectedBodies = new ArrayList<String>(); List<String> selectedBodies = new ArrayList<String>(); exception = writeSelectionBodies(deselectedIndices, deselectedBodies); exception = writeSelectionBodies(selectedIndices, selectedBodies); handler.addParameter(Utils.listToJsArray(deselectedBodies)); handler.addParameter(Utils.listToJsArray(selectedBodies)); if (exception != null) { handler.addParameter(exception); } } return handler; }
handler.addParameter(table.getName()); handler.addParameter(htmlCode); if (exception != null) {
handler.addParameter(table.getName()); handler.addParameter(htmlCode); if (exception != null) {
@Override public Handler getHandler() { int indexOffset = 0; if (component.isHeaderVisible()) { ++indexOffset; } UpdateHandler handler = new UpdateHandler("selectionTable"); handler.addParameter(component.getName()); handler.addParameter(indexOffset); handler.addParameter(Utils.listToJsArray(deselectedIndices)); handler.addParameter(Utils.listToJsArray(selectedIndices)); if (isSelectionColumnVisible(component)) { List<String> deselectedBodies = new ArrayList<>(); String exception = writeSelectionBodies(deselectedIndices, deselectedBodies); List<String> selectedBodies = new ArrayList<>(); exception = writeSelectionBodies(selectedIndices, selectedBodies); handler.addParameter(Utils.listToJsArray(deselectedBodies)); handler.addParameter(Utils.listToJsArray(selectedBodies)); if (exception != null) { handler.addParameter(exception); } } return handler; }
handler.addParameter(table.getName()); handler.addParameter(row); handler.addParameter(column);
handler.addParameter(table.getName()); handler.addParameter(row); handler.addParameter(column);
handler.addParameter(table.getName()); handler.addParameter(row); handler.addParameter(column);
handler.addParameter(table.getName()); handler.addParameter(row); handler.addParameter(column);