if (html5File.getStreamVariable() != null) { if (!sentIds.contains(id)) { target.addVariable(this, "rec-" + id, new ProxyReceiver(id, html5File)); target.addVariable(this, "rec-" + id, (String) null);
/** * Resets and paints "to be painted next" variables. Also reset pageBuffer */ private void resetVariablesAndPageBuffer(PaintTarget target) throws PaintException { reqFirstRowToPaint = -1; reqRowsToPaint = -1; containerChangeToBeRendered = false; target.addVariable(this, "reqrows", reqRowsToPaint); target.addVariable(this, "reqfirstrow", reqFirstRowToPaint); }
target.addVariable(this, "action", getStreamVariable());
paintTarget.addVariable((VariableOwner) viewer, "action", ""); paintTarget.startTag("actions");
private void paintColumnOrder(PaintTarget target) throws PaintException { if (columnReorderingAllowed) { final String[] colorder = new String[visibleColumns.size()]; int i = 0; for (Object colId : visibleColumns) { colorder[i++] = columnIdMap.key(colId); } target.addVariable(this, "columnorder", colorder); } }
private void paintSorting(PaintTarget target) throws PaintException { // Sorting if (getContainerDataSource() instanceof Container.Sortable) { target.addVariable(this, "sortcolumn", columnIdMap.key(sortContainerPropertyId)); target.addVariable(this, "sortascending", sortAscending); } }
@Override public void paintContent(PaintTarget target) throws PaintException { // Post file to this stream variable target.addVariable(this, "uploadUrl", getStreamVariable()); }
private void paintAvailableColumns(PaintTarget target) throws PaintException { if (columnCollapsingAllowed) { final HashSet<Object> collapsedCols = new HashSet<Object>(); for (Object colId : visibleColumns) { if (isColumnCollapsed(colId)) { collapsedCols.add(colId); } } final String[] collapsedKeys = new String[collapsedCols.size()]; int nextColumn = 0; for (Object colId : visibleColumns) { if (isColumnCollapsed(colId)) { collapsedKeys[nextColumn++] = columnIdMap.key(colId); } } target.addVariable(this, "collapsedcolumns", collapsedKeys); final String[] noncollapsibleKeys = new String[noncollapsibleColumns .size()]; nextColumn = 0; for (Object colId : noncollapsibleColumns) { noncollapsibleKeys[nextColumn++] = columnIdMap.key(colId); } target.addVariable(this, "noncollapsiblecolumns", noncollapsibleKeys); } }
@Override public void paintContent(PaintTarget target) throws PaintException { if (selectAll) { target.addAttribute("selectAll", true); selectAll = false; } // Adds the content as variable String value = getValue(); if (value == null) { value = getNullRepresentation(); } if (value == null) { throw new IllegalStateException( "Null values are not allowed if the null-representation is null"); } target.addVariable(this, "text", value); }
@Override public void paintContent(PaintTarget target) throws PaintException { super.paintContent(target); if (hasGroups()) { Collection groupProperties = getGroupProperties(); String[] groupColumns = new String[groupProperties.size()]; int index = 0; for (Object groupColumnId : groupProperties) { groupColumns[index++] = _columnIdMap().key(groupColumnId); } target.addVariable(this, "groupColumns", groupColumns); } }
if (html5File.getStreamVariable() != null) { if (!sentIds.contains(id)) { target.addVariable(this, "rec-" + id, new ProxyReceiver(id, html5File)); target.addVariable(this, "rec-" + id, (String) null);
target.addVariable(this, variableNameForResolution.get(res), value);
private void paintActions(PaintTarget target, final Set<Action> actionSet) throws PaintException { if (!actionSet.isEmpty()) { target.addVariable(this, "action", ""); target.startTag("actions"); for (Action a : actionSet) { target.startTag("action"); if (a.getCaption() != null) { target.addAttribute("caption", a.getCaption()); } if (a.getIcon() != null) { target.addAttribute("icon", a.getIcon()); } target.addAttribute("key", actionMapper.key(a)); target.endTag("action"); } target.endTag("actions"); } }
target.addVariable(this, "action", getStreamVariable());
target.addVariable(this, "action", ""); target.startTag("actions"); final Iterator<Action> i = actionSet.iterator(); } else { target.addVariable(this, "selected", selectedKeys.toArray(new String[selectedKeys.size()])); target.addVariable(this, "expand", new String[] {}); target.addVariable(this, "collapse", new String[] {}); target.addVariable(this, "newitem", new String[] {});
private void paintSelectMode(PaintTarget target) throws PaintException { if (multiSelectMode != MultiSelectMode.DEFAULT) { target.addAttribute("multiselectmode", multiSelectMode.ordinal()); } if (isSelectable()) { target.addAttribute("selectmode", (isMultiSelect() ? "multi" : "single")); } else { target.addAttribute("selectmode", "none"); } if (!isNullSelectionAllowed()) { target.addAttribute("nsa", false); } // selection support // The select variable is only enabled if selectable if (isSelectable()) { target.addVariable(this, "selected", findSelectedKeys()); } }
target.addVariable(this, "firstvisible", getCurrentPageFirstItemIndex()); target.addVariable(this, "firstvisibleonlastpage", currentPageFirstItemIndexOnLastPage);
target.addVariable(this, "selected", selectedKeys); if (isNewItemsAllowed()) { target.addVariable(this, "newitem", "");
target.addVariable(this, "selected", selectedKeys); if (getValue() != null && selectedKeys[0] == null) { target.addVariable(this, "newitem", ""); target.addVariable(this, "filter", filterstring); target.addVariable(this, "page", currentPage);