Package org.zkoss.zk.ui.impl
Class LegacyDesktopIdGenerator
- java.lang.Object
-
- org.zkoss.zk.ui.impl.LegacyDesktopIdGenerator
-
- All Implemented Interfaces:
java.io.Serializable
,IdGenerator
public class LegacyDesktopIdGenerator extends java.lang.Object implements IdGenerator, java.io.Serializable
A legacy sequential desktop ID generator used in ZK before 9.6.0. The result is likez_1ym6
or_ga6b
.To use this Id Generator, add system-config in zk.xml.
<system-config> <id-generator-class>org.zkoss.zk.ui.impl.LegacyDesktopIdGenerator</id-generator-class> </system-config>
- Since:
- 9.6.0
- Author:
- rudyhuang
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LegacyDesktopIdGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
nextDesktopId(Desktop desktop)
Returns the next desktop ID for the specified desktop, or null to generate the default ID.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.zkoss.zk.ui.sys.IdGenerator
nextAnonymousComponentUuid, nextComponentUuid, nextPageUuid
-
-
-
-
Method Detail
-
nextDesktopId
public java.lang.String nextDesktopId(Desktop desktop)
Description copied from interface:IdGenerator
Returns the next desktop ID for the specified desktop, or null to generate the default ID.Default (if null is returned): ID is generated randomly. In other words, the desktop's ID, by default, is not deterministic. To have a deterministic value, you have to implement this method.
Notice that UUID cannot be empty and can only have alphanumeric characters or underscore (i.e., a-z, A-Z, 0-9, and _).
Also notice that we can retrieve the execution by use of
Desktop.getExecution()
, orExecutions.getCurrent()
.- Specified by:
nextDesktopId
in interfaceIdGenerator
- Returns:
- the next desktop ID, or null to generate the default ID.
-
-