You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Muhammad Gelbana <m....@gmail.com> on 2014/08/11 15:09:07 UTC
Components ID generation suggestion
Seems like client-side ID assignment is causing a lot of issues to new
tapestry users including me. AFAIK, the purpose of having Tapestry generate
client-side IDs, is to maintain a healthy application with unique
client\server side IDs.
So I have a suggestion..
Why don't Tapestry allow developers to *optionally* assign client-side IDs
to components before rendering them ? With every iteration in a loop and
with every page render...
If I open a Jira for this suggestion, will there be enough votes for the
developers to consider it ?
*---------------------*
*Muhammad Gelbana*
http://www.linkedin.com/in/mgelbana
Re: Components ID generation suggestion
Posted by Geoff Callender <ge...@gmail.com>.
Here are some examples of handling Zone ids inside Loop:
T5.4:
http://jumpstart.doublenegative.com.au/jumpstart7/examples/ajax/eventlinksinaloop
http://jumpstart.doublenegative.com.au/jumpstart7/examples/ajax/formsinaloop
T5.3:
http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/eventlinksinaloop
http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/formsinaloop
Geoff
Le 12 août 2014 à 23:18, Thiago H de Paula Figueiredo <th...@gmail.com> a écrit :
> On Tue, 12 Aug 2014 09:31:15 -0300, Muhammad Gelbana <m....@gmail.com> wrote:
>
>> Yes I'm talking about the Zone component. But I've set an ID to the zone
>> it's still appended with a suffix to assure uniqueness.
>
> What id? t:id or id? At least in the latest betas Zone does *not* add a suffix when the id parameter is bound.
>
>> Honestly I've spent a lot of time reading the documentations in the past
>> (v5.0.x) but 2 bad things happened since then:
>> 1. I built some wrong concepts about tapestry that are still being
>> cleared up (literally) today !
>> 2. Tapestry changed a lot
>> 3. I didn't re-read the docs and settled only on using it as a reference
>
> 5.0.x were the Tapestry alpha versions, without any promise of backward or forward compatibility at that time.
>
>> But basically let me paraphrase, you are saying that I can display a Zone
>> whether by ajax or within a loop just by assigning it's ID my self ?
>
> If you want to use Zone inside a Zone or a Loop, you should provide your own id.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Components ID generation suggestion
Posted by Muhammad Gelbana <m....@gmail.com>.
Fair enough. Thanks a lot for your replies. I appreciate it.
*---------------------*
*Muhammad Gelbana*
http://www.linkedin.com/in/mgelbana
On Tue, Aug 12, 2014 at 9:10 PM, Thiago H de Paula Figueiredo <
thiagohp@gmail.com> wrote:
> On Tue, 12 Aug 2014 12:54:59 -0300, Muhammad Gelbana <m....@gmail.com>
> wrote:
>
> So which beta has this fix ? :)
>>
>
> Why don't you just pick the last one? :)
>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: Components ID generation suggestion
Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Tue, 12 Aug 2014 12:54:59 -0300, Muhammad Gelbana <m....@gmail.com>
wrote:
> So which beta has this fix ? :)
Why don't you just pick the last one? :)
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Components ID generation suggestion
Posted by Muhammad Gelbana <m....@gmail.com>.
So which beta has this fix ? :)
On Aug 12, 2014 5:50 PM, "Thiago H de Paula Figueiredo" <th...@gmail.com>
wrote:
> On Tue, 12 Aug 2014 11:43:36 -0300, Muhammad Gelbana <m....@gmail.com>
> wrote:
>
>
>>> What id? t:id or id? At least in the latest betas Zone does *not* add a
>>> suffix when the id parameter is bound.
>>>
>>
>>
>> Perfect ! Which beta release does that ? Is this a valid maven repo for
>> the
>> beta versions ?
>> https://repository.apache.org/content/groups/staging/org/
>> apache/tapestry/tapestry-core/
>>
>
> Yep.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: Components ID generation suggestion
Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Tue, 12 Aug 2014 11:43:36 -0300, Muhammad Gelbana <m....@gmail.com>
wrote:
>>
>> What id? t:id or id? At least in the latest betas Zone does *not* add a
>> suffix when the id parameter is bound.
>
>
> Perfect ! Which beta release does that ? Is this a valid maven repo for
> the
> beta versions ?
> https://repository.apache.org/content/groups/staging/org/apache/tapestry/tapestry-core/
Yep.
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Components ID generation suggestion
Posted by Muhammad Gelbana <m....@gmail.com>.
>
> What id? t:id or id? At least in the latest betas Zone does *not* add a
> suffix when the id parameter is bound.
Perfect ! Which beta release does that ? Is this a valid maven repo for the
beta versions ?
https://repository.apache.org/content/groups/staging/org/apache/tapestry/tapestry-core/
*---------------------*
*Muhammad Gelbana*
http://www.linkedin.com/in/mgelbana
On Tue, Aug 12, 2014 at 4:18 PM, Thiago H de Paula Figueiredo <
thiagohp@gmail.com> wrote:
> On Tue, 12 Aug 2014 09:31:15 -0300, Muhammad Gelbana <m....@gmail.com>
> wrote:
>
> Yes I'm talking about the Zone component. But I've set an ID to the zone
>> it's still appended with a suffix to assure uniqueness.
>>
>
> What id? t:id or id? At least in the latest betas Zone does *not* add a
> suffix when the id parameter is bound.
>
> Honestly I've spent a lot of time reading the documentations in the past
>> (v5.0.x) but 2 bad things happened since then:
>> 1. I built some wrong concepts about tapestry that are still being
>>
>> cleared up (literally) today !
>> 2. Tapestry changed a lot
>> 3. I didn't re-read the docs and settled only on using it as a
>> reference
>>
>
> 5.0.x were the Tapestry alpha versions, without any promise of backward or
> forward compatibility at that time.
>
>
> But basically let me paraphrase, you are saying that I can display a Zone
>> whether by ajax or within a loop just by assigning it's ID my self ?
>>
>
> If you want to use Zone inside a Zone or a Loop, you should provide your
> own id.
>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: Components ID generation suggestion
Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Tue, 12 Aug 2014 09:31:15 -0300, Muhammad Gelbana <m....@gmail.com>
wrote:
> Yes I'm talking about the Zone component. But I've set an ID to the zone
> it's still appended with a suffix to assure uniqueness.
What id? t:id or id? At least in the latest betas Zone does *not* add a
suffix when the id parameter is bound.
> Honestly I've spent a lot of time reading the documentations in the past
> (v5.0.x) but 2 bad things happened since then:
> 1. I built some wrong concepts about tapestry that are still being
> cleared up (literally) today !
> 2. Tapestry changed a lot
> 3. I didn't re-read the docs and settled only on using it as a
> reference
5.0.x were the Tapestry alpha versions, without any promise of backward or
forward compatibility at that time.
> But basically let me paraphrase, you are saying that I can display a Zone
> whether by ajax or within a loop just by assigning it's ID my self ?
If you want to use Zone inside a Zone or a Loop, you should provide your
own id.
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Components ID generation suggestion
Posted by Muhammad Gelbana <m....@gmail.com>.
...and there has been some time away from Tapestry, a few months now and
then. But now I'm working on it again and I'm WAAAY behind schedule :(
*---------------------*
*Muhammad Gelbana*
http://www.linkedin.com/in/mgelbana
On Tue, Aug 12, 2014 at 3:31 PM, Muhammad Gelbana <m....@gmail.com>
wrote:
> Yes I'm talking about the Zone component. But I've set an ID to the zone
> it's still appended with a suffix to assure uniqueness. In this specific
> case, the zone was loaded using ajax. I've been checking the code of
> built-in mixins and I believe "RenderClientId" should force the zone to
> render the ID i'm assigning.
>
> Honestly I've spent a lot of time reading the documentations in the past
> (v5.0.x) but 2 bad things happened since then:
>
> 1. I built some wrong concepts about tapestry that are still being
> cleared up (literally) today !
> 2. Tapestry changed a lot
> 3. I didn't re-read the docs and settled only on using it as a
> reference
>
> Sadly am away from my machine and I can't experiment with what I just
> learned today soon enough
>
> But basically let me paraphrase, you are saying that I can display a Zone
> whether by ajax or within a loop just by assigning it's ID my self ?
>
> *---------------------*
> *Muhammad Gelbana*
> http://www.linkedin.com/in/mgelbana
>
>
> On Tue, Aug 12, 2014 at 3:17 PM, Thiago H de Paula Figueiredo <
> thiagohp@gmail.com> wrote:
>
>> On Mon, 11 Aug 2014 10:09:07 -0300, Muhammad Gelbana <m....@gmail.com>
>> wrote:
>>
>> Why don't Tapestry allow developers to *optionally* assign client-side
>>> IDs to components before rendering them ? With every iteration in a loop and
>>> with every page render...
>>>
>>
>> What components are you talking about? Most components, if not all, which
>> have an HTML id autogenerated already have an 'id' or 'clientId' parameter
>> you can use to provide your own id. If there's some component which
>> doesn't, please let us know.
>>
>> Reading documentation sometimes seems like an old, forgotten art . . . :P
>>
>> From your previous thread, you seem to be talking about Zone. Here's the
>> 5.4 version of its JavaDoc: http://tapestry.apache.org/5.
>> 4/apidocs//org/apache/tapestry5/corelib/components/Zone.html. Check the
>> Component Parameters section.
>>
>> Name: id
>> Type: String
>> Description: If bound, then the id attribute of the rendered element will
>> be this exact value. If not bound, then a unique id is generated for the
>> element.
>>
>> --
>> Thiago H. de Paula Figueiredo
>> Tapestry, Java and Hibernate consultant and developer
>> http://machina.com.br
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
Re: Components ID generation suggestion
Posted by Muhammad Gelbana <m....@gmail.com>.
Yes I'm talking about the Zone component. But I've set an ID to the zone
it's still appended with a suffix to assure uniqueness. In this specific
case, the zone was loaded using ajax. I've been checking the code of
built-in mixins and I believe "RenderClientId" should force the zone to
render the ID i'm assigning.
Honestly I've spent a lot of time reading the documentations in the past
(v5.0.x) but 2 bad things happened since then:
1. I built some wrong concepts about tapestry that are still being
cleared up (literally) today !
2. Tapestry changed a lot
3. I didn't re-read the docs and settled only on using it as a reference
Sadly am away from my machine and I can't experiment with what I just
learned today soon enough
But basically let me paraphrase, you are saying that I can display a Zone
whether by ajax or within a loop just by assigning it's ID my self ?
*---------------------*
*Muhammad Gelbana*
http://www.linkedin.com/in/mgelbana
On Tue, Aug 12, 2014 at 3:17 PM, Thiago H de Paula Figueiredo <
thiagohp@gmail.com> wrote:
> On Mon, 11 Aug 2014 10:09:07 -0300, Muhammad Gelbana <m....@gmail.com>
> wrote:
>
> Why don't Tapestry allow developers to *optionally* assign client-side
>> IDs to components before rendering them ? With every iteration in a loop and
>> with every page render...
>>
>
> What components are you talking about? Most components, if not all, which
> have an HTML id autogenerated already have an 'id' or 'clientId' parameter
> you can use to provide your own id. If there's some component which
> doesn't, please let us know.
>
> Reading documentation sometimes seems like an old, forgotten art . . . :P
>
> From your previous thread, you seem to be talking about Zone. Here's the
> 5.4 version of its JavaDoc: http://tapestry.apache.org/5.
> 4/apidocs//org/apache/tapestry5/corelib/components/Zone.html. Check the
> Component Parameters section.
>
> Name: id
> Type: String
> Description: If bound, then the id attribute of the rendered element will
> be this exact value. If not bound, then a unique id is generated for the
> element.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: Components ID generation suggestion
Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Mon, 11 Aug 2014 10:09:07 -0300, Muhammad Gelbana <m....@gmail.com>
wrote:
> Why don't Tapestry allow developers to *optionally* assign client-side
> IDs to components before rendering them ? With every iteration in a loop
> and
> with every page render...
What components are you talking about? Most components, if not all, which
have an HTML id autogenerated already have an 'id' or 'clientId' parameter
you can use to provide your own id. If there's some component which
doesn't, please let us know.
Reading documentation sometimes seems like an old, forgotten art . . . :P
From your previous thread, you seem to be talking about Zone. Here's the
5.4 version of its JavaDoc:
http://tapestry.apache.org/5.4/apidocs//org/apache/tapestry5/corelib/components/Zone.html.
Check the Component Parameters section.
Name: id
Type: String
Description: If bound, then the id attribute of the rendered element will
be this exact value. If not bound, then a unique id is generated for the
element.
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org