private void displayThumb(String fullId, String gender) { final JsonObject query = new JsonObject(); query.addProperty("fullId", fullId); getThumbOperation.doOperation(query, res -> { if (res == null || res.hasBusinessError()) { displayEmptyThumb(gender); } else { try { final SingleResult sr = (SingleResult) res; final byte[] imgbytes = (byte[]) sr.getMetaData().get("thumb"); if (imgbytes != null && imgbytes.length > 0) { getJavaFXImage(imgbytes, gender); } else { displayEmptyThumb(gender); } } catch (final Exception e) { e.printStackTrace(); displayEmptyThumb(gender); } } }, ex -> { ex.printStackTrace(); displayEmptyThumb(gender); }); }
protected void displayThumb(String fullId) { final JsonObject query = new JsonObject(); query.addProperty("fullId", fullId); getThumbOperation.doOperation(query, res -> { if (res == null || res.hasBusinessError()) { displayEmptyThumb(); } else { try { final SingleResult sr = (SingleResult) res; final byte[] imgbytes = (byte[]) sr.getMetaData().get("thumb"); if (imgbytes != null && imgbytes.length > 0) { getJavaFXImage(imgbytes); } else { displayEmptyThumb(); } } catch (final Exception e) { e.printStackTrace(); displayEmptyThumb(); } } }, ex -> { ex.printStackTrace(); displayEmptyThumb(); }); }
String val = (String) r.getMetaData().get("isLinked"); if ("true".equalsIgnoreCase(val)) { rule.set(UIAccessRule.HIDDEN);
String val = (String) r.getMetaData().get("isLinked"); if ("true".equalsIgnoreCase(val)) { rule.set(UIAccessRule.SHOW);