Gets the row key value as a String suitable for use in javascript rendering.

@param context
@return
556312
protected String getRowKeyValueAsString(final Object key) {
        final String result = key.toString();
        return "r_" + StringUtils.deleteWhitespace(result);
    }
824513
def getContext(context):
    
    context = aq_parent(aq_base(context))
    if not context or IBrowserView.providedBy(context):
        return getSite()
    return context
629456
def _get_context_table(context):
    
    table = formatting.KeyValueTable(['name', 'value'])
    table.align['name'] = 'r'
    table.align['value'] = 'l'

    table.add_row(['id', context.get('id', '')])
    table.add_row(['name', context.get('name', '')])
    table.add_row(['friendly name', context.get('friendlyName', '')])
    table.add_row(['internal peer IP address',
                   context.get('internalPeerIpAddress', '')])
    table.add_row(['remote peer IP address',
                   context.get('customerPeerIpAddress', '')])
    table.add_row(['advanced configuration flag',
                   context.get('advancedConfigurationFlag', '')])
    table.add_row(['preshared key', context.get('presharedKey', '')])
    table.add_row(['phase 1 authentication',
                   context.get('phaseOneAuthentication', '')])
    table.add_row(['phase 1 diffie hellman group',
                   context.get('phaseOneDiffieHellmanGroup', '')])
    table.add_row(['phase 1 encryption', context.get('phaseOneEncryption', '')])
    table.add_row(['phase 1 key life', context.get('phaseOneKeylife', '')])
    table.add_row(['phase 2 authentication',
                   context.get('phaseTwoAuthentication', '')])
    table.add_row(['phase 2 diffie hellman group',
                   context.get('phaseTwoDiffieHellmanGroup', '')])
    table.add_row(['phase 2 encryption', context.get('phaseTwoEncryption', '')])
    table.add_row(['phase 2 key life', context.get('phaseTwoKeylife', '')])
    table.add_row(['phase 2 perfect forward secrecy',
                   context.get('phaseTwoPerfectForwardSecrecy', '')])
    table.add_row(['created', context.get('createDate')])
    table.add_row(['modified', context.get('modifyDate')])
    return table
1148570
public void setRowVar(final FacesContext context, final String rowKey) {

        if (context == null) {
            return;
        }

        if (rowKey == null) {
            context.getExternalContext().getRequestMap().remove(getVar());
        }
        else {
            final Object value = getRowMap().get(rowKey);
            context.getExternalContext().getRequestMap().put(getVar(), value);
        }
    }
1372943
public String getKey() {
        String dbkey = ThreadContext.getContext(dbName);
        if (dbkey == null) {
            Integer userid = ThreadContext.getShardKey();
            if (userid == null) {
                userid = 0;
                // throw new
                // RuntimeException("No userid contexted,so you can't know how to routing!!");
            }
            dbkey = router.getTargetDataSourceKey(userid, true);

            StackTraceElement[] elements = Thread.currentThread().getStackTrace();

            logTrace(dbkey, elements);

        }
        return dbkey;
    }
717570
public static Map<String, Object> getDimKeyFromRow(Collection<DimensionSpec> dimensions, Row row)
  {

    Map<String, Object> key = new HashMap<>();
    Map<String, Object> event = ((MapBasedRow) row).getEvent();

    for (DimensionSpec dimension : dimensions) {
      key.put(dimension.getOutputName(), event.get(dimension.getOutputName()));
    }

    return key;
  }
615718
public Optional<Object> getData(Object key) {
        if (key == null) {
            throw new IllegalArgumentException("key cannot be null");
        }
        for (ContextData c = this; c != null; c = c.parent) {
            if (key.equals(c.key)) {
                return Optional.of(c.value);
            }
        }
        return Optional.empty();
    }
1256866
@Override
  public UnsafeRow getKeyRow(int rowId) {
    assert(rowId >= 0);
    assert(rowId < numRows);
    if (keyRowId != rowId) { // if keyRowId == rowId, desired keyRow is already cached
      long offset = keyOffsets[rowId];
      int klen = Platform.getInt(base, offset - 4);
      keyRow.pointTo(base, offset, klen);
      // set keyRowId so we can check if desired row is cached
      keyRowId = rowId;
    }
    return keyRow;
  }
