You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by D&J Gredler <dj...@gmail.com> on 2006/11/07 15:14:33 UTC

Re: form component names

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 <dj...@gmail.com> 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
>

Re: form component names

Posted by D&J Gredler <dj...@gmail.com>.
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 <an...@di.uoa.gr> 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 < andyhot@di.uoa.gr> 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 <an...@di.uoa.gr> 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="foo@TextField"
> >> >> 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 <ro...@scazdl.org> 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="foo@TextField " ... />
> >> >> >> </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 < djgredler@gmail.com> 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: dev-unsubscribe@tapestry.apache.org
> >> >> >> For additional commands, e-mail: dev-help@tapestry.apache.org
> >> >> >>
> >> >> >>
> >> >> >
> >> >>
> >> >>
> >> >> --
> >> >> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
> >> >> Tapestry / Tacos developer
> >> >> Open Source / J2EE Consulting
> >> >>
> >> >>
> >> >>
> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> >> >> For additional commands, e-mail: dev-help@tapestry.apache.org
> >> >>
> >> >>
> >> >
> >>
> >>
> >> --
> >> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
> >> Tapestry / Tacos developer
> >> Open Source / J2EE Consulting
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: dev-help@tapestry.apache.org
> >>
> >>
> >
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>

Re: form component names

Posted by andyhot <an...@di.uoa.gr>.
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 <an...@di.uoa.gr> 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 <an...@di.uoa.gr> 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="foo@TextField"
>> >> 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 <ro...@scazdl.org> 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="foo@TextField" ... />
>> >> >> </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 <dj...@gmail.com> 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: dev-unsubscribe@tapestry.apache.org
>> >> >> For additional commands, e-mail: dev-help@tapestry.apache.org
>> >> >>
>> >> >>
>> >> >
>> >>
>> >>
>> >> --
>> >> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
>> >> Tapestry / Tacos developer
>> >> Open Source / J2EE Consulting
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>> >> For additional commands, e-mail: dev-help@tapestry.apache.org
>> >>
>> >>
>> >
>>
>>
>> -- 
>> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
>> Tapestry / Tacos developer
>> Open Source / J2EE Consulting
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>
>>
>


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: form component names

Posted by D&J Gredler <dj...@gmail.com>.
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?

On 11/7/06, andyhot <an...@di.uoa.gr> 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 <an...@di.uoa.gr> 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="foo@TextField"
> >> 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 <ro...@scazdl.org> 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="foo@TextField" ... />
> >> >> </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 <dj...@gmail.com> 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: dev-unsubscribe@tapestry.apache.org
> >> >> For additional commands, e-mail: dev-help@tapestry.apache.org
> >> >>
> >> >>
> >> >
> >>
> >>
> >> --
> >> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
> >> Tapestry / Tacos developer
> >> Open Source / J2EE Consulting
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: dev-help@tapestry.apache.org
> >>
> >>
> >
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>

Re: form component names

Posted by andyhot <an...@di.uoa.gr>.
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 <an...@di.uoa.gr> 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="foo@TextField"
>> 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 <ro...@scazdl.org> 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="foo@TextField" ... />
>> >> </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 <dj...@gmail.com> 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: dev-unsubscribe@tapestry.apache.org
>> >> For additional commands, e-mail: dev-help@tapestry.apache.org
>> >>
>> >>
>> >
>>
>>
>> -- 
>> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
>> Tapestry / Tacos developer
>> Open Source / J2EE Consulting
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>
>>
>


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: form component names

Posted by D&J Gredler <dj...@gmail.com>.
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.

On 11/7/06, andyhot <an...@di.uoa.gr> 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="foo@TextField"
> 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 <ro...@scazdl.org> 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="foo@TextField" ... />
> >> </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 <dj...@gmail.com> 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: dev-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: dev-help@tapestry.apache.org
> >>
> >>
> >
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>

Re: form component names

Posted by andyhot <an...@di.uoa.gr>.
Why don't you set the id then... the name (as you found out) is derived
from it...
So use:
<input type="text" jwcid="foo@TextField"
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 <ro...@scazdl.org> 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="foo@TextField" ... />
>> </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 <dj...@gmail.com> 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: dev-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>
>>
>


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: form component names

Posted by D&J Gredler <dj...@gmail.com>.
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 <ro...@scazdl.org> 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="foo@TextField" ... />
> </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 <dj...@gmail.com> 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: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>

Re: form component names

Posted by Robert Zeigler <ro...@scazdl.org>.
"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="foo@TextField" ... />
</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 <dj...@gmail.com> 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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org