From tapestry-dev-returnrhartman@example.com Mon Aug 01 08:14:20 2005 Return-Path: <tapestry-dev-returnrhartman@example.com> Delivered-To: rhartman@example.com Received: (qmail 87593 invoked from network); 1 Aug 2005 08:14:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Aug 2005 08:14:20 -0000 Received: (qmail 36423 invoked by uid 500); 1 Aug 2005 08:14:18 -0000 Delivered-To: rhartman@example.com Received: (qmail 36415 invoked by uid 500); 1 Aug 2005 08:14:17 -0000 Mailing-List: contact rhartman@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:rhartman@example.com> List-Help: <mailto:rhartman@example.com> List-Post: <mailto:rhartman@example.com> List-Id: "Tapestry development" <tapestry-dev.jakarta.apache.org> Reply-To: "Tapestry development" <rhartman@example.com> Delivered-To: mailing list rhartman@example.com Received: (qmail 36402 invoked by uid 99); 1 Aug 2005 08:14:17 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Aug 2005 01:14:17 -0700 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [83.161.120.155] (HELO blaster.systems.pipex.net) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Aug 2005 01:14:07 -0700 Received: from [83.161.120.155] (81-86-72-174.dsl.pipex.com [83.161.120.155]) by blaster.systems.pipex.net (Postfix) with ESMTP id 977EDE0001CA for <rhartman@example.com>; Mon, 1 Aug 2005 09:14:12 +0100 (BST) Mime-Version: 1.0 (Apple Message framework v733) In-Reply-To: <rhartman@example.com> References: <rhartman@example.com> <rhartman@example.com> <rhartman@example.com> <rhartman@example.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <rhartman@example.com> Content-Transfer-Encoding: 7bit From: p green <rhartman@example.com> Subject: Re: Can't build Tapestry 4 Date: Mon, 1 Aug 2005 09:14:12 +0100 To: "Tapestry development" <rhartman@example.com> X-Mailer: Apple Mail (2.733) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I am using Java 1.4.2 which is why I need to make some of the changes listed Paul On 1 Aug 2005, at 03:20, Jamie Orchard-Hays wrote: > Are these because of Java 5 dependencies? If so, that's not my > problem. I'm on Java 5. > > Jamie > > > On Jul 31, 2005, at 4:57 AM, p green wrote: > > >> I am using OS X and have found that to get the source to build I >> have to do the following: >> >> in file framework/src/scripts/TestUpload.xml >> >> I have to comment out every occurrence of the following lines: >> >> <assert-output name="Match Confirmation"> >> Contents match. >> </assert-output> >> >> in file framework/src/test/org/apache/tapestry/form/validator/ >> TestValidatorFactory.java >> >> comment out the following method: >> >> public void testInstantiateFailure() >> { >> Map map = new HashMap(); >> >> map.put("fred", newContribution(false, Object.class)); >> >> ValidatorFactoryImpl vf = new ValidatorFactoryImpl(); >> vf.setValidators(map); >> >> try >> { >> vf.constructValidatorList("fred"); >> unreachable(); >> } >> catch (ApplicationRuntimeException ex) >> { >> assertEquals( >> "Error initializing validator 'fred' (class >> java.lang.Object): java.lang.Object", >> ex.getMessage()); >> } >> >> } >> >> >> This generally works although I do not have sdk1.5 so do not run >> the annotations so modify my build.xml file in the source root to: >> >> <filelist id="project.modules" >> dir="." >> files="framework/build.xml portlet/build.xml contrib/ >> build.xml"/> >> >> I also have to add: >> >> <property file="${root.dir}/project.properties"/> >> >> to every subdirectory build.xml file otherwise certain files are >> not found. >> >> I do not know whether this will help, I have not built the latest >> cvs but it has always worked upto beta3. >> >> Paul >> >> >> On 31 Jul 2005, at 05:09, Howard Lewis Ship wrote: >> >> >> >>> There's been suspicions that a couple of test files are checked >>> in as >>> ascii, not binary, causing problems in a couple of tests (that are >>> very exacting about line endings). Need some more details. >>> >>> On 7/30/05, Jamie Orchard-Hays <rhartman@example.com> wrote: >>> >>> >>> >>>> I've got HEAD versions of Tapestry and Hivemind. I've followed the >>>> Wiki instructions for building them. I've set the config files. >>>> When >>>> I run, it breaks on the tests. >>>> >>>> Any clue how to get beyond this? >>>> >>>> BUILD FAILED >>>> /Users/jamieorc/jakarta/hivemind-head/hivebuild/project.xml:52: The >>>> following error occurred while executing this line: >>>> /Users/jamieorc/jakarta/hivemind-head/hivebuild/project.xml:43: The >>>> following error occurred while executing this line: >>>> /Users/jamieorc/jakarta/hivemind-head/hivebuild/module.xml:237: The >>>> following error occurred while executing this line: >>>> /Users/jamieorc/jakarta/hivemind-head/hivebuild/module.xml:212: >>>> Some >>>> tests failed. >>>> >>>> Total time: 5 minutes 18 seconds >>>> >>>> >>>> ------------------------------------------------------------------- >>>> -- >>>> To unsubscribe, e-mail: rhartman@example.com >>>> For additional commands, e-mail: tapestry-dev- >>>> rhartman@example.com >>>> >>>> >>>> >>>> >>>> >>> >>> >>> -- >>> Howard M. Lewis Ship >>> Independent J2EE / Open-Source Java Consultant >>> Creator, Jakarta Tapestry >>> Creator, Jakarta HiveMind >>> >>> Professional Tapestry training, mentoring, support >>> and project work. http://howardlewisship.com >>> >>> -------------------------------------------------------------------- >>> - >>> To unsubscribe, e-mail: rhartman@example.com >>> For additional commands, e-mail: tapestry-dev- >>> rhartman@example.com >>> >>> >>> >>> >> >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: rhartman@example.com > For additional commands, e-mail: rhartman@example.com > > --------------------------------------------------------------------- To unsubscribe, e-mail: rhartman@example.com For additional commands, e-mail: rhartman@example.com From tapestry-dev-returnrhartman@example.com Mon Aug 01 08:52:13 2005 Return-Path: <tapestry-dev-returnrhartman@example.com> Delivered-To: rhartman@example.com Received: (qmail 96240 invoked from network); 1 Aug 2005 08:52:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Aug 2005 08:52:12 -0000 Received: (qmail 71890 invoked by uid 500); 1 Aug 2005 08:52:11 -0000 Delivered-To: rhartman@example.com Received: (qmail 71690 invoked by uid 500); 1 Aug 2005 08:52:10 -0000 Mailing-List: contact rhartman@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:rhartman@example.com> List-Help: <mailto:rhartman@example.com> List-Post: <mailto:rhartman@example.com> List-Id: "Tapestry development" <tapestry-dev.jakarta.apache.org> Reply-To: "Tapestry development" <rhartman@example.com> Delivered-To: mailing list rhartman@example.com Received: (qmail 71676 invoked by uid 99); 1 Aug 2005 08:52:09 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO ajax.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Aug 2005 01:51:57 -0700 Received: from ajax.apache.org (ajax.apache.org [83.161.120.155]) by ajax.apache.org (Postfix) with ESMTP id 5E672E0 for <rhartman@example.com>; Mon, 1 Aug 2005 10:51:54 +0200 (CEST) Message-ID: <rhartman@example.com> Date: Mon, 1 Aug 2005 10:51:54 +0200 (CEST) From: "Ron Piterman (JIRA)" <rhartman@example.com> To: rhartman@example.com Subject: [jira] Commented: (TAPESTRY-409) second FieldLabel behaivour In-Reply-To: <{{EMAIL+PHONE}}> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/TAPESTRY-409?page=comments#action_12317304 ] Ron Piterman commented on TAPESTRY-409: --------------------------------------- the original reporter has nothing to add :) > second FieldLabel behaivour > --------------------------- > > Key: TAPESTRY-409 > URL: http://issues.apache.org/jira/browse/TAPESTRY-409 > Project: Tapestry > Type: Bug > Components: Framework > Versions: 4.0 > Reporter: Ron Piterman > > Using two FieldLabel components for the same Field causes an exception. Don't know if that is wished. > BUT: placing the second one after the field results in a permanent stale link when submitting. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: rhartman@example.com For additional commands, e-mail: rhartman@example.com From tapestry-dev-returnrhartman@example.com Mon Aug 01 11:20:34 2005 Return-Path: <tapestry-dev-returnrhartman@example.com> Delivered-To: rhartman@example.com Received: (qmail 47613 invoked from network); 1 Aug 2005 11:20:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Aug 2005 11:20:34 -0000 Received: (qmail 10493 invoked by uid 500); 1 Aug 2005 11:20:32 -0000 Delivered-To: rhartman@example.com Received: (qmail 10476 invoked by uid 500); 1 Aug 2005 11:20:31 -0000 Mailing-List: contact rhartman@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:rhartman@example.com> List-Help: <mailto:rhartman@example.com> List-Post: <mailto:rhartman@example.com> List-Id: "Tapestry development" <tapestry-dev.jakarta.apache.org> Reply-To: "Tapestry development" <rhartman@example.com> Delivered-To: mailing list rhartman@example.com Received: (qmail 10463 invoked by uid 99); 1 Aug 2005 11:20:31 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Aug 2005 04:20:31 -0700 X-ASF-Spam-Status: No, hits=3.3 required=10.0 tests=NIGERIAN_SUBJECT2,RCVD_BY_IP,RCVD_NUMERIC_HELO,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of rhartman@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO ciao.gmane.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Aug 2005 04:20:22 -0700 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1DzYLC-0000nP-Nv for rhartman@example.com; Mon, 01 Aug 2005 13:20:18 +0200 Received: from 83.161.120.155 ([83.161.120.155]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for <rhartman@example.com>; Mon, 01 Aug 2005 13:20:18 +0200 Received: from jonehwk by 83.161.120.155 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for <rhartman@example.com>; Mon, 01 Aug 2005 13:20:18 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: rhartman@example.com From: Jone.hwk <rhartman@example.com> Subject: Urgent help about MultipartDecoder in tapestry 4... Date: Mon, 1 Aug 2005 11:06:48 +0000 (UTC) Lines: 8 Message-ID: <rhartman@example.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: rhartman@example.com X-Gmane-NNTP-Posting-Host: main.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 83.161.120.155 (Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)) Sender: news <rhartman@example.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, How to set thresholdSize and RepositoryPath programmly in tapestry 4.0?In tapestry 3.0,I can easily configure uploading by using DefaultMultipartDecoder.getSharedInstance(),but how can I do in tapestry4? thanks in advance. Jone.hwk --------------------------------------------------------------------- To unsubscribe, e-mail: rhartman@example.com For additional commands, e-mail: rhartman@example.com From tapestry-dev-returnrhartman@example.com Mon Aug 01 11:23:00 2005 Return-Path: <tapestry-dev-returnrhartman@example.com> Delivered-To: rhartman@example.com Received: (qmail 48193 invoked from network); 1 Aug 2005 11:22:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Aug 2005 11:22:59 -0000 Received: (qmail 11774 invoked by uid 500); 1 Aug 2005 11:22:59 -0000 Delivered-To: rhartman@example.com Received: (qmail 11512 invoked by uid 500); 1 Aug 2005 11:22:57 -0000 Mailing-List: contact rhartman@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:rhartman@example.com> List-Help: <mailto:rhartman@example.com> List-Post: <mailto:rhartman@example.com> List-Id: "Tapestry development" <tapestry-dev.jakarta.apache.org> Reply-To: "Tapestry development" <rhartman@example.com> Delivered-To: mailing list rhartman@example.com Received: (qmail 11489 invoked by uid 99); 1 Aug 2005 11:22:57 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Aug 2005 04:22:57 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of rhartman@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO ciao.gmane.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Aug 2005 04:22:47 -0700 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DzYMV-0000xT-Pd for rhartman@example.com; Mon, 01 Aug 2005 13:21:39 +0200 Received: from p5492E4FE.dip.t-dialin.net ([83.161.120.155]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for <rhartman@example.com>; Mon, 01 Aug 2005 13:21:39 +0200 Received: from jonas.maurus by p5492E4FE.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for <rhartman@example.com>; Mon, 01 Aug 2005 13:21:39 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: rhartman@example.com From: Jonas Maurus <rhartman@example.com> Subject: request developer input on fixing TAPESTRY-517 Date: Mon, 1 Aug 2005 11:20:41 +0000 (UTC) Lines: 81 Message-ID: <rhartman@example.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: rhartman@example.com X-Gmane-NNTP-Posting-Host: main.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 83.161.120.155 (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4) Sender: news <rhartman@example.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi This is re: http://issues.apache.org/jira/browse/TAPESTRY-517 I was able to track down the bug. (Please read the report at the above URL, it's fairly long). The first half of the bug was that when a FieldLabel is rendered /after/ its related form component, its for="" attribute was off by one, because AbstractFormComponent.renderIdAttribute(...) didn't cache the component's cliendId correctly (created by a call to cycle.getUniqueId(), which was added sometime during Tapestry 4.0 development). I posted a simple patch for this bug in JIRA. The second half involves the same conditions, but manifests itself in duplicate entries in the "formids"-hidden parameter like so: <input type="hidden" name="formids" value="bookkeeperRCB,bookkeeperRCB$0,adminRCB,adminRCB$0" /> which of course breaks the rewind. This has been first reported as TAPESTRY-409. This happens, because there's a "rather strange" (for me) setter in AbstractFormComponent: protected void setName(IForm form) { form.getElementId(this); } This ends rhartman@example.com(...), which in turn retrieves an unique id using its own IdAllocator-instance (which I think is redundant, as IRequestCycle now carries one) and then procedes to call AbstractFormComponent.setName(String name). Now, if the FieldLabel precedes the field component, then everything's fine, as AbstractFormComponent.renderComponent(...) checks if the field was prerendered, and if it was, just writes the prerendered mark-up. But if the FieldLabel is rendered after the field component, setName(IForm) gets called a second time during the (unnecessary) prerender, which causes two calls to getElementId(IFormComponent) which in turn results in another call to setName(String), overwriting the real elementId recorded during the first rendering. I have to say... a setter with that kind of side-effect does not exactly make good coding practice, especially with the abundant use of Tapestry's auto-implementing of abstract properties, which is documented here (and /only/ here): http://wiki.apache.org/jakarta-tapestry/Tapestry31Status under "Oct 2004" it says: * 3.1 will create a transient property if an abstract accessor exists for a property, even if there is no matching <property> (this falls under dont repeat yourself). nooooow... after explaining all of this, I'd like to fix the bug :-), but there's multiple ways to go about it. 1. The best way to me seems to rip out all redundant IdAllocators and just use the one in IRequestCycle, as multiple components seem to have their own instances which looks like a bug waiting to happen to me. This would certainly clean up the id allocation code. Further, using a wasRendered() method instead of wasPrerendered() you could cache any component once it was rendered. (This might break some things of course and might be put on the roadmap for 4.1(?)) 2. The quick and easy way seems to be to simply check in AbstractFormComponent.renderComponent(...) if getName() is non-empty and avoid the call to setName(IForm) if it is. This would keep the potentially unnecessary prerender cycle, but it'd be an easy fix with minimal potential to break things. Unfortunately I have an exam coming up on friday, so I can't work on 1, but I've attached a new patch to TAPESTRY-517 which works for me at a first glance. cheers, Jonas Maurus --------------------------------------------------------------------- To unsubscribe, e-mail: rhartman@example.com For additional commands, e-mail: rhartman@example.com From tapestry-dev-returnrhartman@example.com Mon Aug 01 11:26:15 2005 Return-Path: <tapestry-dev-returnrhartman@example.com> Delivered-To: rhartman@example.com Received: (qmail 49241 invoked from network); 1 Aug 2005 11:26:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Aug 2005 11:26:15 -0000 Received: (qmail 13965 invoked by uid 500); 1 Aug 2005 11:26:12 -0000 Delivered-To: rhartman@example.com Received: (qmail 13945 invoked by uid 500); 1 Aug 2005 11:26:12 -0000 Mailing-List: contact rhartman@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:rhartman@example.com> List-Help: <mailto:rhartman@example.com> List-Post: <mailto:rhartman@example.com> List-Id: "Tapestry development" <tapestry-dev.jakarta.apache.org> Reply-To: "Tapestry development" <rhartman@example.com> Delivered-To: mailing list rhartman@example.com Received: (qmail 13924 invoked by uid 99); 1 Aug 2005 11:26:10 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO ajax.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Aug 2005 04:25:54 -0700 Received: from ajax.apache.org (ajax.apache.org [83.161.120.155]) by ajax.apache.org (Postfix) with ESMTP id 0F57AE4 for <rhartman@example.com>; Mon, 1 Aug 2005 13:25:51 +0200 (CEST) Message-ID: <rhartman@example.com> Date: Mon, 1 Aug 2005 13:25:51 +0200 (CEST) From: "Jonas Maurus (JIRA)" <rhartman@example.com> To: rhartman@example.com Subject: [jira] Updated: (TAPESTRY-517) Using a FieldLabel component after the decorated form component causes the FieldLabel's id attribute to be wrong In-Reply-To: <rhartman@example.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/TAPESTRY-517?page=all ] Jonas Maurus updated TAPESTRY-517: ---------------------------------- Attachment: AbstractFormComponent.clientid_fix_2.diff This patch fixes all issues (including the runaway formids), but doesn't fix the underlying design issues. I've started a discussion on the developer mailing list (http://news.gmane.org/gmane.comp.jakarta.tapestry.devel) on this bug to create a roadmap. > Using a FieldLabel component after the decorated form component causes the FieldLabel's id attribute to be wrong > ---------------------------------------------------------------------------------------------------------------- > > Key: TAPESTRY-517 > URL: http://issues.apache.org/jira/browse/TAPESTRY-517 > Project: Tapestry > Type: Bug > Components: Framework > Versions: 4.0 > Reporter: Jonas Maurus > Attachments: AbstractFormComponent.clientid_fix.diff, AbstractFormComponent.clientid_fix_2.diff > > Quoting from TAPESTRY-409: > <!-- page definition --> > <component id="bookkeeperRCB" type="Checkbox"> > <binding name="selected" value="hasBookkeeperRole" /> > </component> > > <component id="adminRCB" type="Checkbox"> > <binding name="selected" value="hasAdministratorRole" /> > </component> > <!-- page template --> > <tr> > <td><input jwcid="bookkeeperRCB" type="checkbox" value="Y" /></td> > <td><label jwcid="@FieldLabel" for="bookkeeper" > field="ognl:components.bookkeeperRCB" displayName="message:form.roles.bookkeeper">Bookkeeper</label></td> > </tr> > <tr> > <td><input jwcid="adminRCB" type="checkbox" value="Y" /></td> > <td><label jwcid="@FieldLabel" for="admin" > field="ognl:components.adminRCB" displayName="message:form.roles.administrator">Administrator</label></td> > </tr> > yields: > <tr> > <td><input type="checkbox" name="bookkeeperRCB" id="bookkeeperRCB" value="Y"/></td> > <td><label for="bookkeeperRCB$0">Bookkeeper</label></td> > </tr> > <tr> > <td><input type="checkbox" name="adminRCB" checked="checked" id="adminRCB" value="Y"/></td> > <td><label for="adminRCB$0">Administrator</label></td> > </tr> > as you can see the generated fieldnames ("bookkeeperRCB$0"...) are wrong. This always results in a stale-link exception. > I tracked down the bug: FieldLabel calls prerenderField() which in turn causes an uniqueId to be allocated in AbstractFormComponent.renderIdAttribute. Everything works out when the FieldLabel precedes the form component it decorates. If it comes after the form component, IRequestCycle.getUniqueId() will already have stored an id for the component and return a new one. > I'm not quite sure about the mechanics described above, as I don't fully understand FormSupportImpl yet, perhaps someone else can shed light on this. > However, the allocated client id wasn't cached properly in AbstractFormComponent.renderIdAttribute. I'll attach a patch as soon as I've saved this bug report. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: rhartman@example.com For additional commands, e-mail: rhartman@example.com From tapestry-dev-returnrhartman@example.com Mon Aug 01 11:47:53 2005 Return-Path: <tapestry-dev-returnrhartman@example.com> Delivered-To: rhartman@example.com Received: (qmail 55432 invoked from network); 1 Aug 2005 11:47:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Aug 2005 11:47:53 -0000 Received: (qmail 44986 invoked by uid 500); 1 Aug 2005 11:47:50 -0000 Delivered-To: rhartman@example.com Received: (qmail 44972 invoked by uid 500); 1 Aug 2005 11:47:50 -0000 Mailing-List: contact rhartman@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:rhartman@example.com> List-Help: <mailto:rhartman@example.com> List-Post: <mailto:rhartman@example.com> List-Id: "Tapestry development" <tapestry-dev.jakarta.apache.org> Reply-To: "Tapestry development" <rhartman@example.com> Delivered-To: mailing list rhartman@example.com Received: (qmail 44959 invoked by uid 99); 1 Aug 2005 11:47:50 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO ajax.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Aug 2005 04:47:38 -0700 Received: from ajax.apache.org (ajax.apache.org [83.161.120.155]) by ajax.apache.org (Postfix) with ESMTP id C8E5DE1 for <rhartman@example.com>; Mon, 1 Aug 2005 13:47:35 +0200 (CEST) Message-ID: <rhartman@example.com> Date: Mon, 1 Aug 2005 13:47:35 +0200 (CEST) From: "Jonas Maurus (JIRA)" <rhartman@example.com> To: rhartman@example.com Subject: [jira] Updated: (TAPESTRY-517) Using a FieldLabel component after the decorated form component causes the FieldLabel's id attribute to be wrong In-Reply-To: <rhartman@example.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/TAPESTRY-517?page=all ] Jonas Maurus updated TAPESTRY-517: ---------------------------------- Attachment: AbstractFormComponent.clientid_fix_3.diff This is the same patch as _2, but I added proper documentation. The first two patches are therefor obsolete. > Using a FieldLabel component after the decorated form component causes the FieldLabel's id attribute to be wrong > ---------------------------------------------------------------------------------------------------------------- > > Key: TAPESTRY-517 > URL: http://issues.apache.org/jira/browse/TAPESTRY-517 > Project: Tapestry > Type: Bug > Components: Framework > Versions: 4.0 > Reporter: Jonas Maurus > Attachments: AbstractFormComponent.clientid_fix.diff, AbstractFormComponent.clientid_fix_2.diff, AbstractFormComponent.clientid_fix_3.diff > > Quoting from TAPESTRY-409: > <!-- page definition --> > <component id="bookkeeperRCB" type="Checkbox"> > <binding name="selected" value="hasBookkeeperRole" /> > </component> > > <component id="adminRCB" type="Checkbox"> > <binding name="selected" value="hasAdministratorRole" /> > </component> > <!-- page template --> > <tr> > <td><input jwcid="bookkeeperRCB" type="checkbox" value="Y" /></td> > <td><label jwcid="@FieldLabel" for="bookkeeper" > field="ognl:components.bookkeeperRCB" displayName="message:form.roles.bookkeeper">Bookkeeper</label></td> > </tr> > <tr> > <td><input jwcid="adminRCB" type="checkbox" value="Y" /></td> > <td><label jwcid="@FieldLabel" for="admin" > field="ognl:components.adminRCB" displayName="message:form.roles.administrator">Administrator</label></td> > </tr> > yields: > <tr> > <td><input type="checkbox" name="bookkeeperRCB" id="bookkeeperRCB" value="Y"/></td> > <td><label for="bookkeeperRCB$0">Bookkeeper</label></td> > </tr> > <tr> > <td><input type="checkbox" name="adminRCB" checked="checked" id="adminRCB" value="Y"/></td> > <td><label for="adminRCB$0">Administrator</label></td> > </tr> > as you can see the generated fieldnames ("bookkeeperRCB$0"...) are wrong. This always results in a stale-link exception. > I tracked down the bug: FieldLabel calls prerenderField() which in turn causes an uniqueId to be allocated in AbstractFormComponent.renderIdAttribute. Everything works out when the FieldLabel precedes the form component it decorates. If it comes after the form component, IRequestCycle.getUniqueId() will already have stored an id for the component and return a new one. > I'm not quite sure about the mechanics described above, as I don't fully understand FormSupportImpl yet, perhaps someone else can shed light on this. > However, the allocated client id wasn't cached properly in AbstractFormComponent.renderIdAttribute. I'll attach a patch as soon as I've saved this bug report. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: rhartman@example.com For additional commands, e-mail: rhartman@example.com From tapestry-dev-returnrhartman@example.com Mon Aug 01 14:38:58 2005 Return-Path: <tapestry-dev-returnrhartman@example.com> Delivered-To: rhartman@example.com Received: (qmail 27004 invoked from network); 1 Aug 2005 14:38:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Aug 2005 14:38:58 -0000 Received: (qmail 16086 invoked by uid 500); 1 Aug 2005 14:38:55 -0000 Delivered-To: rhartman@example.com Received: (qmail 15990 invoked by uid 500); 1 Aug 2005 14:38:55 -0000 Mailing-List: contact rhartman@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:rhartman@example.com> List-Help: <mailto:rhartman@example.com> List-Post: <mailto:rhartman@example.com> List-Id: "Tapestry development" <tapestry-dev.jakarta.apache.org> Reply-To: "Tapestry development" <rhartman@example.com> Delivered-To: mailing list rhartman@example.com Received: (qmail 15888 invoked by uid 99); 1 Aug 2005 14:38:54 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Aug 2005 07:38:54 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of rhartman@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO ws6-4.us4.outblaze.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 01 Aug 2005 07:38:45 -0700 Received: (qmail 7041 invoked from network); 1 Aug 2005 14:38:52 -0000 Received: from unknown (HELO ?83.161.120.155?) (rhartman@example.com@83.161.120.155) by ws6-4.us4.outblaze.com with SMTP; 1 Aug 2005 14:38:52 -0000 Mime-Version: 1.0 (Apple Message framework v733) In-Reply-To: <rhartman@example.com> References: <rhartman@example.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <rhartman@example.com> Content-Transfer-Encoding: 7bit From: Jamie Orchard-Hays <rhartman@example.com> Subject: Re: eclipse and tapstry 4 Date: Mon, 1 Aug 2005 10:38:48 -0400 To: "Tapestry development" <rhartman@example.com> X-Mailer: Apple Mail (2.733) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hmm... was able to add the project to an existing workspace, so I'm sure I'll figure it out. (I'm still a bit of a novice to Eclipse ;-) On Jul 31, 2005, at 11:07 PM, Jamie Orchard-Hays wrote: > I figured I'd give eclipse a go with Tapestry HEAD. I pointed my > workspace at the root of the CVS checkout--I see .project, etc--but > eclipse isn't finding the project. > > Anyone have an idea what I'm missing? I'm on Mac OS Tiger, Eclipse 3.1 > > Jamie > > --------------------------------------------------------------------- > To unsubscribe, e-mail: rhartman@example.com > For additional commands, e-mail: rhartman@example.com > > --------------------------------------------------------------------- To unsubscribe, e-mail: rhartman@example.com For additional commands, e-mail: rhartman@example.com From tapestry-dev-returnrhartman@example.com Mon Aug 01 23:49:05 2005 Return-Path: <tapestry-dev-returnrhartman@example.com> Delivered-To: rhartman@example.com Received: (qmail 33488 invoked from network); 1 Aug 2005 23:49:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Aug 2005 23:49:04 -0000 Received: (qmail 30612 invoked by uid 500); 1 Aug 2005 23:48:52 -0000 Delivered-To: rhartman@example.com Received: (qmail 30370 invoked by uid 500); 1 Aug 2005 23:48:51 -0000 Mailing-List: contact rhartman@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:rhartman@example.com> List-Help: <mailto:rhartman@example.com> List-Post: <mailto:rhartman@example.com> List-Id: "Tapestry development" <tapestry-dev.jakarta.apache.org> Reply-To: "Tapestry development" <rhartman@example.com> Delivered-To: mailing list rhartman@example.com Received: (qmail 30245 invoked by uid 99); 1 Aug 2005 23:48:50 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO ajax.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Aug 2005 16:48:39 -0700 Received: from ajax.apache.org (ajax.apache.org [83.161.120.155]) by ajax.apache.org (Postfix) with ESMTP id 04AF7E3 for <rhartman@example.com>; Tue, 2 Aug 2005 01:48:36 +0200 (CEST) Message-ID: <rhartman@example.com> Date: Tue, 2 Aug 2005 01:48:36 +0200 (CEST) From: "Howard M. Lewis Ship (JIRA)" <rhartman@example.com> To: rhartman@example.com Subject: [jira] Updated: (TAPESTRY-413) Allow access to component message catalog from validators: binding string In-Reply-To: <rhartman@example.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/TAPESTRY-413?page=all ] Howard M. Lewis Ship updated TAPESTRY-413: ------------------------------------------ Summary: Allow access to component message catalog from validators: binding string (was: Simple change of standard validator messages) type: Improvement (was: Wish) Description: It seems the new 'validators' is deprecating the old one. The new Validator format is very comfortable and easy to use and extend. However if one wishes to use one of the standard validators with a custom message, it requires one to abandon the elegant way validators are defined and create a List of beans "manually". It would be nice if one could integrate a custom message in the existing format. Suggestions: validators="minLength('hey, to short...')=5,... or "minLength(field.password.to-short)=5,... or "minLength(ognl:.../message:...)=5,... or use a syntax that reference a bean instead of a validator: validators="required,(myMinLength),..." was: It seems the new 'validators' is deprecating the old one. The new Validator format is very comfortable and easy to use and extend. However if one wishes to use one of the standard validators with a custom message, it requires one to abandon the elegant way validators are defined and create a List of beans "manually". It would be nice if one could integrate a custom message in the existing format. Suggestions: validators="minLength('hey, to short...')=5,... or "minLength(field.password.to-short)=5,... or "minLength(ognl:.../message:...)=5,... or use a syntax that reference a bean instead of a validator: validators="required,(myMinLength),..." Version: 4.0 Assign To: Howard M. Lewis Ship My thought was to borrow from Eclipse syntax, i.e. validators:required[%user-id-required] To reference the user-id-required property of the catalog. > Allow access to component message catalog from validators: binding string > ------------------------------------------------------------------------- > > Key: TAPESTRY-413 > URL: http://issues.apache.org/jira/browse/TAPESTRY-413 > Project: Tapestry > Type: Improvement > Versions: 4.0 > Reporter: Ron Piterman > Assignee: Howard M. Lewis Ship > > It seems the new 'validators' is deprecating the old one. > The new Validator format is very comfortable and easy to use and extend. > However if one wishes to use one of the standard validators with a custom message, it requires one to abandon the elegant way validators are defined and create a List of beans "manually". > It would be nice if one could integrate a custom message in the existing format. > Suggestions: > validators="minLength('hey, to short...')=5,... > or "minLength(field.password.to-short)=5,... > or "minLength(ognl:.../message:...)=5,... > or use a syntax that reference a bean instead of a validator: > validators="required,(myMinLength),..." -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: rhartman@example.com For additional commands, e-mail: rhartman@example.com From tapestry-dev-returnrhartman@example.com Tue Aug 02 09:57:08 2005 Return-Path: <tapestry-dev-returnrhartman@example.com> Delivered-To: rhartman@example.com Received: (qmail 97466 invoked from network); 2 Aug 2005 09:57:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Aug 2005 09:57:07 -0000 Received: (qmail 22883 invoked by uid 500); 2 Aug 2005 09:56:52 -0000 Delivered-To: rhartman@example.com Received: (qmail 22645 invoked by uid 500); 2 Aug 2005 09:56:51 -0000 Mailing-List: contact rhartman@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:rhartman@example.com> List-Help: <mailto:rhartman@example.com> List-Post: <mailto:rhartman@example.com> List-Id: "Tapestry development" <tapestry-dev.jakarta.apache.org> Reply-To: "Tapestry development" <rhartman@example.com> Delivered-To: mailing list rhartman@example.com Received: (qmail 22580 invoked by uid 99); 2 Aug 2005 09:56:50 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO ajax.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2005 02:56:38 -0700 Received: from ajax.apache.org (ajax.apache.org [83.161.120.155]) by ajax.apache.org (Postfix) with ESMTP id 2D30FE0 for <rhartman@example.com>; Tue, 2 Aug 2005 11:56:35 +0200 (CEST) Message-ID: <rhartman@example.com> Date: Tue, 2 Aug 2005 11:56:35 +0200 (CEST) From: "Raphael Jean (JIRA)" <rhartman@example.com> To: rhartman@example.com Subject: [jira] Created: (TAPESTRY-519) NestedMarkupWriterImpl doesn't close the current open tag when getBuffer() is called Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N NestedMarkupWriterImpl doesn't close the current open tag when getBuffer() is called ------------------------------------------------------------------------------------ Key: TAPESTRY-519 URL: http://issues.apache.org/jira/browse/TAPESTRY-519 Project: Tapestry Type: Bug Components: Framework Versions: 4.0 Reporter: Raphael Jean NestedMarkupWriterImpl doesn't close the currently open tag when getBuffer() is called. This causes invalid HTML to be produced in FormSupport.preRenderField(). For example, an Upload component will be rendered as <input type="file" name="upload" id="upload" This could be fixed by moving part of the close() method into getBuffer(): public String getBuffer() { if (_closed) throw new IllegalStateException(MarkupMessages.closeOnce()); _closed = true; super.close(); return _charArrayWriter.toString(); } public void close() { String content = getBuffer(); _parent.printRaw(content); } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: rhartman@example.com For additional commands, e-mail: rhartman@example.com From tapestry-dev-returnrhartman@example.com Tue Aug 02 10:18:55 2005 Return-Path: <tapestry-dev-returnrhartman@example.com> Delivered-To: rhartman@example.com Received: (qmail 6315 invoked from network); 2 Aug 2005 10:18:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Aug 2005 10:18:54 -0000 Received: (qmail 50917 invoked by uid 500); 2 Aug 2005 10:18:51 -0000 Delivered-To: rhartman@example.com Received: (qmail 50895 invoked by uid 500); 2 Aug 2005 10:18:50 -0000 Mailing-List: contact rhartman@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:rhartman@example.com> List-Help: <mailto:rhartman@example.com> List-Post: <mailto:rhartman@example.com> List-Id: "Tapestry development" <tapestry-dev.jakarta.apache.org> Reply-To: "Tapestry development" <rhartman@example.com> Delivered-To: mailing list rhartman@example.com Received: (qmail 50877 invoked by uid 99); 2 Aug 2005 10:18:50 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO ajax.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2005 03:18:38 -0700 Received: from ajax.apache.org (ajax.apache.org [83.161.120.155]) by ajax.apache.org (Postfix) with ESMTP id CD18CE2 for <rhartman@example.com>; Tue, 2 Aug 2005 12:18:35 +0200 (CEST) Message-ID: <rhartman@example.com> Date: Tue, 2 Aug 2005 12:18:35 +0200 (CEST) From: "Dave Syer (JIRA)" <rhartman@example.com> To: rhartman@example.com Subject: [jira] Created: (TAPESTRY-520) Button component fails because it does not implement rewindFormComponent Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Button component fails because it does not implement rewindFormComponent ------------------------------------------------------------------------ Key: TAPESTRY-520 URL: http://issues.apache.org/jira/browse/TAPESTRY-520 Project: Tapestry Type: Bug Components: Framework Versions: 4.0 Reporter: Dave Syer Button component fails because it does not implement rewindFormComponent. In html template: <input jwcid="Start@Button" class="button" label="submit" /> Error log: Error at classpath:/org/apache/tapestry/form/Button.jwc, line 22, column 66: Method 'protected abstract void org.apache.tapestry.form.AbstractFormComponent.rewindFormComponent(org.apache.tapestry.IMarkupWriter,org.apache.tapestry.IRequestCycle)' (declared in class org.apache.tapestry.form.AbstractFormComponent) has no implementation in class org.apache.tapestry.form.Button (or enhanced subclass $Button_201). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: rhartman@example.com For additional commands, e-mail: rhartman@example.com From tapestry-dev-returnrhartman@example.com Tue Aug 02 11:22:25 2005 Return-Path: <tapestry-dev-returnrhartman@example.com> Delivered-To: rhartman@example.com Received: (qmail 32945 invoked from network); 2 Aug 2005 11:22:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Aug 2005 11:22:24 -0000 Received: (qmail 26374 invoked by uid 500); 2 Aug 2005 11:22:00 -0000 Delivered-To: rhartman@example.com Received: (qmail 25636 invoked by uid 500); 2 Aug 2005 11:21:55 -0000 Mailing-List: contact rhartman@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:rhartman@example.com> List-Help: <mailto:rhartman@example.com> List-Post: <mailto:rhartman@example.com> List-Id: "Tapestry development" <tapestry-dev.jakarta.apache.org> Reply-To: "Tapestry development" <rhartman@example.com> Delivered-To: mailing list rhartman@example.com Received: (qmail 25269 invoked by uid 99); 2 Aug 2005 11:21:51 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO ajax.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2005 04:21:39 -0700 Received: from ajax.apache.org (ajax.apache.org [83.161.120.155]) by ajax.apache.org (Postfix) with ESMTP id 54D5DE1 for <rhartman@example.com>; Tue, 2 Aug 2005 13:21:36 +0200 (CEST) Message-ID: <rhartman@example.com> Date: Tue, 2 Aug 2005 13:21:36 +0200 (CEST) From: "Dave Syer (JIRA)" <rhartman@example.com> To: rhartman@example.com Subject: [jira] Created: (TAPESTRY-521) Button component creates invalid element (doesn't close tag properly) Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Button component creates invalid element (doesn't close tag properly) --------------------------------------------------------------------- Key: TAPESTRY-521 URL: http://issues.apache.org/jira/browse/TAPESTRY-521 Project: Tapestry Type: Bug Components: Framework Versions: 4.0 Reporter: Dave Syer Button component creates invalid element (doesn't close tag properly). E.g. this <input jwcid="Start@Button" class="button" label="submit" onClick="document.form.submit()"/> produces this in the generated HTML: <button type="button" name="Start" id="Start" onClick="document.form.submit()" class="button"/>submit> (Note the extraneous ">" and the fact that the intended label is actually outside the button element.) The fix is probably easy. I have tried just changing the renderer to use writer.begin() and writer.end() instead of writer.beginEmpty() and writer.closeTag(). This seems to work. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: rhartman@example.com For additional commands, e-mail: rhartman@example.com From tapestry-dev-returnrhartman@example.com Tue Aug 02 14:01:12 2005 Return-Path: <tapestry-dev-returnrhartman@example.com> Delivered-To: rhartman@example.com Received: (qmail 2696 invoked from network); 2 Aug 2005 14:01:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Aug 2005 14:01:12 -0000 Received: (qmail 97902 invoked by uid 500); 2 Aug 2005 14:01:08 -0000 Delivered-To: rhartman@example.com Received: (qmail 97817 invoked by uid 500); 2 Aug 2005 14:01:07 -0000 Mailing-List: contact rhartman@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:rhartman@example.com> List-Help: <mailto:rhartman@example.com> List-Post: <mailto:rhartman@example.com> List-Id: "Tapestry development" <tapestry-dev.jakarta.apache.org> Reply-To: "Tapestry development" <rhartman@example.com> Delivered-To: mailing list rhartman@example.com Received: (qmail 97736 invoked by uid 99); 2 Aug 2005 14:01:06 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2005 07:01:06 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of rhartman@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO wproxy.gmail.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2005 07:00:57 -0700 Received: by wproxy.gmail.com with SMTP id 58so609945wri for <rhartman@example.com>; Tue, 02 Aug 2005 07:01:04 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=ML+nyzSeo0DAIwVmL++WS9K4jPlZjntzQ/SekvPtSEPRhZpMqWaipIfGu7/HvOIBR5vq3d3QzkAkumMG2NZYNitWqVNxak/C19DtBm00YZk4aOLFWfdlWjIpmN6LfQrM+x937Juk7SbAYuMrrw/l5+mhjyFdqhldbQagVoNGJTY= Received: by 83.161.120.155 with SMTP id h32mr3777319wrh; Tue, 02 Aug 2005 07:01:03 -0700 (PDT) Received: by 83.161.120.155 with HTTP; Tue, 2 Aug 2005 07:01:03 -0700 (PDT) Message-ID: <rhartman@example.com> Date: Tue, 2 Aug 2005 10:01:03 -0400 From: Jesse Kuhnert <rhartman@example.com> Reply-To: Jesse Kuhnert <rhartman@example.com> To: rhartman@example.com, rhartman@example.com Subject: Replace Response/Outputstream Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Does anyone know of an easy way to inject/replace or somehow muck around with the Response pipeline configuration of tapestry in such a way that one could replace the existing OutputStream with something else, like say an AJAX response? While the current method being used to do this works, it's less than ideal and transparent from a component development perspective. The particulars of my request have to do with responding to a direct service call from within tapestry. I'm not trying to go so far as to make any component be able to transparently participate in something like this smartly, it would be enough if components developed for this task specifically wouldn't have to lookup the correct OutputStream to use depending on the type of response. jesse --------------------------------------------------------------------- To unsubscribe, e-mail: rhartman@example.com For additional commands, e-mail: rhartman@example.com From tapestry-dev-returnrhartman@example.com Tue Aug 02 14:04:59 2005 Return-Path: <tapestry-dev-returnrhartman@example.com> Delivered-To: rhartman@example.com Received: (qmail 4944 invoked from network); 2 Aug 2005 14:04:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Aug 2005 14:04:59 -0000 Received: (qmail 10640 invoked by uid 500); 2 Aug 2005 14:04:54 -0000 Delivered-To: rhartman@example.com Received: (qmail 10546 invoked by uid 500); 2 Aug 2005 14:04:54 -0000 Mailing-List: contact rhartman@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:rhartman@example.com> List-Help: <mailto:rhartman@example.com> List-Post: <mailto:rhartman@example.com> List-Id: "Tapestry development" <tapestry-dev.jakarta.apache.org> Reply-To: "Tapestry development" <rhartman@example.com> Delivered-To: mailing list rhartman@example.com Received: (qmail 10460 invoked by uid 99); 2 Aug 2005 14:04:53 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO ajax.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2005 07:04:40 -0700 Received: from ajax.apache.org (ajax.apache.org [83.161.120.155]) by ajax.apache.org (Postfix) with ESMTP id 640ABE5 for <rhartman@example.com>; Tue, 2 Aug 2005 16:04:37 +0200 (CEST) Message-ID: <rhartman@example.com> Date: Tue, 2 Aug 2005 16:04:37 +0200 (CEST) From: "Raphael Jean (JIRA)" <rhartman@example.com> To: rhartman@example.com Subject: [jira] Created: (TAPESTRY-522) LinkSubmit component registers for focus but can't receive it Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N LinkSubmit component registers for focus but can't receive it ------------------------------------------------------------- Key: TAPESTRY-522 URL: http://issues.apache.org/jira/browse/TAPESTRY-522 Project: Tapestry Type: Bug Components: Framework Versions: 4.0 Reporter: Raphael Jean The LinkSubmit component registers for focus during render, like all AbstractFormComponent's by default. The client-side javascript generated looks like: focus(document.$Form$0.$LinkSubmit); This is invalid since the LinkSubmit component is implemented with an <A> tag, which is not an HTML form control. A quick and dirty fix is to override the renderComponent() method in LinkSubmit and omit the calls to registerForFocus(): protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle) { IForm form = TapestryUtils.getForm(cycle, this); setForm(form); if (form.wasPrerendered(writer, this)) return; IValidationDelegate delegate = form.getDelegate(); delegate.setFormComponent(this); setName(form); if (form.isRewinding()) { if (!isDisabled()) { rewindFormComponent(writer, cycle); } } else if (!cycle.isRewinding()) { renderFormComponent(writer, cycle); } } This leads to code duplication... A cleaner solution would be to add a method in AbstractFormComponent: public abstract boolean wantsFocus() { return true; // Wants focus by default } which could be overridden in subclasses for components that do not want focus. This method would be called in renderComponent() to check if the component wants focus or not. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: rhartman@example.com For additional commands, e-mail: rhartman@example.com From tapestry-dev-returnrhartman@example.com Tue Aug 02 14:59:58 2005 Return-Path: <tapestry-dev-returnrhartman@example.com> Delivered-To: rhartman@example.com Received: (qmail 23894 invoked from network); 2 Aug 2005 14:59:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Aug 2005 14:59:57 -0000 Received: (qmail 98910 invoked by uid 500); 2 Aug 2005 14:59:55 -0000 Delivered-To: rhartman@example.com Received: (qmail 98894 invoked by uid 500); 2 Aug 2005 14:59:54 -0000 Mailing-List: contact rhartman@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:rhartman@example.com> List-Help: <mailto:rhartman@example.com> List-Post: <mailto:rhartman@example.com> List-Id: "Tapestry development" <tapestry-dev.jakarta.apache.org> Reply-To: "Tapestry development" <rhartman@example.com> Delivered-To: mailing list rhartman@example.com Received: (qmail 98881 invoked by uid 500); 2 Aug 2005 14:59:54 -0000 Received: (qmail 98878 invoked by uid 99); 2 Aug 2005 14:59:54 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 02 Aug 2005 07:59:43 -0700 Received: (qmail 23663 invoked by uid 1616); 2 Aug 2005 14:59:41 -0000 Date: 2 Aug 2005 14:59:41 -0000 Message-ID: <rhartman@example.com> From: rhartman@example.com To: rhartman@example.com Subject: cvs commit: jakarta-tapestry/framework/src/java/org/apache/tapestry/form FormComponentContributorContextImpl.java ValidationMessagesImpl.java ValidatableFieldSupportImpl.java X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N hlship 2005/08/02 07:59:41 Modified: . status.xml framework/src/test/org/apache/tapestry/form TestValidationMessages.java TestValidatableFieldSupportImpl.java framework/src/java/org/apache/tapestry/form FormComponentContributorContextImpl.java ValidationMessagesImpl.java ValidatableFieldSupportImpl.java Log: TAPESTRY-413: Allow access to component message catalog from validators: binding string Revision Changes Path 1.181 +1 -0 jakarta-tapestry/status.xml Index: status.xml =================================================================== RCS file: /home/cvs/jakarta-tapestry/status.xml,v retrieving revision 1.180 retrieving revision 1.181 diff -u -r1.180 -r1.181 --- status.xml 30 Jul 2005 12:39:16 -0000 1.180 +++ status.xml 2 Aug 2005 14:59:41 -0000 1.181 @@ -60,6 +60,7 @@ <action type="update" dev="HLS">Remove default-binding attribute from &lt;parameter&gt; element</action> <action type="fix" dev="HLS" fixes-bug="TAPESTRY-515">Deprecate out-of-date contrib components</action> <action type="fix" dev="HLS" fixes-bug="TAPESTRY-481">Enhancement Workers that create read-only properties should flag setter methods as an error</action> + <action type="fix" dev="HLS" fixes-bug="TAPESTRY-413">Allow access to component message catalog from validators: binding string</action> </release> <release version="4.0-beta-3" date="Jul 22 2005"> <action type="fix" dev="HLS" fixes-bug="TAPESTRY-398" due-to="Jonas Maurus">HiveMind configuration error breaks the useage of the state: binding prefix</action> 1.2 +78 -3 jakarta-tapestry/framework/src/test/org/apache/tapestry/form/TestValidationMessages.java Index: TestValidationMessages.java =================================================================== RCS file: /home/cvs/jakarta-tapestry/framework/src/test/org/apache/tapestry/form/TestValidationMessages.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- TestValidationMessages.java 18 Jun 2005 12:54:39 -0000 1.1 +++ TestValidationMessages.java 2 Aug 2005 14:59:41 -0000 1.2 @@ -16,8 +16,11 @@ import java.util.Locale; +import org.apache.hivemind.Messages; import org.apache.hivemind.test.HiveMindTestCase; +import org.apache.tapestry.IComponent; import org.apache.tapestry.valid.ValidationStrings; +import org.easymock.MockControl; /** * Tests for {@link org.apache.tapestry.form.ValidationMessagesImpl}. @@ -27,9 +30,18 @@ */ public class TestValidationMessages extends HiveMindTestCase { + private IFormComponent newField() + { + return (IFormComponent) newMock(IFormComponent.class); + } + public void testMessageOverrideNull() { - ValidationMessages m = new ValidationMessagesImpl(Locale.ENGLISH); + IFormComponent field = newField(); + + ValidationMessages m = new ValidationMessagesImpl(field, Locale.ENGLISH); + + replayControls(); assertEquals("You must enter a value for My Field.", m.formatValidationMessage( null, @@ -37,24 +49,87 @@ new Object[] { "My Field" })); - m = new ValidationMessagesImpl(new Locale("es")); + m = new ValidationMessagesImpl(field, new Locale("es")); assertEquals("Tiene que ingresar un valor para My Field.", m.formatValidationMessage( null, ValidationStrings.REQUIRED_TEXT_FIELD, new Object[] { "My Field" })); + + verifyControls(); } public void testMessageOverride() { - ValidationMessages m = new ValidationMessagesImpl(Locale.ENGLISH); + IFormComponent field = newField(); + + ValidationMessages m = new ValidationMessagesImpl(field, Locale.ENGLISH); + + replayControls(); assertEquals("Gimme data for My Field.", m.formatValidationMessage( "Gimme data for {0}.", ValidationStrings.REQUIRED_TEXT_FIELD, new Object[] { "My Field" })); + + verifyControls(); + } + + /** + * Test the use of the '%key' construct as the message. + */ + + public void testMessageOverrideAsReference() + { + Messages messages = newMessage("myfield-required", "Yo Dawg! Gimme a piece of {0}."); + IComponent container = newComponent(messages); + IFormComponent field = newField(container); + + ValidationMessages m = new ValidationMessagesImpl(field, Locale.ENGLISH); + + replayControls(); + + assertEquals("Yo Dawg! Gimme a piece of My Field.", m.formatValidationMessage( + "%myfield-required", + ValidationStrings.REQUIRED_TEXT_FIELD, + new Object[] + { "My Field" })); + + verifyControls(); } + private IFormComponent newField(IComponent container) + { + MockControl control = newControl(IFormComponent.class); + IFormComponent field = (IFormComponent) control.getMock(); + + field.getContainer(); + control.setReturnValue(container); + + return field; + } + + private IComponent newComponent(Messages messages) + { + MockControl control = newControl(IComponent.class); + IComponent component = (IComponent) control.getMock(); + + component.getMessages(); + control.setReturnValue(messages); + + return component; + } + + private Messages newMessage(String key, String message) + { + MockControl control = newControl(Messages.class); + Messages messages = (Messages) control.getMock(); + + messages.getMessage(key); + control.setReturnValue(message); + + return messages; + } } 1.5 +18 -18 jakarta-tapestry/framework/src/test/org/apache/tapestry/form/TestValidatableFieldSupportImpl.java Index: TestValidatableFieldSupportImpl.java =================================================================== RCS file: /home/cvs/jakarta-tapestry/framework/src/test/org/apache/tapestry/form/TestValidatableFieldSupportImpl.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- TestValidatableFieldSupportImpl.java 18 Jun 2005 18:09:13 -0000 1.4 +++ TestValidatableFieldSupportImpl.java 2 Aug 2005 14:59:41 -0000 1.5 @@ -274,11 +274,8 @@ _component.getTranslator(); _componentControl.setReturnValue(_translator); - _translator.renderContribution( - _writer, - cycle, - new FormComponentContributorContextImpl(), - _component); + _translator.renderContribution(_writer, cycle, new FormComponentContributorContextImpl( + _component), _component); _translatorControl.setMatcher(new AggregateArgumentsMatcher(new ArgumentMatcher[] { null, null, new TypeMatcher(), null })); @@ -354,11 +351,8 @@ _component.getTranslator(); _componentControl.setReturnValue(_translator); - _translator.renderContribution( - _writer, - cycle, - new FormComponentContributorContextImpl(), - _component); + _translator.renderContribution(_writer, cycle, new FormComponentContributorContextImpl( + _component), _component); _translatorControl.setMatcher(new AggregateArgumentsMatcher(new ArgumentMatcher[] { null, null, new TypeMatcher(), null })); @@ -368,11 +362,8 @@ _valueConverter.coerceValue(_validator, Iterator.class); _valueConverterControl.setReturnValue(Collections.singletonList(_validator).iterator()); - _validator.renderContribution( - _writer, - cycle, - new FormComponentContributorContextImpl(), - _component); + _validator.renderContribution(_writer, cycle, new FormComponentContributorContextImpl( + _component), _component); _validatorControl.setMatcher(new AggregateArgumentsMatcher(new ArgumentMatcher[] { null, null, new TypeMatcher(), null })); replay(); @@ -472,7 +463,10 @@ _valueConverter.coerceValue(_validator, Iterator.class); _valueConverterControl.setReturnValue(Collections.singletonList(_validator).iterator()); - _validator.validate(_component, new ValidationMessagesImpl(Locale.ENGLISH), object); + _validator.validate( + _component, + new ValidationMessagesImpl(_component, Locale.ENGLISH), + object); _validatorControl.setMatcher(new AggregateArgumentsMatcher(new ArgumentMatcher[] { null, new TypeMatcher(), null })); @@ -512,7 +506,10 @@ _validator.getAcceptsNull(); _validatorControl.setReturnValue(true); - _validator.validate(_component, new ValidationMessagesImpl(Locale.ENGLISH), null); + _validator.validate( + _component, + new ValidationMessagesImpl(_component, Locale.ENGLISH), + null); _validatorControl.setMatcher(new AggregateArgumentsMatcher(new ArgumentMatcher[] { null, new TypeMatcher(), null })); @@ -589,7 +586,10 @@ _valueConverter.coerceValue(_validator, Iterator.class); _valueConverterControl.setReturnValue(Collections.singletonList(_validator).iterator()); - _validator.validate(_component, new ValidationMessagesImpl(Locale.ENGLISH), object); + _validator.validate( + _component, + new ValidationMessagesImpl(_component, Locale.ENGLISH), + object); _validatorControl.setMatcher(new AggregateArgumentsMatcher(new ArgumentMatcher[] { null, new TypeMatcher(), null })); _validatorControl.setThrowable(ex); 1.3 +9 -9 jakarta-tapestry/framework/src/java/org/apache/tapestry/form/FormComponentContributorContextImpl.java Index: FormComponentContributorContextImpl.java =================================================================== RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/form/FormComponentContributorContextImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- FormComponentContributorContextImpl.java 21 Jul 2005 13:17:55 -0000 1.2 +++ FormComponentContributorContextImpl.java 2 Aug 2005 14:59:41 -0000 1.3 @@ -49,11 +49,11 @@ * Used for testing. */ - FormComponentContributorContextImpl() + FormComponentContributorContextImpl(IFormComponent field) { - super(Locale.ENGLISH); + super(field, Locale.ENGLISH); - _field = null; + _field = field; _resolver = null; _formDOM = null; _fieldDOM = null; @@ -62,19 +62,19 @@ } public FormComponentContributorContextImpl(Locale locale, IRequestCycle cycle, - IFormComponent component) + IFormComponent field) { - super(locale); + super(field, locale); - _field = component; - _form = component.getForm(); + _field = field; + _form = field.getForm(); _resolver = cycle.getInfrastructure().getClassResolver(); _formDOM = "document." + _form.getName(); - _fieldDOM = _formDOM + "." + component.getName(); + _fieldDOM = _formDOM + "." + field.getName(); - _pageRenderSupport = TapestryUtils.getPageRenderSupport(cycle, component); + _pageRenderSupport = TapestryUtils.getPageRenderSupport(cycle, field); } public String getFieldDOM() 1.2 +23 -5 jakarta-tapestry/framework/src/java/org/apache/tapestry/form/ValidationMessagesImpl.java Index: ValidationMessagesImpl.java =================================================================== RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/form/ValidationMessagesImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ValidationMessagesImpl.java 18 Jun 2005 12:54:39 -0000 1.1 +++ ValidationMessagesImpl.java 2 Aug 2005 14:59:41 -0000 1.2 @@ -30,23 +30,41 @@ */ public class ValidationMessagesImpl implements ValidationMessages { - private Locale _locale; + private final IFormComponent _field; - public ValidationMessagesImpl(Locale locale) + private final Locale _locale; + + public ValidationMessagesImpl(IFormComponent field, Locale locale) { + Defense.notNull(field, "field"); Defense.notNull(locale, "locale"); + _field = field; _locale = locale; } public String formatValidationMessage(String messageOverride, String messageKey, Object[] arguments) { - String message = (messageOverride == null) ? ValidationStrings.getMessagePattern( - messageKey, - _locale) : messageOverride; + String message = extractLocalizedMessage(messageOverride, messageKey); return MessageFormat.format(message, arguments); } + private String extractLocalizedMessage(String messageOverride, String messageKey) + { + if (messageOverride == null) + return ValidationStrings.getMessagePattern(messageKey, _locale); + + if (messageOverride.startsWith("%")) + { + String key = messageOverride.substring(1); + + return _field.getContainer().getMessages().getMessage(key); + } + + // Otherwise, a literal string + + return messageOverride; + } } 1.6 +1 -1 jakarta-tapestry/framework/src/java/org/apache/tapestry/form/ValidatableFieldSupportImpl.java Index: ValidatableFieldSupportImpl.java =================================================================== RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/form/ValidatableFieldSupportImpl.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ValidatableFieldSupportImpl.java 18 Jun 2005 18:09:13 -0000 1.5 +++ ValidatableFieldSupportImpl.java 2 Aug 2005 14:59:41 -0000 1.6 @@ -122,7 +122,7 @@ Iterator validators = getValidatorsIterator(component); - ValidationMessages messages = new ValidationMessagesImpl(_threadLocale.getLocale()); + ValidationMessages messages = new ValidationMessagesImpl(component, _threadLocale.getLocale()); while (validators.hasNext()) { --------------------------------------------------------------------- To unsubscribe, e-mail: rhartman@example.com For additional commands, e-mail: rhartman@example.com From tapestry-dev-returnrhartman@example.com Tue Aug 02 15:10:54 2005 Return-Path: <tapestry-dev-returnrhartman@example.com> Delivered-To: rhartman@example.com Received: (qmail 27991 invoked from network); 2 Aug 2005 15:10:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Aug 2005 15:10:53 -0000 Received: (qmail 25286 invoked by uid 500); 2 Aug 2005 15:10:51 -0000 Delivered-To: rhartman@example.com Received: (qmail 25266 invoked by uid 500); 2 Aug 2005 15:10:51 -0000 Mailing-List: contact rhartman@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:rhartman@example.com> List-Help: <mailto:rhartman@example.com> List-Post: <mailto:rhartman@example.com> List-Id: "Tapestry development" <tapestry-dev.jakarta.apache.org> Reply-To: "Tapestry development" <rhartman@example.com> Delivered-To: mailing list rhartman@example.com Received: (qmail 25252 invoked by uid 99); 2 Aug 2005 15:10:51 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO ajax.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2005 08:10:38 -0700 Received: from ajax.apache.org (ajax.apache.org [83.161.120.155]) by ajax.apache.org (Postfix) with ESMTP id 716B0E2 for <rhartman@example.com>; Tue, 2 Aug 2005 17:10:35 +0200 (CEST) Message-ID: <rhartman@example.com> Date: Tue, 2 Aug 2005 17:10:35 +0200 (CEST) From: "Howard M. Lewis Ship (JIRA)" <rhartman@example.com> To: rhartman@example.com Subject: [jira] Closed: (TAPESTRY-413) Allow access to component message catalog from validators: binding string In-Reply-To: <rhartman@example.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/TAPESTRY-413?page=all ] Howard M. Lewis Ship closed TAPESTRY-413: ----------------------------------------- Fix Version: 4.0 Resolution: Fixed > Allow access to component message catalog from validators: binding string > ------------------------------------------------------------------------- > > Key: TAPESTRY-413 > URL: http://issues.apache.org/jira/browse/TAPESTRY-413 > Project: Tapestry > Type: Improvement > Versions: 4.0 > Reporter: Ron Piterman > Assignee: Howard M. Lewis Ship > Fix For: 4.0 > > It seems the new 'validators' is deprecating the old one. > The new Validator format is very comfortable and easy to use and extend. > However if one wishes to use one of the standard validators with a custom message, it requires one to abandon the elegant way validators are defined and create a List of beans "manually". > It would be nice if one could integrate a custom message in the existing format. > Suggestions: > validators="minLength('hey, to short...')=5,... > or "minLength(field.password.to-short)=5,... > or "minLength(ognl:.../message:...)=5,... > or use a syntax that reference a bean instead of a validator: > validators="required,(myMinLength),..." -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: rhartman@example.com For additional commands, e-mail: rhartman@example.com From tapestry-dev-returnrhartman@example.com Tue Aug 02 16:43:05 2005 Return-Path: <tapestry-dev-returnrhartman@example.com> Delivered-To: rhartman@example.com Received: (qmail 24610 invoked from network); 2 Aug 2005 16:43:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Aug 2005 16:43:05 -0000 Received: (qmail 46405 invoked by uid 500); 2 Aug 2005 16:43:03 -0000 Delivered-To: rhartman@example.com Received: (qmail 46385 invoked by uid 500); 2 Aug 2005 16:43:03 -0000 Mailing-List: contact rhartman@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:rhartman@example.com> List-Help: <mailto:rhartman@example.com> List-Post: <mailto:rhartman@example.com> List-Id: "Tapestry development" <tapestry-dev.jakarta.apache.org> Reply-To: "Tapestry development" <rhartman@example.com> Delivered-To: mailing list rhartman@example.com Received: (qmail 46372 invoked by uid 500); 2 Aug 2005 16:43:03 -0000 Received: (qmail 46369 invoked by uid 99); 2 Aug 2005 16:43:02 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 02 Aug 2005 09:42:51 -0700 Received: (qmail 24504 invoked by uid 1920); 2 Aug 2005 16:42:49 -0000 Date: 2 Aug 2005 16:42:49 -0000 Message-ID: <rhartman@example.com> From: rhartman@example.com To: rhartman@example.com Subject: cvs commit: jakarta-tapestry/framework/src/java/org/apache/tapestry/form Button.java Button.jwc X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N pferraro 2005/08/02 09:42:49 Modified: framework/src/java/org/apache/tapestry/form Button.java Button.jwc Added: framework/src/test/org/apache/tapestry/form TestButton.java Log: Fixes Tapestry-520 and 521 Deprecated label parameter Revision Changes Path 1.1 jakarta-tapestry/framework/src/test/org/apache/tapestry/form/TestButton.java Index: TestButton.java =================================================================== // Copyright 2005 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry.form; import org.apache.tapestry.IBinding; import org.apache.tapestry.IMarkupWriter; import org.apache.tapestry.IRequestCycle; import org.apache.tapestry.components.BaseComponentTestCase; import org.apache.tapestry.spec.ComponentSpecification; public class TestButton extends BaseComponentTestCase { public void testRender() { Button b = (Button) newInstance(Button.class, new Object[] { "name", "assignedName" }); IMarkupWriter writer = newBufferWriter(); IRequestCycle cycle = newCycle(); replayControls(); b.renderFormComponent(writer, cycle); verifyControls(); assertBuffer("<button type=\"button\" name=\"assignedName\"></button>"); } public void testRenderLabel() { Button b = (Button) newInstance(Button.class, new Object[] { "name", "assignedName", "label", "Label" }); IMarkupWriter writer = newBufferWriter(); IRequestCycle cycle = newCycle(); replayControls(); b.renderFormComponent(writer, cycle); verifyControls(); assertBuffer("<button type=\"button\" name=\"assignedName\">Label</button>"); } public void testRenderInformalParameters() { Button b = (Button) newInstance(Button.class, new Object[] { "name", "assignedName", "specification", new ComponentSpecification() }); IMarkupWriter writer = newBufferWriter(); IRequestCycle cycle = newCycle(); IBinding binding = newBinding("informal-value"); b.setBinding("informal", binding); replayControls(); b.renderFormComponent(writer, cycle); verifyControls(); assertBuffer("<button type=\"button\" name=\"assignedName\" informal=\"informal-value\"></button>"); } public void testRenderWithId() { Button b = (Button) newInstance(Button.class, new Object[] { "idParameter", "foo", "name", "assignedName" }); IMarkupWriter writer = newBufferWriter(); IRequestCycle cycle =
{'source': 'Apache Software Foundation Public Mail Archives'}