131208
public void renderRowUpdateScript(final FacesContext context, final Set<String> dirtyRows) {
        final String jsVar = resolveWidgetVar();
        final StringBuilder eval = new StringBuilder();

        for (final String rowKey : dirtyRows) {
            setRowVar(context, rowKey);
            final int rowIndex = rowNumbers.get(rowKey);
            // data is array of array of data
            final JavascriptVarBuilder jsRow = new JavascriptVarBuilder(null, false);
            final JavascriptVarBuilder jsStyle = new JavascriptVarBuilder(null, true);
            final JavascriptVarBuilder jsReadOnly = new JavascriptVarBuilder(null, true);
            int renderCol = 0;
            for (int col = 0; col < getColumns().size(); col++) {
                final SheetColumn column = getColumns().get(col);
                if (!column.isRendered()) {
                    continue;
                }

                // render data value
                final String value = getRenderValueForCell(context, rowKey, col);
                jsRow.appendArrayValue(value, true);

                // custom style
                final String styleClass = column.getStyleClass();
                if (styleClass != null) {
                    jsStyle.appendRowColProperty(rowIndex, renderCol, styleClass, true);
                }

                // read only per cell
                final boolean readOnly = column.isReadonlyCell();
                if (readOnly) {
                    jsReadOnly.appendRowColProperty(rowIndex, renderCol, "true", true);
                }
                renderCol++;
            }
            eval.append("PF('").append(jsVar).append("')");
            eval.append(".updateData('");
            eval.append(rowIndex);
            eval.append("',");
            eval.append(jsRow.closeVar().toString());
            eval.append(",");
            eval.append(jsStyle.closeVar().toString());
            eval.append(",");
            eval.append(jsReadOnly.closeVar().toString());
            eval.append(");");
        }
        eval.append("PF('").append(jsVar).append("')").append(".redraw();");
        PrimeFaces.current().executeScript(eval.toString());
    }
1316107
def _get_context_key(self, **kwargs):
        
        return str(kwargs.get(self._resource.parent.id_name))
512934
function get(key, context) {
  if (context === true) context = this.context;
  var parts = key.split(".");
  if (parts.length === 1) {
    // "foo"
    return this._getKey(key, context);
  } else {
    // "foo.bar"
    return this._getPattern(parts, context);
  }
}
543825
@SuppressWarnings("unchecked")
	public static <T> T get(String key) {
		return (T) (contextMap.get().get(key));
	}
1151497
public java.lang.String getExternalValuesOrThrow(
      java.lang.String key) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, java.lang.String> map =
        internalGetExternalValues().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }
735940
public T getValue(E row, E col) {
		if(!rowKeys.containsKey(row))
			return null;
		if(!colKeys.containsKey(col))
			return null;
		try{
			get(rowKeys.get(row)).get(colKeys.get(col));
		} catch(IndexOutOfBoundsException e){
			return null;
		}
		return get(rowKeys.get(row)).get(colKeys.get(col));
	}
1214745
private Object getRowData(final Object rowId) {
		// We cache row id --> row bean mapping per request for performance (to avoid nested loops)
		Map dataByRowId = (Map) getScratchMap().get(SCRATCHMAP_DATA_BY_ROW_ID_KEY);

		if (dataByRowId == null) {
			dataByRowId = createRowIdCache();
		}

		Object data = dataByRowId.get(rowId);

		if (data == null && !dataByRowId.containsKey(rowId)) {
			// Ok, new data has probably been added. We need to cache the new data.
			dataByRowId = createRowIdCache();
			data = dataByRowId.get(rowId);
		}

		return data;
	}
1006368
public static String rowToString(JSONArray ja) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < ja.length(); i += 1) {
            if (i > 0) {
                sb.append(',');
            }
            Object object = ja.opt(i);
            if (object != null) {
                String string = object.toString();
                if (string.length() > 0 && (string.indexOf(',') >= 0 ||
                        string.indexOf('\n') >= 0 || string.indexOf('\r') >= 0 ||
                        string.indexOf(0) >= 0 || string.charAt(0) == '"')) {
                    sb.append('"');
                    int length = string.length();
                    for (int j = 0; j < length; j += 1) {
                        char c = string.charAt(j);
                        if (c >= ' ' && c != '"') {
                            sb.append(c);
                        }
                    }
                    sb.append('"');
                } else {
                    sb.append(string);
                }
            }
        }
        sb.append('\n');
        return sb.toString();
    }
595524
public String getStringValue(FacesContext context) {
        String result = null;
        if (hasValueExpression()) {
            result = getStringValueFromModel(context);
        } else {
            result = (null != rawValue) ? rawValue : (String) getValue();
        }
        return result;
    }