Re: binding id to a property (not a liteal)
Hi, Try t:select t:id=tapestry-id t:clientid=client-id .../. You can then refer to the component through its tapestry-id and get its client-id through getClientId(). : ) -Filip Marc A. Donis skrev: Thanks, but when I put: t:select t:id=${prop:selectId} ... / in the template, the generated html then looks like this: select id=${prop:selectId} name=${prop:selectId} Again, I can't seem to prevent it from interpreting the id as a literal string. However, if i put: t:select t:idX=${prop:selectId} ... / in the template, the generated html then looks like this: select id=select idX=id_01 name=select So... it really seems that id is special. This is troublesome, since it is impossible (as far as I can tell) to reference an element in a component from outside of that component. What to do?? - Original Message - From: Christoph Jaeger [EMAIL PROTECTED] To: Tapestry users users@tapestry.apache.org Sent: Thursday, November 01, 2007 19:05 Subject: Re: binding id to a property (not a liteal) Try t:select t:id=${prop:refFieldId} ... Christoph Marc A. Donis wrote: Hi again, I am trying to get a select component to take an id from its component class, rather than having it staticly defined in the tml. It seems, however, that no matter what I try, the id is always interpreted as a literal string. e.g.: t:select t:id=prop:refFieldId ... etc which I would expect to get the id from an accessor named getRefFieldId() in the component class, but instead it generates the id as prop:refFieldId. Is id special in this way? If so, is there some sort of workaround for this? What I want is something like this: t:label t:for=selectField${message:label1}/t:label t:ReferenceDropDown t:selectId=literal:selectField ... etc / and then, ReferenceDropDown.tml: t:select t:id=prop:selectId ... etc / in order to tie the label to the select which is inside my own ReferenceDropDown component. Thoughts? Thanks again, Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: binding id to a property (not a liteal)
Thanks, but when I put: t:select t:id=${prop:selectId} ... / in the template, the generated html then looks like this: select id=${prop:selectId} name=${prop:selectId} Again, I can't seem to prevent it from interpreting the id as a literal string. However, if i put: t:select t:idX=${prop:selectId} ... / in the template, the generated html then looks like this: select id=select idX=id_01 name=select So... it really seems that id is special. This is troublesome, since it is impossible (as far as I can tell) to reference an element in a component from outside of that component. What to do?? - Original Message - From: Christoph Jaeger [EMAIL PROTECTED] To: Tapestry users users@tapestry.apache.org Sent: Thursday, November 01, 2007 19:05 Subject: Re: binding id to a property (not a liteal) Try t:select t:id=${prop:refFieldId} ... Christoph Marc A. Donis wrote: Hi again, I am trying to get a select component to take an id from its component class, rather than having it staticly defined in the tml. It seems, however, that no matter what I try, the id is always interpreted as a literal string. e.g.: t:select t:id=prop:refFieldId ... etc which I would expect to get the id from an accessor named getRefFieldId() in the component class, but instead it generates the id as prop:refFieldId. Is id special in this way? If so, is there some sort of workaround for this? What I want is something like this: t:label t:for=selectField${message:label1}/t:label t:ReferenceDropDown t:selectId=literal:selectField ... etc / and then, ReferenceDropDown.tml: t:select t:id=prop:selectId ... etc / in order to tie the label to the select which is inside my own ReferenceDropDown component. Thoughts? Thanks again, Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
binding id to a property (not a liteal)
Hi again, I am trying to get a select component to take an id from its component class, rather than having it staticly defined in the tml. It seems, however, that no matter what I try, the id is always interpreted as a literal string. e.g.: t:select t:id=prop:refFieldId ... etc which I would expect to get the id from an accessor named getRefFieldId() in the component class, but instead it generates the id as prop:refFieldId. Is id special in this way? If so, is there some sort of workaround for this? What I want is something like this: t:label t:for=selectField${message:label1}/t:label t:ReferenceDropDown t:selectId=literal:selectField ... etc / and then, ReferenceDropDown.tml: t:select t:id=prop:selectId ... etc / in order to tie the label to the select which is inside my own ReferenceDropDown component. Thoughts? Thanks again, Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: binding id to a property (not a liteal)
Try t:select t:id=${prop:refFieldId} ... Christoph Marc A. Donis wrote: Hi again, I am trying to get a select component to take an id from its component class, rather than having it staticly defined in the tml. It seems, however, that no matter what I try, the id is always interpreted as a literal string. e.g.: t:select t:id=prop:refFieldId ... etc which I would expect to get the id from an accessor named getRefFieldId() in the component class, but instead it generates the id as prop:refFieldId. Is id special in this way? If so, is there some sort of workaround for this? What I want is something like this: t:label t:for=selectField${message:label1}/t:label t:ReferenceDropDown t:selectId=literal:selectField ... etc / and then, ReferenceDropDown.tml: t:select t:id=prop:selectId ... etc / in order to tie the label to the select which is inside my own ReferenceDropDown component. Thoughts? Thanks again, Marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]