tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Canfield (JIRA)" <...@tapestry.apache.org>
Subject [jira] Created: (TAPESTRY-2308) Don't create HttpSession when persisted property is null
Date Fri, 28 Mar 2008 02:16:24 GMT
Don't create HttpSession when persisted property is null
--------------------------------------------------------

                 Key: TAPESTRY-2308
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2308
             Project: Tapestry
          Issue Type: Improvement
          Components: tapestry-core
    Affects Versions: 5.0.11
            Reporter: Josh Canfield
            Priority: Minor


When persisting properties using "session" it would be nice if the session was only created
after a non-null value was assigned to the property.

It should be enough to add a simple guard in AbstractSessionPersistentFieldStrategy#postChange

        Session session = _request.getSession(newValue != null);
        if (session != null) {
            session.setAttribute(builder.toString(), newValue);
        }

allowing existing session values to be replaced if the session exists, but not storing a value
if no session exists.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message