I was talking about making the change in 4.1 since that's where all the newer development is going, but I'm still on the 4.0 series. I made a quick test app using 4.1 and it does indeed work as you've described. Thanks for clearing that up for me, and sorry for the confusion!
On 11/7/06, andyhot <[EMAIL PROTECTED]> wrote:
D&J Gredler wrote: > I've tried it in version 4.0.2 and it exhibits the behavior I > described... I > guess this is one of the things that have changed in 4.1? Yea, thought you were talking about 4.1, weren't you? The jwcid is still used but if the user specifies an id parameter, it acts like an override (and used as a basis to create the unique values). > > On 11/7/06, andyhot < [EMAIL PROTECTED]> wrote: >> >> D&J Gredler wrote: >> > Unless I've overlooked something, I believe in this context "id" means >> > the >> > jwcid, not the id binding. I'm reusing components in a loop, so I >> > can't just >> > modify the jwcid each time through the loop. >> > So for your example below, the name would still be foo / foo_0 / >> foo_1 / >> > etc. >> > >> >> No, it will output >> thisWillBeUsedForBothNameAndId" >> thisWillBeUsedForBothNameAndId"_0 >> thisWillBeUsedForBothNameAndId"_1 >> >> try it! >> >> > On 11/7/06, andyhot <[EMAIL PROTECTED]> wrote: >> >> >> >> Why don't you set the id then... the name (as you found out) is >> derived >> >> from it... >> >> So use: >> >> <input type="text" jwcid="[EMAIL PROTECTED]" >> >> id="thisWillBeUsedForBothNameAndId"/> >> >> >> >> D&J Gredler wrote: >> >> > Hi Robert, >> >> > >> >> > In Tap4 you get foo, foo_0, foo_1, etc, but the idea is the same. >> What >> >> > I'm >> >> > suggesting is allowing the user to change the "foo" part, but still >> >> going >> >> > through the IdAllocator steps that ensure unique naming. Most >> likely >> >> this >> >> > would involve removing >> >> > >> >> > reserved-parameter name="name" >> >> > >> >> > from the form component jwc files, replacing them with >> >> > >> >> > parameter name="name" property="nameParameter" >> >> > >> >> > and changing FormSupportImpl#getElementId(IFormComponent) to use >> the >> >> > component's nameParameter property (rather than the id) if it's not >> >> null. >> >> > >> >> > >> >> > On 11/7/06, Robert Zeigler <[EMAIL PROTECTED]> wrote: >> >> >> >> >> >> "Name" is a reserved parameter because all form components output >> >> their >> >> >> own name. Tapestry handles the work of making sure each form >> >> component >> >> >> outputs a unique name. The name will be based on the id of the >> >> >> component. >> >> >> <span jwcid="@for" source="ognl:myList"> >> >> >> <input type="text" jwcid="[EMAIL PROTECTED] " ... /> >> >> >> </span> >> >> >> >> >> >> would render text fields along the lines of (in tap3, at least): >> >> >> <input type="text" name="foo" .../> >> >> >> <input type="text" name="foo$0" .../> >> >> >> <input type="text" name="foo$1" .../> >> >> >> >> >> >> And so forth. Hence, the "name" parameter is reserved. >> >> >> >> >> >> Robert >> >> >> >> >> >> D&J Gredler wrote: >> >> >> > Hmm... no one seems to know. >> >> >> > >> >> >> > Jesse & Andy, how would you feel about a patch to 4.1 that makes >> >> >> "name" >> >> >> an >> >> >> > assignable parameter on all form components? >> >> >> > >> >> >> > >> >> >> > On 10/25/06, D&J Gredler < [EMAIL PROTECTED]> wrote: >> >> >> >> >> >> >> >> Hi, >> >> >> >> >> >> >> >> I'm wondering if someone can give me a quick explanation for >> why >> >> >> >> "name" is >> >> >> >> a reserved parameter for all form components except >> ImageSubmit, >> >> >> which >> >> >> >> contains a quick workaround. >> >> >> >> >> >> >> >> Thanks, >> >> >> >> >> >> >> >> Daniel >> >> >> >> >> >> >> > >> >> >> >> >> >> >> >> >> >> --------------------------------------------------------------------- >> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> >> >> >> > >> >> >> >> >> >> -- >> >> Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr >> >> Tapestry / Tacos developer >> >> Open Source / J2EE Consulting >> >> >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> > >> >> >> -- >> Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr >> Tapestry / Tacos developer >> Open Source / J2EE Consulting >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / J2EE Consulting --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
