My team and I just upgraded to Machii 1.5. In using the new persist
feature with redirect, we've ran into an issue concerning information
persistence. We persist and object over a redirect. The initial run
through works fine, however, should the user refresh the page, the
information is lost. Has anyone else experienced this 'feature'? If
so, does anyone know a fix or a work around to this?
Thanks everyone,
Jamarl
.pjf
Thanks for the swift response.
Wouldn't it be more useful if the framework had an option to make the
session data stick around instead of writing custom code to accomplish
this?
Thanks,
Hussein
--
Matt Woodward
mpwoo...@gmail.com
http://www.mattwoodward.com
Thanks for the reply. I perfectly understand your point and the
concept behind the current redirect persist function, but I reckoned
it could of been more user friendly if persistence beyond the first
request can be stored and expired by framework via a simple command
directive. Maybe I am looking at this the wrong way.
I personally don't mind writing a component to handle this but I
thought it would have been an excellent option to have. Again I could
be missing the point. I do from time to time. :)
Thanks,
Hussein
On Nov 13, 11:41 am, "Matt Woodward" <mpwoodw...@gmail.com> wrote:
> The framework shouldn't be sticking stuff in the session permanently
> for you. Once you get beyond the scope of a single request using the
> flash scope, how is Mach-II going to know when you're done with it? If
> you're concerned about the data persisting beyond the scope of a
> single request, it doesn't seem at all unusual to me to put the onus
> on the developer to handle that.
>
> mpwoodw...@gmail.comhttp://www.mattwoodward.com
Of course I could be missing the point as well, and to me it's always
good to bring this kind of stuff up. You never know what might come
out of the proverbial "You know what would be cool ..." questions. ;-)
--
1. What happens if the resource you requested no longer exists? Does an
exception be generated? (I would think so). Wouldn't you rather have
the option to announce another event (such as starting a process over)
if the resource does not exists? This makes it already harder.
2. Where does this information get stored and how do you access it? An
API would have to be created? With redirect as it stands, you have an
option to key into into the session, application or server scopes. But
due to the black box nature of this, we don't have to provide an API to
getting at the data as it is all managed.
3. Isn't a cflocation (aka redirect command) drastically different than
a feature like this? Redirect's persist features solves the problem
that complex objects cannot be serialized in an URL over a cflocation.
Persist gave the ability to persist transient object across this
barrier. Since a redirect is used to "update" the url in the client's
browser, this makes sense that you may have to persist complex data
types from one request to another -- however long term storage of data
is best left to other means.
I'm sending this email as "thinking out loud" versus "why did you
suggest this"...I love getting suggestions and I don't want to sound
like we're flat out turning suggestion down without reason thus the
email. Hussein, thanks for the suggestion and any more points can be
brought up on list...
Best,
.Peter
My initial response was based on the fact that a simple and harmless
browser refresh by a user could screw up your application unless you
persists the data beyond the first request.
It may be trivial to some but it just didn't sit with me the first
time.
Anyway, I've read both perspectives on the matter and I will sleep on
it some more.
Thanks Again,
Hussein