You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Tuan <mr...@gmail.com> on 2008/11/18 05:58:08 UTC

[t5][Zone Component] id & getElementID

Hi all,

I have some problems when dealing with the Zone component.

    - We don't use prop binding in t:id parameter. However I see that 
t:id parameter of the component is defined in source code like as other 
parameters. so how to code  to get t:id (or any parameter field) is not 
used with "prop" binding?

    - The getElementId method of Zone component alway return null (?) - 
not same as other components (ex: actionlink)
        Ex:
             + Index.tml
  <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
    <head></head>
    <body>
        <t:zone t:id="tZone"></t:zone>
    </body>
</html>
            


             + Index.java
public class Hello {
    @InjectComponent
    private Zone tZone;
   
    @AfterRender
    void afterRender() {
        System.out.println(">>>>>>>>> " + tZone.getClientId());
    }
}


output: >>>>>>>>> null

Please give me some info or reference links to solve my problems.

Thanks.
             

Re: [t5][Zone Component] id & getElementID

Posted by Tuan <mr...@gmail.com>.
Sorry about typing error. so don't worry about page class name.

Thanks

Tuan wrote:
> Hi all,
>
> I have some problems when dealing with the Zone component.
>
>     - We don't use prop binding in t:id parameter. However I see that 
> t:id parameter of the component is defined in source code like as 
> other parameters. so how to code  to get t:id (or any parameter field) 
> is not used with "prop" binding?
>
>     - The getElementId method of Zone component alway return null (?) 
> - not same as other components (ex: actionlink)
>         Ex:
>              + Index.tml
>   <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>     <head></head>
>     <body>
>         <t:zone t:id="tZone"></t:zone>
>     </body>
> </html>
>             
>
>
>              + Index.java
> public class Hello {
>     @InjectComponent
>     private Zone tZone;
>    
>     @AfterRender
>     void afterRender() {
>         System.out.println(">>>>>>>>> " + tZone.getClientId());
>     }
> }
>
>
> output: >>>>>>>>> null
>
> Please give me some info or reference links to solve my problems.
>
> Thanks.
>