IDEMPIERE-5725 NPE in gridview on mobile (#1939)

This commit is contained in:
hengsin 2023-07-16 21:18:42 +08:00 committed by GitHub
parent 8786d8a51f
commit 65a69ee332
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -940,7 +940,7 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
@Override
public String getDisplayTextForGridView(Object 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()));
if (!Util.isEmpty(separator, true) && s.indexOf(separator) >= 0) {
s = s.replace(separator, "\n");

View File

@ -930,7 +930,7 @@ ContextMenuListener, IZoomableEditor
@Override
public String getDisplayTextForGridView(Object 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()));
if (!Util.isEmpty(separator, true) && s.indexOf(separator) >= 0) {
s = s.replace(separator, "\n");