{
throw new IllegalStateException("UIToken must be inside a UIForm.");
}
String renderStamp = RandomStringUtils.randomAlphanumeric(50);
RenderStampStore store = RenderStampStore.instance();
if (store != null)
{
// if the store is not null we store the key
// instead of the actual stamp; this puts the
// server in control of this value rather than
// the component tree, which is owned by the client
// when using client-side state saving
renderStamp = store.storeStamp(renderStamp);
}
writeCookieCheckScript(context, writer, token);
token.getClientUidSelector().seed();