Anonymous avatar Anonymous committed 801336a

various little bug fixes and stuff

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

Comments (0)

Files changed (8)

                 <class-update-interval>10000000000</class-update-interval>
                 <jsp jsp-update-interval="2s"/>
 
+                <classpath id='../../../xwork/build/java'/>
                 <classpath id='../../build/java'/>
                 <classpath id='../../build/example'/>
                 <classpath id='../etc/example'/>

src/java/com/opensymphony/webwork/views/jsp/BeanTag.java

         }
 
         try {
-            bean = Beans.instantiate(cl, findString(name));
+            bean = Class.forName(findString(name)).newInstance();
         } catch (Exception e) {
             log.error("Could not instantiate bean", e);
 

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

     static {
         try {
             THEME = Configuration.getString("webwork.ui.theme");
+            if (!THEME.endsWith("/")) {
+                THEME += "/";
+            }
         } catch (IllegalArgumentException e) {
             LOG.warn("Unable to find 'webwork.ui.theme' property setting. Defaulting to /template/xhtml/", e);
             THEME = "/template/xhtml/";

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

 import com.opensymphony.webwork.views.jsp.WebWorkBodyTagSupport;
 
 import com.opensymphony.xwork.util.OgnlValueStack;
+import com.opensymphony.xwork.TextProvider;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.util.Iterator;
 
 import javax.servlet.jsp.JspException;
 
             defaultMessage = actualName;
         }
 
-        String expression = "getText('" + actualName + "', '" + defaultMessage + "'";
-        boolean pushed = false;
-
-        if (values != null) {
-            ListValueHolder listValueHolder = new ListValueHolder(values);
-            stack.push(listValueHolder);
-            pushed = true;
-            expression = expression + ", textTagListValueHolderList";
-        }
-
-        expression = expression + ")";
-
-        String msg = (String) findValue(expression, String.class);
-
-        if (pushed) {
-            stack.pop();
+        String msg = null;
+        for (Iterator iterator = getStack().getRoot().iterator(); iterator.hasNext();) {
+            Object o = iterator.next();
+            if (o instanceof TextProvider) {
+                TextProvider tp = (TextProvider) o;
+                msg = tp.getText(actualName, defaultMessage, values);
+                break;
+            }
         }
 
         if (msg != null) {
             } catch (IOException e) {
                 throw new JspException(e);
             }
-        } else {
-            LOG.warn("No message found for expression: " + expression);
         }
 
         return EVAL_PAGE;

src/java/com/opensymphony/webwork/views/jsp/vui/AbstractVUITag.java

         // Default template set
         if ((theme == null) || (theme == "")) {
             theme = Configuration.getString("webwork.ui.theme");
+            if (!theme.endsWith("/")) {
+                theme += "/";
+            }
         }
 
         return theme;

src/java/com/opensymphony/webwork/views/velocity/VelocityManager.java

      * @param p
      */
     private void applyDefaultConfiguration(ServletContext context, Properties p) {
+        // ensure that caching isn't overly aggressive
+
+
         /**
          * Load a default resource loader definition if there isn't one present.
          * Ben Hall (22/08/2003)
             p.setProperty("wwfile.resource.loader.description", "Velocity File Resource Loader");
             p.setProperty("wwfile.resource.loader.class", "org.apache.velocity.runtime.resource.loader.FileResourceLoader");
             p.setProperty("wwfile.resource.loader.path", context.getRealPath(""));
+            p.setProperty("wwfile.resource.loader.modificationCheckInterval", "2");
+            p.setProperty("wwfile.resource.loader.cache", "true");
         } else if (p.getProperty(Velocity.RESOURCE_LOADER) == null) {
             p.setProperty(Velocity.RESOURCE_LOADER, "wwclass");
         }
          */
         p.setProperty("wwclass.resource.loader.description", "Velocity Classpath Resource Loader");
         p.setProperty("wwclass.resource.loader.class", "com.opensymphony.webwork.views.velocity.WebWorkResourceLoader");
+        p.setProperty("wwclass.resource.loader.modificationCheckInterval", "2");
+        p.setProperty("wwclass.resource.loader.cache", "true");
 
         /**
          * the TagDirective and BodyTagDirective must be added to the userdirective

src/java/webwork-default.xml

         </result-types>
 
         <interceptors>
-            <interceptor name="timer" class="com.opensymphony.xwork.interceptor.TimerInterceptor"/>
-            <interceptor name="logger" class="com.opensymphony.xwork.interceptor.LoggingInterceptor"/>
             <interceptor name="chain" class="com.opensymphony.xwork.interceptor.ChainingInterceptor"/>
             <interceptor name="static-params" class="com.opensymphony.xwork.interceptor.StaticParametersInterceptor"/>
             <interceptor name="params" class="com.opensymphony.xwork.interceptor.ParametersInterceptor"/>
             <interceptor name="prepare" class="com.opensymphony.xwork.interceptor.PrepareInterceptor"/>
             <interceptor name="conversionError" class="com.opensymphony.webwork.interceptor.WebWorkConversionErrorInterceptor"/>
             <interceptor-stack name="defaultStack">
-                <interceptor-ref name="timer"/>
-                <interceptor-ref name="logger"/>
                 <interceptor-ref name="static-params"/>
                 <interceptor-ref name="params"/>
                 <interceptor-ref name="conversionError"/>

src/webapp/tags.jsp

 </tr>
 
 <benchmark:duration output="true">
-<ww:label label="'label test'" name="scalar"/>
+<ww:label label="'label test'" name="'scalar'" value="scalar"/>
 </benchmark:duration> ms</td></tr>
 
 <benchmark:duration output="true">
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.