You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Poggenpohl, Daniel" <Da...@isst.fraunhofer.de> on 2015/09/07 10:44:00 UTC

Tapestry Forms - Client side ids

Hi,

it seems that the Tapestry Form component is one of the few components that doesn't let me manually set the client side id. Is this correct and why was this done?
Can I do something to set the id?

Regards,
Daniel P.

Re: AW: AW: Tapestry Forms - Client side ids

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Wed, 09 Sep 2015 03:40:34 -0300, Poggenpohl, Daniel  
<Da...@isst.fraunhofer.de> wrote:

> Tapestry 5.3.8 .
>
> Also, maybe the fact that the forms are generated by a loop is important  
> (it probably is).

Checking the sources, yes, the Form component doesn't allow you to provide  
your own HTML id. I don't know why, but I suppose there's a good reason  
for that. Maybe avoiding the possibility of having two forms with the same  
HTML id, but that's just me guessing.

-- 
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


AW: AW: Tapestry Forms - Client side ids

Posted by "Poggenpohl, Daniel" <Da...@isst.fraunhofer.de>.
Tapestry 5.3.8 .

Also, maybe the fact that the forms are generated by a loop is important (it probably is).

Regards,
Daniel P.

-----Ursprüngliche Nachricht-----
Von: Thiago H de Paula Figueiredo [mailto:thiagohp@gmail.com] 
Gesendet: Dienstag, 8. September 2015 17:23
An: Tapestry users
Betreff: Re: AW: Tapestry Forms - Client side ids

What version of Tapestry are you using?

On Tue, 08 Sep 2015 04:23:51 -0300, Poggenpohl, Daniel <Da...@isst.fraunhofer.de> wrote:

> Hi,
>
> Template:
> <t:Form t:id="newCommentForm" id="prop:newCommentFormId"  
> t:context="someId" t:zone="^">
>
> Java:
> public String getNewCommentFormId() {
> 	return "newCommentForm_" + entity.getId(); }
>
> Resulting HTML:
> <Form id="newCommentForm" ....>
>
> Regards,
> Daniel P.
>
> -----Ursprüngliche Nachricht-----
> Von: Thiago H de Paula Figueiredo [mailto:thiagohp@gmail.com]
> Gesendet: Montag, 7. September 2015 22:47
> An: Tapestry users
> Betreff: Re: Tapestry Forms - Client side ids
>
> On Mon, 07 Sep 2015 05:44:00 -0300, Poggenpohl, Daniel 
> <Da...@isst.fraunhofer.de> wrote:
>
>> Hi,
>
> Hi!
>
>> it seems that the Tapestry Form component is one of the few 
>> components that doesn't let me manually set the client side id. Is 
>> this correct and why was this done?
>
> Not exactly. Some ids aren't allowed unchanged because they break 
> JavaScript code.
>
>> Can I do something to set the id?
>
> How are you trying to set it (i.e. template snippet) and what's the 
> resulting generated HTML?
>
> --
> 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


--
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: AW: Tapestry Forms - Client side ids

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
What version of Tapestry are you using?

On Tue, 08 Sep 2015 04:23:51 -0300, Poggenpohl, Daniel  
<Da...@isst.fraunhofer.de> wrote:

> Hi,
>
> Template:
> <t:Form t:id="newCommentForm" id="prop:newCommentFormId"  
> t:context="someId" t:zone="^">
>
> Java:
> public String getNewCommentFormId() {
> 	return "newCommentForm_" + entity.getId();
> }
>
> Resulting HTML:
> <Form id="newCommentForm" ....>
>
> Regards,
> Daniel P.
>
> -----Ursprüngliche Nachricht-----
> Von: Thiago H de Paula Figueiredo [mailto:thiagohp@gmail.com]
> Gesendet: Montag, 7. September 2015 22:47
> An: Tapestry users
> Betreff: Re: Tapestry Forms - Client side ids
>
> On Mon, 07 Sep 2015 05:44:00 -0300, Poggenpohl, Daniel  
> <Da...@isst.fraunhofer.de> wrote:
>
>> Hi,
>
> Hi!
>
>> it seems that the Tapestry Form component is one of the few components
>> that doesn't let me manually set the client side id. Is this correct
>> and why was this done?
>
> Not exactly. Some ids aren't allowed unchanged because they break  
> JavaScript code.
>
>> Can I do something to set the id?
>
> How are you trying to set it (i.e. template snippet) and what's the  
> resulting generated HTML?
>
> --
> 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


-- 
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


AW: Tapestry Forms - Client side ids

Posted by "Poggenpohl, Daniel" <Da...@isst.fraunhofer.de>.
Hi,

Template:
<t:Form t:id="newCommentForm" id="prop:newCommentFormId" t:context="someId" t:zone="^">

Java:
public String getNewCommentFormId() {
	return "newCommentForm_" + entity.getId();
}

Resulting HTML:
<Form id="newCommentForm" ....>

Regards,
Daniel P.

-----Ursprüngliche Nachricht-----
Von: Thiago H de Paula Figueiredo [mailto:thiagohp@gmail.com] 
Gesendet: Montag, 7. September 2015 22:47
An: Tapestry users
Betreff: Re: Tapestry Forms - Client side ids

On Mon, 07 Sep 2015 05:44:00 -0300, Poggenpohl, Daniel <Da...@isst.fraunhofer.de> wrote:

> Hi,

Hi!

> it seems that the Tapestry Form component is one of the few components 
> that doesn't let me manually set the client side id. Is this correct 
> and why was this done?

Not exactly. Some ids aren't allowed unchanged because they break JavaScript code.

> Can I do something to set the id?

How are you trying to set it (i.e. template snippet) and what's the resulting generated HTML?

--
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: Tapestry Forms - Client side ids

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Mon, 07 Sep 2015 05:44:00 -0300, Poggenpohl, Daniel  
<Da...@isst.fraunhofer.de> wrote:

> Hi,

Hi!

> it seems that the Tapestry Form component is one of the few components  
> that doesn't let me manually set the client side id. Is this correct and  
> why was this done?

Not exactly. Some ids aren't allowed unchanged because they break  
JavaScript code.

> Can I do something to set the id?

How are you trying to set it (i.e. template snippet) and what's the  
resulting generated HTML?

-- 
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