1 18 package org.apache.beehive.netui.tags.naming; 19 20 import org.apache.beehive.netui.script.ExpressionEvaluationException; 21 import org.apache.beehive.netui.script.ExpressionEvaluator; 22 import org.apache.beehive.netui.script.ExpressionEvaluatorFactory; 23 import org.apache.beehive.netui.util.logging.Logger; 24 25 import javax.servlet.jsp.tagext.Tag ; 26 27 42 public class FormDataNameInterceptor 43 implements INameInterceptor 44 { 45 private static final Logger logger = Logger.getInstance(FormDataNameInterceptor.class); 46 47 55 public String rewriteName(String name, Tag currentTag) 56 throws ExpressionEvaluationException 57 { 58 ExpressionEvaluator eval = ExpressionEvaluatorFactory.getInstance(); 59 60 try { 61 if (!eval.isExpression(name)) 62 return eval.qualify("actionForm", name); 63 return name; 64 } 65 catch (Exception e) { 66 if (logger.isErrorEnabled()) 67 logger.error("Could not qualify name \"" + name + "\" into the actionForm binding context.", e); 68 69 return name; 72 } 73 } 74 } 75 | Popular Tags |