You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org> on 2005/01/25 01:21:17 UTC

[jira] Updated: (TAPESTRY-218) Persistent properties can't be set to null

     [ http://issues.apache.org/jira/browse/TAPESTRY-218?page=history ]

Howard M. Lewis Ship updated TAPESTRY-218:
------------------------------------------

        Summary: Persistent properties can't be set to null  (was: Persistent properties cant be set to null)
        Version: 3.0.1
    Fix Version: 3.0.2

> Persistent properties can't be set to null
> ------------------------------------------
>
>          Key: TAPESTRY-218
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-218
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 3.0, 3.0.1
>  Environment: IBM WebSphere 4
>     Reporter: Michael Frericks
>     Assignee: Howard M. Lewis Ship
>      Fix For: 3.0.2

>
> situation:
> If you set a persistent property to null, this finally invokes
> SessionPageRecorder#recordChange
> ...
>         _session.setAttribute(attributeKey, newValue);
> ...
> where newValue is null.
> The ServletAPI 2.2 says:
>         newValue - the object to be bound; cannot be null
> So we tested and saw that the IBM WebSphere 4 really did not
> accept the null value and the propety was not changed.
> That is ugly.
> solution:
> Change 
> SessionPageRecorder#recordChange
> ...
>         _session.setAttribute(attributeKey, newValue);
> ...
> to 
>         if(newValue != null)
>         {
>           _session.setAttribute(attributeKey, newValue);
>         }
>         else
>         {
>           _session.removeAttribute(attributeKey);
>         }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org