cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Re: svn commit: r170589 - in /cocoon/branches/BRANCH_2_1_X/src/blocks/forms: conf/ java/org/apache/cocoon/forms/formmodel/ java/org/apache/cocoon/forms/validation/impl/
Date Wed, 18 May 2005 13:02:16 GMT
Ugo Cei wrote:
> 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.

Or if you click back button, etc. There are multiple scenarios.


> Anyway, it's probably safer to use a generated, random id.

This will be safer, please do it :-)

Vadim


> 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

Mime
View raw message