[cvs] expresso commit by mtraum: move newly added ExTagUtils to
more
JCorporate Ltd
jcorp at jcorporate.com
Thu Apr 28 13:32:39 UTC 2005
Log Message:
-----------
move newly added ExTagUtils to more appropriate package
Modified Files:
--------------
expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html:
ExButtonTag.java
ExSubmitTag.java
ExImageTag.java
Added Files:
-----------
expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/taglib:
ExTagUtils.java
Removed Files:
-------------
expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html:
ExTagUtils.java
Revision Data
-------------
Index: ExSubmitTag.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html/ExSubmitTag.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html/ExSubmitTag.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html/ExSubmitTag.java -u -r1.14 -r1.15
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html/ExSubmitTag.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html/ExSubmitTag.java
@@ -76,6 +76,7 @@
import com.jcorporate.expresso.core.controller.Transition;
import com.jcorporate.expresso.core.misc.StringUtil;
import com.jcorporate.expresso.ext.struts.taglib.ControllerUtils;
+import com.jcorporate.expresso.ext.taglib.ExTagUtils;
import com.jcorporate.expresso.ext.taglib.MessageUtil;
Index: ExButtonTag.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html/ExButtonTag.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html/ExButtonTag.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html/ExButtonTag.java -u -r1.11 -r1.12
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html/ExButtonTag.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html/ExButtonTag.java
@@ -76,6 +76,7 @@
import com.jcorporate.expresso.core.controller.Transition;
import com.jcorporate.expresso.core.misc.StringUtil;
import com.jcorporate.expresso.ext.struts.taglib.ControllerUtils;
+import com.jcorporate.expresso.ext.taglib.ExTagUtils;
/**
Index: ExImageTag.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html/ExImageTag.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html/ExImageTag.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html/ExImageTag.java -u -r1.14 -r1.15
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html/ExImageTag.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html/ExImageTag.java
@@ -77,6 +77,7 @@
import com.jcorporate.expresso.core.controller.Transition;
import com.jcorporate.expresso.core.misc.StringUtil;
import com.jcorporate.expresso.ext.struts.taglib.ControllerUtils;
+import com.jcorporate.expresso.ext.taglib.ExTagUtils;
/**
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html/ExTagUtils.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/* ====================================================================
- * The Jcorporate Apache Style Software License, Version 1.2 05-07-2002
- *
- * Copyright (c) 1995-2002 Jcorporate Ltd. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by Jcorporate Ltd.
- * (http://www.jcorporate.com/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. "Jcorporate" and product names such as "Expresso" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written permission,
- * please contact info at jcorporate.com.
- *
- * 5. Products derived from this software may not be called "Expresso",
- * or other Jcorporate product names; nor may "Expresso" or other
- * Jcorporate product names appear in their name, without prior
- * written permission of Jcorporate Ltd.
- *
- * 6. No product derived from this software may compete in the same
- * market space, i.e. framework, without prior written permission
- * of Jcorporate Ltd. For written permission, please contact
- * partners at jcorporate.com.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL JCORPORATE LTD OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Jcorporate Ltd. Contributions back
- * to the project(s) are encouraged when you make modifications.
- * Please send them to support at jcorporate.com. For more information
- * on Jcorporate Ltd. and its products, please see
- * <http://www.jcorporate.com/>.
- *
- * Portions of this software are based upon other open source
- * products and are subject to their respective licenses.
- */
-
-package com.jcorporate.expresso.ext.struts.taglib.html;
-
-import com.jcorporate.expresso.core.controller.Transition;
-import com.jcorporate.expresso.core.misc.URLUTF8Encoder;
-import com.jcorporate.expresso.kernel.util.FastStringBuffer;
-
-/**
- * Utilities related to the html extended struts tags
- *
- */
-public final class ExTagUtils {
-
- /**
- * Returns a hidden form field string that is safe in either the GET or POST
- * case.
- *
- * @param transition the Transition to retrieve the parameters from
- * @param closingElement the string to use to close the html statement
- *
- * @return java.lang.String
- */
- public static String getHTMLParamString(Transition transition, String closingElement) {
- String paramString = transition.getParamString();
- paramString = URLUTF8Encoder.encode(paramString);
-
- //
- //Guess at a memory allocation to reduce re-allocation/copy
- //Alloc Adjust was guessed at based upon watching string lengths and
- //guessing a reasonable maximum size that would fit most applciations.
- //
-
- FastStringBuffer sb = FastStringBuffer.getInstance();
- String returnValue = null;
- try {
- sb.append("<input type=\"HIDDEN\" name=\"");
- sb.append(transition.getName());
- sb.append("_params");
- sb.append("\" value=\"");
- sb.append(paramString);
- sb.append("\"");
- sb.append(closingElement);
- sb.append("<input type=\"HIDDEN\" name=\"");
- sb.append(transition.getName());
- sb.append("_encoding");
- sb.append("\" value=\"u\"");
- sb.append(closingElement);
- returnValue = sb.toString();
- } finally {
- sb.release();
- sb = null;
- }
- return returnValue;
- } /* getHTMLParamStriong() */
-}
--- /dev/null
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/taglib/ExTagUtils.java
@@ -0,0 +1,118 @@
+/* ====================================================================
+ * The Jcorporate Apache Style Software License, Version 1.2 05-07-2002
+ *
+ * Copyright (c) 1995-2002 Jcorporate Ltd. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ * if any, must include the following acknowledgment:
+ * "This product includes software developed by Jcorporate Ltd.
+ * (http://www.jcorporate.com/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. "Jcorporate" and product names such as "Expresso" must
+ * not be used to endorse or promote products derived from this
+ * software without prior written permission. For written permission,
+ * please contact info at jcorporate.com.
+ *
+ * 5. Products derived from this software may not be called "Expresso",
+ * or other Jcorporate product names; nor may "Expresso" or other
+ * Jcorporate product names appear in their name, without prior
+ * written permission of Jcorporate Ltd.
+ *
+ * 6. No product derived from this software may compete in the same
+ * market space, i.e. framework, without prior written permission
+ * of Jcorporate Ltd. For written permission, please contact
+ * partners at jcorporate.com.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL JCORPORATE LTD OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Jcorporate Ltd. Contributions back
+ * to the project(s) are encouraged when you make modifications.
+ * Please send them to support at jcorporate.com. For more information
+ * on Jcorporate Ltd. and its products, please see
+ * <http://www.jcorporate.com/>.
+ *
+ * Portions of this software are based upon other open source
+ * products and are subject to their respective licenses.
+ */
+
+package com.jcorporate.expresso.ext.taglib;
+
+import com.jcorporate.expresso.core.controller.Transition;
+import com.jcorporate.expresso.core.misc.URLUTF8Encoder;
+import com.jcorporate.expresso.kernel.util.FastStringBuffer;
+
+/**
+ * Utilities related to the html extended struts tags
+ *
+ */
+public final class ExTagUtils {
+
+ /**
+ * Returns a hidden form field string that is safe in either the GET or POST
+ * case.
+ *
+ * @param transition the Transition to retrieve the parameters from
+ * @param closingElement the string to use to close the html statement
+ *
+ * @return java.lang.String
+ */
+ public static String getHTMLParamString(Transition transition, String closingElement) {
+ String paramString = transition.getParamString();
+ paramString = URLUTF8Encoder.encode(paramString);
+
+ //
+ //Guess at a memory allocation to reduce re-allocation/copy
+ //Alloc Adjust was guessed at based upon watching string lengths and
+ //guessing a reasonable maximum size that would fit most applciations.
+ //
+
+ FastStringBuffer sb = FastStringBuffer.getInstance();
+ String returnValue = null;
+ try {
+ sb.append("<input type=\"HIDDEN\" name=\"");
+ sb.append(transition.getName());
+ sb.append("_params");
+ sb.append("\" value=\"");
+ sb.append(paramString);
+ sb.append("\"");
+ sb.append(closingElement);
+ sb.append("<input type=\"HIDDEN\" name=\"");
+ sb.append(transition.getName());
+ sb.append("_encoding");
+ sb.append("\" value=\"u\"");
+ sb.append(closingElement);
+ returnValue = sb.toString();
+ } finally {
+ sb.release();
+ sb = null;
+ }
+ return returnValue;
+ } /* getHTMLParamStriong() */
+}
More information about the cvs
mailing list