Commits

Anonymous committed 52db9f1

Handle themeAttr properly.

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@420573baa09-0c28-0410-bef9-dab3c582ae83

  • Participants
  • Parent commits 92ef4d0

Comments (0)

Files changed (1)

src/java/com/opensymphony/webwork/views/jsp/ui/AbstractUITag.java

 import com.opensymphony.xwork.validator.ActionValidatorManager;
 import com.opensymphony.xwork.validator.Validator;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 import org.apache.velocity.Template;
 import org.apache.velocity.app.VelocityEngine;
 import org.apache.velocity.context.Context;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
 import java.io.Writer;
 
     }
 
     public String getTheme() {
+        if (themeAttr != null) {
+            theme = setupPath(findString(themeAttr), false);
+        }
+
         // If theme set is not explicitly given,
         // try to find attribute which states the theme set to use
         if ((theme == null) || (theme == "")) {
      * @param myDefaultTemplate
      */
     protected String buildTemplateName(String myTemplate, String myDefaultTemplate) {
-        if (themeAttr != null) {
-            theme = findString(themeAttr);
-        }
-
         String template = myDefaultTemplate;
+
         if (myTemplate != null) {
             template = findString(myTemplate);
+
             if (template == null) {
                 LOG.warn("template attribute evaluated to null; using value as-is for backwards compatibility");
                 template = myTemplate;
     }
 
     private String setupPath(String path, boolean prefix) {
-        if (path != null) {
+        if ((path != null) && (path != "")) {
             if (prefix) {
                 if (!path.startsWith("/")) {
                     path = "/" + path;