Return-Path: Delivered-To: apmail-struts-commits-archive@locus.apache.org Received: (qmail 63735 invoked from network); 1 May 2006 15:26:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 May 2006 15:26:06 -0000 Received: (qmail 97621 invoked by uid 500); 1 May 2006 15:26:03 -0000 Delivered-To: apmail-struts-commits-archive@struts.apache.org Received: (qmail 97579 invoked by uid 500); 1 May 2006 15:26:03 -0000 Mailing-List: contact commits-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list commits@struts.apache.org Received: (qmail 97570 invoked by uid 99); 1 May 2006 15:26:02 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 May 2006 08:26:02 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 01 May 2006 08:26:02 -0700 Received: (qmail 63625 invoked by uid 65534); 1 May 2006 15:25:41 -0000 Message-ID: <20060501152541.63624.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r398620 - in /incubator/webwork2/action/src/main: java/org/apache/struts/action2/components/Form.java java/org/apache/struts/action2/views/jsp/ui/FormTag.java resources/META-INF/taglib.tld resources/template/simple/form.ftl Date: Mon, 01 May 2006 15:25:40 -0000 To: commits@struts.apache.org From: hermanns@apache.org X-Mailer: svnmailer-1.0.8 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: hermanns Date: Mon May 1 08:25:40 2006 New Revision: 398620 URL: http://svn.apache.org/viewcvs?rev=398620&view=rev Log: Form Tag needs accept-charset attribute o added new attribute to Form, FormTag and form.ftl o updated taglib.tld o fixed dest dir property for ant xdoclet-taglib target Issue Number: WW-1303 Modified: incubator/webwork2/action/src/main/java/org/apache/struts/action2/components/Form.java incubator/webwork2/action/src/main/java/org/apache/struts/action2/views/jsp/ui/FormTag.java incubator/webwork2/action/src/main/resources/META-INF/taglib.tld incubator/webwork2/action/src/main/resources/template/simple/form.ftl Modified: incubator/webwork2/action/src/main/java/org/apache/struts/action2/components/Form.java URL: http://svn.apache.org/viewcvs/incubator/webwork2/action/src/main/java/org/apache/struts/action2/components/Form.java?rev=398620&r1=398619&r2=398620&view=diff ============================================================================== --- incubator/webwork2/action/src/main/java/org/apache/struts/action2/components/Form.java (original) +++ incubator/webwork2/action/src/main/java/org/apache/struts/action2/components/Form.java Mon May 1 08:25:40 2006 @@ -80,6 +80,7 @@ protected String validate; protected String portletMode; protected String windowState; + protected String acceptcharset; public Form(OgnlValueStack stack, HttpServletRequest request, HttpServletResponse response) { super(stack, request, response); @@ -142,6 +143,10 @@ addParameter("validate", findValue(validate, Boolean.class)); } + if (acceptcharset != null) { + addParameter("acceptcharset", findString(acceptcharset)); + } + // keep a collection of the tag names for anything special the templates might want to do (such as pure client // side validation) if (!parameters.containsKey("tagNames")) { @@ -368,5 +373,13 @@ */ public void setWindowState(String windowState) { this.windowState = windowState; + } + + /** + * The accepted charsets for this form. The values may be comma or blank delimited. + * @a2.tagattribute required="false" + */ + public void setAcceptcharset(String acceptcharset) { + this.acceptcharset = acceptcharset; } } Modified: incubator/webwork2/action/src/main/java/org/apache/struts/action2/views/jsp/ui/FormTag.java URL: http://svn.apache.org/viewcvs/incubator/webwork2/action/src/main/java/org/apache/struts/action2/views/jsp/ui/FormTag.java?rev=398620&r1=398619&r2=398620&view=diff ============================================================================== --- incubator/webwork2/action/src/main/java/org/apache/struts/action2/views/jsp/ui/FormTag.java (original) +++ incubator/webwork2/action/src/main/java/org/apache/struts/action2/views/jsp/ui/FormTag.java Mon May 1 08:25:40 2006 @@ -41,6 +41,7 @@ protected String onsubmit; protected String portletMode; protected String windowState; + protected String acceptcharset; public Component getBean(OgnlValueStack stack, HttpServletRequest req, HttpServletResponse res) { return new Form(stack, req, res); @@ -58,6 +59,7 @@ form.setOnsubmit(onsubmit); form.setPortletMode(portletMode); form.setWindowState(windowState); + form.setAcceptcharset(acceptcharset); } @@ -95,5 +97,9 @@ public void setWindowState(String windowState) { this.windowState = windowState; + } + + public void setAcceptcharset(String acceptcharset) { + this.acceptcharset = acceptcharset; } } Modified: incubator/webwork2/action/src/main/resources/META-INF/taglib.tld URL: http://svn.apache.org/viewcvs/incubator/webwork2/action/src/main/resources/META-INF/taglib.tld?rev=398620&r1=398619&r2=398620&view=diff ============================================================================== --- incubator/webwork2/action/src/main/resources/META-INF/taglib.tld (original) +++ incubator/webwork2/action/src/main/resources/META-INF/taglib.tld Mon May 1 08:25:40 2006 @@ -461,6 +461,14 @@ + acceptcharset + false + true + + + + + openTemplate false true Modified: incubator/webwork2/action/src/main/resources/template/simple/form.ftl URL: http://svn.apache.org/viewcvs/incubator/webwork2/action/src/main/resources/template/simple/form.ftl?rev=398620&r1=398619&r2=398620&view=diff ============================================================================== --- incubator/webwork2/action/src/main/resources/template/simple/form.ftl (original) +++ incubator/webwork2/action/src/main/resources/template/simple/form.ftl Mon May 1 08:25:40 2006 @@ -39,4 +39,7 @@ <#if parameters.title?exists> title="${parameters.title?html}"<#rt/> +<#if parameters.acceptcharset?exists> + accept-charset="${parameters.acceptcharset?html}"<#rt/> + >