@Override public void paint(int id, PaintTarget target) throws PaintException { target.startTag("css-resource"); target.addAttribute("id", id); target.addAttribute("url", resource); target.endTag("css-resource"); }
paintTarget.addVariable((VariableOwner) viewer, "action", ""); paintTarget.startTag("actions"); paintTarget.startTag("action"); final String akey = actionMapper.key(a); paintTarget.addAttribute("key", akey); if (a.getCaption() != null) { paintTarget.addAttribute("caption", a.getCaption()); paintTarget.addAttribute("icon", a.getIcon()); paintTarget.addAttribute("kc", sa.getKeyCode()); smodifiers[i] = String.valueOf(modifiers[i]); paintTarget.addAttribute("mk", smodifiers); paintTarget.endTag("action"); paintTarget.endTag("actions");
@Override public void paint(int id, PaintTarget target) throws PaintException { target.startTag("css-string"); target.addAttribute("id", id); target.addText(css); target.endTag("css-string"); } }
public void paintContent(PaintTarget target) throws PaintException { if (notStarted) { target.addAttribute("notStarted", true); notStarted = false; return; target.addAttribute("focus", true); target.addAttribute("tabindex", tabIndex); target.addAttribute("state", isUploading); target.addAttribute("buttoncaption", buttonCaption); if (buttonStyleName != null) { target.addAttribute("buttonstylename", buttonStyleName); target.addAttribute("nextid", nextid); target.addVariable(this, "action", getStreamVariable());
@Override public void paintContent(PaintTarget target) throws PaintException { super.paintContent(target); target.addAttribute("p", propertyName); if (value instanceof Boolean) { target.addAttribute("v", ((Boolean) value).booleanValue()); target.addAttribute("t", "b"); } else if (value instanceof String) { target.addAttribute("v", (String) value); } }
protected void paintUpdatesForGroupRowWithAggregation(PaintTarget target, Object groupId) throws PaintException { target.startTag("updateAggregation"); List<String> values = getAggregatedValuesForGroup(groupId); for (String value : values) { target.addText(value); } target.endTag("updateAggregation"); cachedAggregatedValues.put(groupId, values); }
private void paint(PaintTarget target) throws PaintException { // If full repaint repaint all injections if (target.isFullRepaint()) { injectedStyles.addAll(pendingInjections); pendingInjections = injectedStyles; injectedStyles = new LinkedHashSet<>(); } if (!pendingInjections.isEmpty()) { target.startTag("css-injections"); for (InjectedStyle pending : pendingInjections) { int id = injectedStyles.size(); pending.paint(id, target); injectedStyles.add(pending); } pendingInjections.clear(); target.endTag("css-injections"); } } }
final String tag = target.getTag(component); final PaintStatus status = target.startPaintable(component, tag); if (PaintStatus.CACHED == status) { target.addAttribute("cached", true); } else { target.endPaintable(component);
protected void paintGroupAggregation(PaintTarget target, Object groupId, Map<Object, Object> aggregations) throws PaintException { boolean paintGroupProperty = false; Collection groupProperties = getGroupProperties(); Object groupProperty = getGroupProperty(groupId); for (Object columnId : _visibleColumns()) { if (columnId == null || isColumnCollapsed(columnId)) { continue; } if (groupProperties.contains(columnId) && !paintGroupProperty) { if (columnId.equals(groupProperty)) { paintGroupProperty = true; } continue; } if (getCellStyleGenerator() != null) { String cellStyle = getCellStyleGenerator().getStyle(this, null, columnId); if (cellStyle != null && !cellStyle.isEmpty()) { target.addAttribute("style-" + _columnIdMap().key(columnId), cellStyle + "-ag"); } } String value = (String) aggregations.get(columnId); if (value != null) { target.addText(value); } else { target.addText(""); } } }
if (isPartialRowUpdate() && painted && !target.isFullRepaint()) { paintPartialRowUpdate(target, actionSet); } else if (target.isFullRepaint() || isRowCacheInvalidated()) { paintRows(target, cells, actionSet); setRowCacheInvalidated(false); target.addAttribute(TableConstants.ATTRIBUTE_PAGEBUFFER_FIRST, pageBufferFirstIndex); target.addAttribute(TableConstants.ATTRIBUTE_PAGEBUFFER_LAST, pageBufferLastIndex); target.addAttribute(TableConstants.ATTRIBUTE_KEY_MAPPER_RESET, true);
/** * 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); }
public void paintContent(PaintTarget target) throws PaintException { if (!openList.isEmpty()) { for (OpenResource anOpenList : openList) { (anOpenList).paintContent(target); } openList.clear(); } if (newPushState != null) { target.addAttribute(UIConstants.ATTRIBUTE_PUSH_STATE, newPushState); newPushState = null; } if (newReplaceState != null) { target.addAttribute(UIConstants.ATTRIBUTE_REPLACE_STATE, newReplaceState); newReplaceState = null; } if (styles != null) { styles.paint(target); } }
@Override public void paintContent(PaintTarget target) throws PaintException { target.addAttribute(DragAndDropWrapperConstants.DRAG_START_MODE, dragStartMode.ordinal()); target.addAttribute( DragAndDropWrapperConstants.DRAG_START_COMPONENT_ATTRIBUTE, dragImageComponent.getConnectorId()); 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.addAttribute(DragAndDropWrapperConstants.HTML5_DATA_FLAVORS, html5DataFlavors);
protected void paintEditableAggregationColumns(PaintTarget target) throws PaintException { target.startTag("editableAggregationColumns"); for (final Object columnId : _visibleColumns()) { if (CollectionUtils.isNotEmpty(aggregationEditableColumns) && aggregationEditableColumns.contains(columnId)) { target.addText(_columnIdMap().key(columnId)); } } target.endTag("editableAggregationColumns"); }
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); } }
target.startTag("open"); target.addAttribute("src", resource); if (name != null && !name.isEmpty()) { target.addAttribute("name", name); target.addAttribute("popup", tryToOpenAsPopup); target.addAttribute("width", width); target.addAttribute("height", height); target.addAttribute("border", "minimal"); break; case NONE: target.addAttribute("border", "none"); break; target.endTag("open");
@Override public synchronized void paintContent(PaintTarget target) throws PaintException { if (bringToFront != null) { target.addAttribute("bringToFront", bringToFront.intValue()); bringToFront = null; } // Contents of the window panel is painted super.paintContent(target); }
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"); } }
protected void paintAggregationRow(PaintTarget target, Map<Object, Object> aggregations) throws PaintException { target.startTag("arow"); for (final Object columnId : _visibleColumns()) { if (columnId == null || isColumnCollapsed(columnId)) { continue; } if (getCellStyleGenerator() != null) { String cellStyle = getCellStyleGenerator().getStyle(this, null, columnId); if (cellStyle != null && !cellStyle.equals("")) { target.addAttribute("style-" + _columnIdMap().key(columnId), cellStyle + "-ag"); } } String value = (String) aggregations.get(columnId); target.addText(value); } if (focusTotalAggregationInputColumnKey != null) { target.addAttribute("focusInput", focusTotalAggregationInputColumnKey); focusTotalAggregationInputColumnKey = null; } target.startTag("editableAggregationColumns"); for (final Object columnId : _visibleColumns()) { if (CollectionUtils.isNotEmpty(aggregationEditableColumns) && aggregationEditableColumns.contains(columnId)) { target.addText(_columnIdMap().key(columnId)); } } target.endTag("editableAggregationColumns"); target.endTag("arow"); }