IDEMPIERE-5725 NPE in gridview on mobile (#1939)
This commit is contained in:
parent
8786d8a51f
commit
65a69ee332
|
@ -940,7 +940,7 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
|
||||||
@Override
|
@Override
|
||||||
public String getDisplayTextForGridView(Object value) {
|
public String getDisplayTextForGridView(Object value) {
|
||||||
String s = super.getDisplayTextForGridView(value);
|
String s = super.getDisplayTextForGridView(value);
|
||||||
if (ClientInfo.isMobile() && MSysConfig.getBooleanValue(MSysConfig.ZK_GRID_MOBILE_LINE_BREAK_AS_IDENTIFIER_SEPARATOR, true)) {
|
if (s != null && ClientInfo.isMobile() && MSysConfig.getBooleanValue(MSysConfig.ZK_GRID_MOBILE_LINE_BREAK_AS_IDENTIFIER_SEPARATOR, true)) {
|
||||||
String separator = MSysConfig.getValue(MSysConfig.IDENTIFIER_SEPARATOR, null, Env.getAD_Client_ID(Env.getCtx()));
|
String separator = MSysConfig.getValue(MSysConfig.IDENTIFIER_SEPARATOR, null, Env.getAD_Client_ID(Env.getCtx()));
|
||||||
if (!Util.isEmpty(separator, true) && s.indexOf(separator) >= 0) {
|
if (!Util.isEmpty(separator, true) && s.indexOf(separator) >= 0) {
|
||||||
s = s.replace(separator, "\n");
|
s = s.replace(separator, "\n");
|
||||||
|
|
|
@ -930,7 +930,7 @@ ContextMenuListener, IZoomableEditor
|
||||||
@Override
|
@Override
|
||||||
public String getDisplayTextForGridView(Object value) {
|
public String getDisplayTextForGridView(Object value) {
|
||||||
String s = super.getDisplayTextForGridView(value);
|
String s = super.getDisplayTextForGridView(value);
|
||||||
if (ClientInfo.isMobile( )&& MSysConfig.getBooleanValue(MSysConfig.ZK_GRID_MOBILE_LINE_BREAK_AS_IDENTIFIER_SEPARATOR, true)) {
|
if (s != null && ClientInfo.isMobile( ) && MSysConfig.getBooleanValue(MSysConfig.ZK_GRID_MOBILE_LINE_BREAK_AS_IDENTIFIER_SEPARATOR, true)) {
|
||||||
String separator = MSysConfig.getValue(MSysConfig.IDENTIFIER_SEPARATOR, null, Env.getAD_Client_ID(Env.getCtx()));
|
String separator = MSysConfig.getValue(MSysConfig.IDENTIFIER_SEPARATOR, null, Env.getAD_Client_ID(Env.getCtx()));
|
||||||
if (!Util.isEmpty(separator, true) && s.indexOf(separator) >= 0) {
|
if (!Util.isEmpty(separator, true) && s.indexOf(separator) >= 0) {
|
||||||
s = s.replace(separator, "\n");
|
s = s.replace(separator, "\n");
|
||||||
|
|
Loading…
Reference in New Issue