I think the issue is that you use clientId directly in your
getClientId() method. To have a unique id you need to add some
additional work. You can look at AbstractField implementation:

    @Parameter(value = "prop:componentResources.id", defaultPrefix =
BindingConstants.LITERAL)
    private String clientId;

    private String assignedClientId;

    public String getClientId() {
        return assignedClientId;
    }

    @SetupRender
    void setup() {
        assignedClientId = jsSupport.allocateClientId(id);
    }




On Tue, Mar 12, 2013 at 12:17 PM, nquirynen <nat...@pensionarchitects.be> wrote:
> Hi,
>
> I have a component "TabPanel" with the following parameter:
>
>         @Property
>         @Parameter(value = "prop:resources.id", defaultPrefix =
> BindingConstants.LITERAL)
>         private String clientId;
>
> which value I use as "id=${clientId}" in the .tml
>
>
> If I put multiple instances of this component in this page without setting
> the clientId parameter they will get the following id's:
>
> id=tabpanel
> id=tabpanel_0
> id=tabpanel_1
> ...
>
> Now I also have another component containing a TabPanel component.
> If I add this 2nd component below the other tabpanels I get the following
> result:
>
> id=tabpanel
> id=tabpanel_0
> id=tabpanel_1
> ...
> id=tabpanel
>
> As this is the first tabpanel in that component.
>
> Now I'm not sure how to handle this problem. If I explicitly set the
> clientId parameters I don't have a problem, but maybe there's another
> solution?
>
>
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/client-id-problem-with-nested-components-tp5720419.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>



-- 
BR
Ivan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to