List of usage examples for org.json JSONObject optString
public String optString(String key)
From source file:org.cruxframework.crux.widgets.rebind.deviceadaptivegrid.DeviceAdaptiveGridFactory.java
/** * @param gridElem/*from ww w.j a v a2s.c o m*/ * @return */ protected String getSortingType(JSONObject gridElem) { String sortingType = gridElem.optString("defaultSortingType"); if (!StringUtils.isEmpty(sortingType)) { SortingType sort = SortingType.valueOf(sortingType); return SortingType.class.getCanonicalName() + "." + sort.toString(); } return null; }
From source file:org.cruxframework.crux.widgets.rebind.deviceadaptivegrid.DeviceAdaptiveGridFactory.java
/** * @param gridElem/* w w w. ja va 2 s.co m*/ * @return */ protected String getSortingColumn(JSONObject gridElem) { String sort = gridElem.optString("defaultSortingColumn"); if (!StringUtils.isEmpty(sort)) { return EscapeUtils.quote(sort); } return null; }
From source file:org.cruxframework.crux.widgets.rebind.deviceadaptivegrid.DeviceAdaptiveGridFactory.java
/** * @param gridElem//from ww w .j a v a 2 s.c o m * @return */ protected boolean isFixedCellSize(JSONObject gridElem) { String fixedCellSize = gridElem.optString("fixedCellSize"); if (fixedCellSize != null && fixedCellSize.trim().length() > 0) { return Boolean.parseBoolean(fixedCellSize); } return false; }
From source file:org.cruxframework.crux.widgets.rebind.deviceadaptivegrid.DeviceAdaptiveGridFactory.java
/** * @param gridElem//from w w w .j a v a2 s . com * @return */ protected String getEmptyDataFilling(JSONObject gridElem) { String emptyDataFilling = gridElem.optString("emptyDataFilling"); if (emptyDataFilling != null && emptyDataFilling.trim().length() > 0) { return EscapeUtils.quote(emptyDataFilling); } return null; }
From source file:org.cruxframework.crux.widgets.rebind.deviceadaptivegrid.DeviceAdaptiveGridFactory.java
protected String getDetailDialogTitle(JSONObject gridElem) { String emptyDataFilling = gridElem.optString("detailDialogTitle"); if (emptyDataFilling != null && emptyDataFilling.trim().length() > 0) { return EscapeUtils.quote(emptyDataFilling); }/*from w w w . j a v a 2s . c o m*/ return null; }
From source file:org.cruxframework.crux.widgets.rebind.deviceadaptivegrid.DeviceAdaptiveGridFactory.java
/** * @param gridElem//from w ww. j av a 2 s .c o m * @return */ protected String getDataSource(JSONObject gridElem) { String dataSource = gridElem.optString("dataSource"); if (dataSource != null && dataSource.trim().length() > 0) { return EscapeUtils.quote(dataSource); } return null; }
From source file:org.cruxframework.crux.widgets.rebind.deviceadaptivegrid.DeviceAdaptiveGridFactory.java
/** * @param gridElem//from w w w .jav a 2 s .co m * @return */ protected boolean getHighlightRowOnMouseOver(JSONObject gridElem) { String highlight = gridElem.optString("highlightRowOnMouseOver"); if (highlight != null && highlight.trim().length() > 0) { return Boolean.parseBoolean(highlight); } return false; }
From source file:org.cruxframework.crux.widgets.rebind.deviceadaptivegrid.DeviceAdaptiveGridFactory.java
/** * @param gridElem//from w w w . ja v a 2s .c o m * @return */ protected boolean getAutoLoad(JSONObject gridElem) { String autoLoad = gridElem.optString("autoLoadData"); if (autoLoad != null && autoLoad.trim().length() > 0) { return Boolean.parseBoolean(autoLoad); } return false; }
From source file:org.cruxframework.crux.widgets.rebind.deviceadaptivegrid.DeviceAdaptiveGridFactory.java
/** * @param gridElem//from w w w .j av a2 s . com * @return */ protected boolean getKeepEditorOnClickDisabledRows(JSONObject gridElem) { String keepEditor = gridElem.optString("keepEditorOnClickDisabledRows"); if (keepEditor != null && keepEditor.trim().length() > 0) { return Boolean.parseBoolean(keepEditor); } return false; }
From source file:org.cruxframework.crux.widgets.rebind.deviceadaptivegrid.DeviceAdaptiveGridFactory.java
/** * @param gridElem/*from ww w. ja v a2s .c o m*/ * @return */ protected boolean getShowEditorButtons(JSONObject gridElem) { String highlight = gridElem.optString("showEditorButtons"); if (highlight != null && highlight.trim().length() > 0) { return Boolean.parseBoolean(highlight); } return false; }