-
1. Re: Does Seam really support back buttoning?
hkarapuu Jul 3, 2007 3:25 PM (in response to hkarapuu)Come on guys, it's elementary, i'm sure somebody has the answer!
Does Seam support conversation scope rollback to previous state when browser back button is used or not? Details in the original post.
Thanks,
Henri Karapuu -
2. Re: Does Seam really support back buttoning?
smithbstl Jul 3, 2007 4:55 PM (in response to hkarapuu)You have to enable back button support on a page by page basis via pages.xml
http://docs.jboss.com/seam/2.0.0.B1/reference/en/html/jbpm.html#d0e5005 -
3. Re: Does Seam really support back buttoning?
hkarapuu Jul 3, 2007 4:58 PM (in response to hkarapuu)Thanks! But I thought that the back=enabled was only relevant when using jBPM?
/Henri -
4. Re: Does Seam really support back buttoning?
smithbstl Jul 3, 2007 5:04 PM (in response to hkarapuu)Nope, I think you just have to use jPDL for navigation (aka Seam Navigation). That is in no way dependent on using jBPM.
-
5. Re: Does Seam really support back buttoning?
hkarapuu Jul 3, 2007 5:17 PM (in response to hkarapuu)"smithbstl" wrote:
Nope, I think you just have to use jPDL for navigation (aka Seam Navigation). That is in no way dependent on using jBPM.
Ok, so lets assume i use jPDL to define the navigation rules. Is it the conversation scope that gets rolled back to previous state, or the process scope?
If i define a stateful session bean with conversation/process scope will the bean state get rolled back?
Thanks,
Henri Karapuu -
6. Re: Does Seam really support back buttoning?
smithbstl Jul 3, 2007 5:27 PM (in response to hkarapuu)Ok, I guess I told you wrong. jPDL pageflows are related to jBPM because they are installed using the jBPM namespace in components.xml
<core:jbpm> <core:pageflow-definitions> <value>pageflow.jpdl.xml</value> </core:pageflow-definitions> </core:jbpm>
But you don't have to use jBPM in order to use pageflows. Now if you are not defining any jBPM processes, there really is no "process" scope. What will get rolled back using the back button is the Long Running conversation that is started in the pageflow defined in pageflow.jpdl.xml NOT pages.xml, I was mistaken in my previous post, sorry. -
7. Re: Does Seam really support back buttoning?
smithbstl Jul 3, 2007 5:28 PM (in response to hkarapuu)The easiest way to test this is to try it out with a simple app.
-
8. Re: Does Seam really support back buttoning?
hkarapuu Jul 3, 2007 5:58 PM (in response to hkarapuu)Ok thanks for the help.
-
9. Re: Does Seam really support back buttoning?
gavin.king Jul 4, 2007 5:42 PM (in response to hkarapuu)"hkarapuu" wrote:
Does Seam support conversation scope rollback to previous state when browser back button is used or not?
No. In my opinion this is not the true semantics of "back". Back is purely navigational, it should not change the underlying state. -
10. Re: Does Seam really support back buttoning?
hkarapuu Jul 5, 2007 4:19 AM (in response to hkarapuu)No. In my opinion this is not the true semantics of "back". Back is purely navigational, it should not change the underlying state.
I think there are many equally 'correct' or 'true' semantics for back button.
Other frameworks saying "back button support" mostly implement the other ('state rollback') semantics. Seam's "back button support" is more like separating the context per browser window, right?
In practice the state rollback semantics has proven to be extremely valuable.
Would you be open for discussion about adding that as a configurable alternative?
Regards,
Henri Karapuu -
11. Re: Does Seam really support back buttoning?
gavin.king Jul 5, 2007 2:04 PM (in response to hkarapuu)"hkarapuu" wrote:
No. In my opinion this is not the true semantics of "back". Back is purely navigational, it should not change the underlying state.
I think there are many equally 'correct' or 'true' semantics for back button.
Other frameworks saying "back button support" mostly implement the other ('state rollback') semantics. Seam's "back button support" is more like separating the context per browser window, right?
In practice the state rollback semantics has proven to be extremely valuable.
Would you be open for discussion about adding that as a configurable alternative?
Not really, other frameworks are wrong here (and unperformant). In Seam, you get effect you want to achieve using "state rollback" by instead using nested conversations. It will take a bit of thinking for you to really "get" this.
Basically what Seam says is that you should be able to freely back-and-forward through a wizard without "losing" state that you already entered. But at certain well-defined points, you "acquire" state that should be released if you back up out of it. (An example of such a point is adding a new "child" object, or something.) These "well-defined points" are the beginnings of new nested conversations.
You need to spend some time thinking it out before you really "feel" this approach. -
12. Re: Does Seam really support back buttoning?
hkarapuu Jul 5, 2007 2:52 PM (in response to hkarapuu)"Gavin King" wrote:
Not really, other frameworks are wrong here (and unperformant). In Seam, you get effect you want to achieve using "state rollback" by instead using nested conversations. It will take a bit of thinking for you to really "get" this.
Yes i got the style, it's in fact same as what i used in my custom implementation of conversation scope in the sense that the state to be saved needs to be marked explicitly. Which is all good.
The problem was that, apparently due to the bug in @Begin(nested=true) as discussed in the other thread, the behavior did not work ...
I'll give it a spin again and see how things go. Thanks.
Ps. If Bill continues his postings like today [1], we'll be soon unable to use Seam for political reasons. I don't personally give a shit, but others do.
[1] http://www.theserverside.com/news/thread.tss?thread_id=46065#235878
/Henri Karapuu -
13. Re: Does Seam really support back buttoning?
gavin.king Jul 5, 2007 3:16 PM (in response to hkarapuu)The problem was that, apparently due to the bug in @Begin(nested=true) as discussed in the other thread, the behavior did not work ...
Yes, thanks for spotting this. I will get it fixed.If Bill continues his postings like today [1], we'll be soon unable to use Seam for political reasons. I don't personally give a shit, but others do.
I don't tell Bill what to do or say. Frankly I find most of the stuff he posts on TSS amazingly intemperate, unpersuasive, unproductive and inflammatory. But then, lots of people violently disagree with stuff I post as well, so who am I to judge others?
It's a deep, ancient cultural tradition at JBoss to let people speak their mind and I'm certainly not going to be the one to try to get us acting more "corporate". -
14. Re: Does Seam really support back buttoning?
hkarapuu Jul 5, 2007 4:15 PM (in response to hkarapuu)"gavin.king@jboss.com" wrote:
Yes, thanks for spotting this. I will get it fixed.
I didn't spot it, i was just the victim :)
I don't tell Bill what to do or say. Frankly I find most of the stuff he posts on TSS amazingly intemperate, unpersuasive, unproductive and inflammatory. But then, lots of people violently disagree with stuff I post as well, so who am I to judge others?
Fair enough. Can't say that i agree or understand your company's policy of allowing that kind of behavior in public, but not much i can do about it.
/Henri Karapuu