[ 
https://issues.apache.org/jira/browse/TAPESTRY-2090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12566970#action_12566970
 ] 

Geoff Callender commented on TAPESTRY-2090:
-------------------------------------------

Would it be overly simplistic to replace a blank with "blank" and null with 
"null", so passivating { "", null, "42", "true" } would become 
/blank/null/42/true ?

The 2 tricky strings to passivate are "null" and "blank", which could generate 
"nullnull" and "blankblank". 

Is this too simplistic?  

Currently I do this a pretty clumsy way in onActivate and onPassivate, eg.

        Object[] onPassivate() {
                return new String[] { ContextFixer.packString(_firstName), 
ContextFixer.packString(_lastName) };
        }

        void onActivate(String firstName, String lastName) {
                _firstName = ContextFixer.unpackString(firstName);
                _lastName = ContextFixer.unpackString(lastName);
        }

The ContextFixer class also handles Boolean and Date.  It's attached.  It would 
be very nice to not need it!

> Empty passivated fields aren't passed to onActivate
> ---------------------------------------------------
>
>                 Key: TAPESTRY-2090
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2090
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.9
>            Reporter: Geoff Callender
>            Assignee: Howard M. Lewis Ship
>            Priority: Minor
>             Fix For: 5.0 Next Release
>
>
> Passivating { "", "", "42", "true" }, onActivate receives only 2 elements, { 
> "42", "true" }.  The generated URL appears OK - it ends with ///42/true.

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to