Skip to main content
narayanank84409
Level 4
Oct 16, 2015 2:28 AM UTC
Solved

Unique Value/Random generated id

My Requirement:

I need to show unique/Random generated value either in Selection field or textfield.

to avoid overlapping.

Please some suggestion to achieve .

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
edubey
edubeyAccepted solution
Level 10
Oct 16, 2015 2:28 AM UTC
Hi, If you want to keep things to client side. , I would suggest add a listerner in your selection / textfield , in that listerner you can write js code to generate random values     

3 replies

narayanank84409
Level 4
Oct 16, 2015 2:28 AM UTC

Thanks i wrote listener to fix that.

Translate
smacdonald2008
Level 10
Oct 16, 2015 2:28 AM UTC

Write an custom AEM Java Service that produces a GUID:

 String myGuid = java.util.UUID.randomUUID().toString();

Translate
edubey
edubeyAccepted solution
Level 10
Oct 16, 2015 2:28 AM UTC
Hi, If you want to keep things to client side. , I would suggest add a listerner in your selection / textfield , in that listerner you can write js code to generate random values     
Translate