1 5 package org.exoplatform.text.template; 6 7 import org.exoplatform.commons.utils.ExpressionUtil; 8 9 14 public class DataBindingValue extends Value { 15 public String method_ ; 16 17 public DataBindingValue(String expression) { 18 super(expression) ; 19 method_ = ExpressionUtil.removeBindingExpression(expression) ; 20 char[] buf = method_.toCharArray() ; 21 if(method_.endsWith("()")) { 22 method_ = method_.substring(0, method_.length() - 2) ; 23 } else { 24 if(Character.isLowerCase(buf[0])) { 25 buf[0] = Character.toUpperCase(buf[0]) ; 26 } 27 method_ = "get" + new String (buf) ; 28 } 29 } 30 31 public String getMethodName() { return method_ ; } 32 } | Popular Tags |