I have another question, how can I generate unique complete id's of a
component in a loop? I have tried with
jsSupport.allocateClientId("uniqueid") but it only generates unique client
ids

I have the next code:

Text.tml
<t:loop source="1..10">
    <t:component1/>
</t:loop>

Component1.java:
@Inject
    private JavaScriptSupport jsSuport;
    @Inject
    private ComponentResources resources;
    @Inject
    private org.slf4j.Logger log;

    void setupRender() {
        log.debug("COMPONENT1.ID={}", resources.getCompleteId());
    }

Component.tml:



Output:
24-05-2012 17:50:13 [DEBUG] Component1 - COMPONENT1.ID=Test:component1
24-05-2012 17:50:13 [DEBUG] Component1 - COMPONENT1.ID=Test:component1
24-05-2012 17:50:13 [DEBUG] Component1 - COMPONENT1.ID=Test:component1
24-05-2012 17:50:13 [DEBUG] Component1 - COMPONENT1.ID=Test:component1
24-05-2012 17:50:13 [DEBUG] Component1 - COMPONENT1.ID=Test:component1
24-05-2012 17:50:13 [DEBUG] Component1 - COMPONENT1.ID=Test:component1
24-05-2012 17:50:13 [DEBUG] Component1 - COMPONENT1.ID=Test:component1
24-05-2012 17:50:13 [DEBUG] Component1 - COMPONENT1.ID=Test:component1
24-05-2012 17:50:13 [DEBUG] Component1 - COMPONENT1.ID=Test:component1
24-05-2012 17:50:13 [DEBUG] Component1 - COMPONENT1.ID=Test:component1

I need that the completeId of component1 are unique, how can I archive it ? 
Thank you for your time


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-can-I-create-a-component-that-generates-unique-ids-tp5713377p5713393.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

Reply via email to