@Override protected Object get(Map<String, ? extends Object> context, TimeZone timeZone, Locale locale) { Object obj = null; try { obj = UelUtil.evaluate(context, new String(this.bracketedOriginal)); } catch (PropertyNotFoundException e) { if (Debug.verboseOn()) { Debug.logVerbose("Error evaluating expression " + this + ": " + e, module); } } catch (Exception e) { Debug.logError("Error evaluating expression " + this + ": " + e, module); } if (obj != null) { try { // Check for runtime nesting String str = (String) obj; if (str.contains(openBracket)) { FlexibleStringExpander fse = FlexibleStringExpander.getInstance(str); return fse.get(context, timeZone, locale); } } catch (ClassCastException e) { } } return obj; }
@Override protected Object get(Map<String, ? extends Object> context, TimeZone timeZone, Locale locale) { try { Object obj = UelUtil.evaluate(context, new String(this.valueStr)); if (obj != null) { String currencyCode = this.codeExpr.expandString(context, timeZone, locale); return UtilFormatOut.formatCurrency(new BigDecimal(obj.toString()), currencyCode, locale); } } catch (PropertyNotFoundException e) { if (Debug.verboseOn()) { Debug.logVerbose("Error evaluating expression: " + e, module); } } catch (Exception e) { Debug.logError("Error evaluating expression: " + e, module); } return null; }
@Override protected Object get(Map<String, ? extends Object> context, TimeZone timeZone, Locale locale) { StringBuilder expr = new StringBuilder(this.hint); for (FlexibleStringExpander child : this.childElems) { expr.append(child.expandString(context, timeZone, locale)); } if (expr.length() == 0) { return ""; } try { return UelUtil.evaluate(context, openBracket.concat(expr.toString()).concat(closeBracket)); } catch (PropertyNotFoundException e) { if (Debug.verboseOn()) { Debug.logVerbose("Error evaluating expression: " + e, module); } } catch (Exception e) { Debug.logError("Error evaluating expression: " + e, module); } return ""; }