Il giorno 18/mag/05, alle 02:56, Vadim Gritsenko ha scritto:
+ Session session = ObjectModelHelper.getRequest(objectModel).getSession(true);
+ session.setAttribute(SESSION_ATTR_PREFIX + getId(), generateSecret());
Such session attribute name is not unique (two forms with similar widget id). Why not use widget.set/getAttribute?
That would be a problem only if you had two forms on the same page having two different widdgets with the same id. Or the same form open in two browser windows at once. Anyway, it's probably safer to use a generated, random id.
The problem with using a widget attribute is that the attribute value must be accessible to the component that generates the image, which is not aware of the form.
Ugo
-- Ugo Cei Tech Blog: http://agylen.com/ Source.zone: http://sourcezone.info/ Wine & Food Blog: http://www.divinocibo.it/
smime.p7s
Description: S/MIME cryptographic signature