[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-13 Thread [EMAIL PROTECTED]
oops, thanks

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957815#3957815

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957815
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-13 Thread iradix
anonymous wrote : By "stateless", I don't really mean using a SLSB, I mean 
using only request-scoped state, and passing state as request parameters (like 
the blog example does).

I'll check out the blog example, but I'd imagine that does bypass the usage of 
a DataTable.  Seems a shame since at first glance that was one of my favorite 
JSF features.  Any thoughts on using PAGE scope and reattaching the selected 
object in a method anotated @DataModelSelection?

Also, I've used the @End(beforeRedirect=true) feature and it works great 
except that in the endConversation(boolean beforeRedirect) method of 
ConversationInterceptor, you have:
 
Manager.instance().endConversation(false) 

rather than 

Manager.instance().endConversation(beforeRedirect)

After the change it does exactly what I was looking for though so thanks again.

-Dave

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957795#3957795

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957795
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread [EMAIL PROTECTED]
By "stateless", I don't really mean using a SLSB, I mean using only 
request-scoped state, and passing state as request parameters (like the blog 
example does).

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957554#3957554

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957554
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread iradix
Gavin,

I think you understand where I'm coming from and thanks for the link.  I've 
been thinking that it would be really helpful to have a resource for Seam 
design patterns before.  There are a couple of things I think I'm missing 
though.

We've already discussed why a page scoped DataModel ends up with detached 
objects, a session scoped one seems to have a similar problem whereby whether 
you load your list by a seam managed or an extended EM, if you inject the 
DataModelSelection into a conversation scoped bean, that bean will possibly 
contain a different EM.  This is a problem that I'd like to avoid.

When it comes to SLSB searches, I might be missing something but it seems like 
that wouldn't work correctly with a JSF DataTable.  If I display a DataTable 
populated from an SLSB and then in the apply request values phase of the 
postback the DataTable recieves a DataModel from a new SLSB the new DataModel 
might be different and the row index may not correspond.  Or am I wrong there?  
This could be solved by avoiding the use of DataTable and passing a custom 
entity identifier but then it seems that I'm missing out on one of the cool new 
features of JSF.  Or maybe this is just the beginning of my 
dissolusionment

Anyway, thanks a lot for the additions.  They are exactly what I was looking 
for.  Maybe when I've got this all figured out I can put in a wiki entry to 
help any one else with similar problems.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957534#3957534

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957534
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread petemuir
Sorry, that should be

@DataModel(scope=PAGE)
  | private List foos;
  | 
  | // Factory etc.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957531#3957531

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957531
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread petemuir
anonymous wrote : anonymous wrote : You could reload the object when the 
conversation starts?I'm not sure I follow. 
I think
em.refresh(myEntity);
anonymous wrote : If this ID is being added as a request param please make sure 
that it's a non-important ID (ie, not a DB key).

Yup.  This is something I need to fix ;)

I've just tested what was discussed on this thread which works well
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=86564&start=10

SearchBean

  | @DataModel
  | private List foos;
  | 
  | // Factory etc.
  | 

EditorBean

  | @In(required=false, value="#{foos.rowData}") 
  | private Foo selectedFoo;
  | 
  | @In(required=true) @Out 
  | private Foo foo;
  | ...
  | @Create @Begin
  | public void begin() {
  |foo = selectedFoo;
  | }
  | ...
  | 

Which, with some (basic) testing, seems to work and not give an LIE (which 
surprises me)

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957529#3957529

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957529
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread [EMAIL PROTECTED]
I added @End(beforeRedirect=true), @EndTask(beforeRedirect=true) and 
Conversation.endBeforeRedirect() to CVS.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957525#3957525

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957525
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread CptnKirk
Too many conversations going on at once.

anonymous wrote : CptnKirk, do you have a different method for handling this?

You could use some indirection here.  You can have your request param id be a 
key to a session/conversation value.  This way the actual id is never exposed.  
If the param is manipulated it won't be found in the session/conversation and 
you provide error handling from there.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957524#3957524

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957524
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread [EMAIL PROTECTED]
By the way, I just made a commit to CVS that lets you call

Redirect.instance().setConversationPropagation(false)

When using the Redirect component to control redirects.

But I suppose you are using a navigation rule

I guess I could add something else like:

Conversation.setRedirectPropagation(false);

if you really need it. I don't love it however

Perhaps even:

@End(beforeRedirect=true)

which a bit more palatable to me

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957521#3957521

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957521
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread [EMAIL PROTECTED]
"iradix" wrote : Ok Gavin, let me try to explain.  I have a page that outputs a 
DataTable of objects.  A user can click on an object's name to select it and 
bring up an update form or use a button below the list to bring up a form for 
new object creation.  When either of these forms is successfully submitted, the 
user is returned to the page with the DataTable
  | 
  | I want to set the conversation that the @DataModel is outjected into as 
long running so that when the postback occurs for a selection and my 
@DataModelSelection is injected it will be sure to come from the same 
@DataModel displayed to the user.
  | 
  | When a new object is created, I want to end the conversation so that the 
@DataModel, which was retrieved using a now stale query and any state 
associated with it is dropped before the page with the DataTable is redisplayed.
  | 
  | So therein lies my problem.  If I begin the conversation from the page 
containing the DataTable and the conversation is ended by an action method that 
redisplays that page, the conversation will always be restarted, even after 
issuing a redirect.
  | 
  | Make sense?
  | 
  | I'm not married to doing things this way, but it's the best I've come up 
with, so if it can be done differently please point me in the right direction.
  | 
  | -Dave
  | 
  | 

So you have

(1) A conversational search screen 

I usually recommend that search screens be page scoped, session scoped, or even 
purely stateless.

http://blog.hibernate.org/cgi-bin/blosxom.cgi/2006/06/22#stages-of-adoption

(2) A conversation that edits the data and then returns to the search screen 

Shouldn't it be a nested conversation then?

(3) the need to update the search screen when done editing the data 

why not just use a Seam event that forces refresh of the list (just like the 
booking list in the booking demo)


Have I understood everything here?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957519#3957519

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957519
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread CptnKirk
If this ID is being added as a request param please make sure that it's a 
non-important ID (ie, not a DB key).  If it is, you run the risk of a malicious 
user accessing or possibly updating data they shouldn't via manipulation of 
this request param. 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957512#3957512

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957512
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread iradix
anonymous wrote : You could reload the object when the conversation starts? 

I'm not sure I follow.

anonymous wrote : If this ID is being added as a request param please make sure 
that it's a non-important ID (ie, not a DB key). If it is, you run the risk of 
a malicious user accessing or possibly updating data they shouldn't via 
manipulation of this request param.

I've got to agree with the captain on this one :)  Passing an id is the way 
I've always done this in the past, but the security concerns/workarounds are a 
good reason for the JSF DataModel usage in the first place.  In order for the 
DataModel to work however, it needs to stay consistent between the rendered 
response and the postback.  I can't serialize it, so it seems to make sense 
that I would store it in the conversation, which means starting the 
conversation from the page that requests the @DataModel.

CptnKirk, do you have a different method for handling this?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957517#3957517

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957517
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread petemuir
Seam Managed Persistence Context
LazyIntitialisationException

You could reload the object when the conversation starts?

I have to say, in my search screens (stateless)I just pass the id of the object 
across using f:param and load it in the @Create @Begin method of my editing 
bean (Coversation Scoped) which works, but isn't perhaps the most elegant way 
of doing it.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957508#3957508

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957508
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread iradix
anonymous wrote : Well I think your Entities will be serializable? An SMPC 
should get over the LIE problem!?

Yup, they're serializable, and everything works great until I try to access 
something that's loaded lazily and find out that the Seam Managed EntityManager 
that loaded the object in the list page has been closed along with the 
temporary conversation the list page occured in.

Of course I could set that conversation to be long running but then... well, 
I'm back to square one.

That fact that no one else has seen this problem leads me to believe that I'm 
missing something... I'm just not sure what that something is.

By the way... what's an SMPC and an LIE?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957497#3957497

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957497
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread [EMAIL PROTECTED]
anonymous wrote : Well I think your Entities will be serializable? An SMPC 
should get over the LIE problem!?

Once you serialize the entity, it becomes detached.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957494#3957494

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957494
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread iradix
Ok Gavin, let me try to explain.  I have a page that outputs a DataTable of 
objects.  A user can click on an object's name to select it and bring up an 
update form or use a button below the list to bring up a form for new object 
creation.  When either of these forms is successfully submitted, the user is 
returned to the page with the DataTable

I want to set the conversation that the @DataModel is outjected into as long 
running so that when the postback occurs for a selection and my 
@DataModelSelection is injected it will be sure to come from the same 
@DataModel displayed to the user.

When a new object is created, I want to end the conversation so that the 
@DataModel, which was retrieved using a now stale query and any state 
associated with it is dropped before the page with the DataTable is redisplayed.

So therein lies my problem.  If I begin the conversation from the page 
containing the DataTable and the conversation is ended by an action method that 
redisplays that page, the conversation will always be restarted, even after 
issuing a redirect.

Make sense?

I'm not married to doing things this way, but it's the best I've come up with, 
so if it can be done differently please point me in the right direction.

-Dave



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957488#3957488

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957488
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread petemuir
anonymous wrote : Disabling propogation sounds perfect but how do you do it?

http://docs.jboss.com/seam/1.0.1.GA/reference/en/html/conversations.html#d0e2814

anonymous wrote : Good point, I wasn't thinking about how page scope worked. 
Unfortunately, I have tried this in the past and it adds another big 
problem serializing/reconstituting data. Since my lists consist of attached 
Entity Beans this is problematic. 

Well I think your Entities will be serializable? An SMPC should get over the 
LIE problem!?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957484#3957484

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957484
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread iradix
anonymous wrote : Yes, but if it's in PAGE scope then on 'postback' the 
datamodel will  be available through EL so won't  be recreated. Your scenario 
is a big reason for PAGE scope :) 

Good point, I wasn't thinking about how page scope worked.  Unfortunately, I 
have tried this in the past and it adds another big problem 
serializing/reconstituting data.  Since my lists consist of attached Entity 
Beans this is problematic.

anonymous wrote : A page action would work as well I think. Remember you can 
disable conversation propogation for actions and therefore @Begin would start a 
new conversation. This is equivalent to to your 'stripping the conversation Id'.

Disabling propogation sounds perfect but how do you do it?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957481#3957481

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957481
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread [EMAIL PROTECTED]
Conversation.leave() will leave the current conversation in an orphaned state 
though. You probably don't want that.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957480#3957480

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957480
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread [EMAIL PROTECTED]
Well, one way is to remove the RedirectFilter.

Other than that, you would have to show me a really compelling usecase for why 
you need some extra functionality to disable 
conversation-propagation-over-redirect on a per-request basis.

You havn't really described your usecase yet.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957478#3957478

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957478
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread iradix
anonymous wrote : You may be able to use a combination of built in conversation 
components to help control the current/next conversation context 
programmatically.

I actually looked into that and didn't see anything that jumped out at me.  I 
suppose Conversation.leave() would probably be my best bet.  If that 
unassociates the request from the current conversation then maybe the 
conversationId won't be added to the redirect.  I'll give it a shot.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957477#3957477

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957477
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread iradix
anonymous wrote : All kinds of totally nonintuitive problems occur if you try 
to have requests that span bits of different conversations. This was what I 
initially implemented wayback, and it turned out to be Really Evil. So now, 
conversations begin and end at request boundaries.

Ah, but my problem is that the conversation isn't ending at the request 
boundary.  It's continuing on through the redirect after a postback and I can't 
figure out how to disable that.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957475#3957475

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957475
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread petemuir
anonymous wrote : 
  | My problem is that the next action after a list is displayed is often 
displaying a selection from the list. As I understand things, on a postback the 
DataTable component will reaccess the DataModel through EL variable resolution, 
then indicate the row selected. If the DataModel exists in a long running 
conversation, that will be returned and it'll work great. If the conversation 
wasn't started when the original DataModel was generated I'd imagine a new 
DataModel will be created on the postback (through the @Factory method) and it 
could be different from what was rendered to the user. Does that make sense?
  | 


Yes, but if it's in PAGE scope then on 'postback' the datamodel will be 
available through EL so won't be recreated.  Your scenario is a big reason for 
PAGE scope :)

anonymous wrote : 
  | 2.1.3. Page context
  | 
  | The page context allows you to associate state with a particular instance 
of a rendered page. You can initialize state in your event listener, or while 
actually rendering the page, and then have access to it from any event that 
originates from that page. This is especially useful for functionality like 
clickable lists, where the list is backed by changing data on the server side. 
The state is actually serialized to the client, so this construct is extremely 
robust with respect to multi-window operation and the back button. 
  | 

A page action would work as well I think.  Remember you can disable 
conversation propogation for actions and therefore @Begin would start a new 
conversation. This is equivalent to to your 'stripping the conversation Id'.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957473#3957473

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957473
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread CptnKirk
You may be able to use a combination of built in conversation components to 
help control the current/next conversation context programmatically.  This may 
interact better with Seam's redirect filter (which is the guy that I think is 
adding your conversationId param).

http://docs.jboss.com/seam/latest/reference/en/html/components.html#d0e6402



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957471#3957471

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957471
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread [EMAIL PROTECTED]
All kinds of totally nonintuitive problems occur if you try to have requests 
that span bits of different conversations. This was what I initially 
implemented wayback, and it turned out to be Really Evil. So now, conversations 
begin and end at request boundaries.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957468#3957468

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957468
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread iradix
Upon further thought, the page action won't work either.  It would start the 
conversation correctly the first time the list page was accessed, but after a 
creation occured and I wanted to display the list page again, my choices would 
be to begin the conversation with another page action (same problem as before, 
it wouldn't actually be a new conversation) or don't and end up with no long 
running conversation after the second list page is rendered.

It seems to me that the easiest way to fix this would be to strip the 
conversationId parameter when the redirect is issued.  Unfortunately, I don't 
see any way to do that since I'm returning a symbolic view id from my action 
method and seam is "magically" adding it.  Any suggestions?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957461#3957461

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957461
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread iradix
anonymous wrote : Have you tried @Begin without the join=true?

I have not, but I'd imagine it will do the same thing.  I don't think the 
problem is that it's joining a long running conversation, but that it's seeing 
the ended conversation, thinking that it's a temporary conversation and setting 
it to be long running.  Come to think of it, I might be off here, but from what 
I remember of looking over the Manager class that seems right.

anonymous wrote : you may need to use a page action to instead kick the 
rendering over to a page running in the new conversation.

Kind of seems that way.  Anybody else doing things differently?  Not using 
jPDL?  Anybody starting the conversation when a row is selected, and if so any 
problems with the consistency of the list data?

-Dave


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957446#3957446

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957446
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread iradix
anonymous wrote : "petemuir" wrote : anonymous wrote :  Is there no way to end 
a current conversation and begin an entirely new one in the course of a single 
request?
  |   | 
  |   | I'm pretty sure there isn't, Gavin wrote about this sometime ago on the 
forum.
  | 
  | I searched the forum and hadn't run across anything.  I'd be interested to 
know why this is the case.  Even if it's not the default behaviour a 
@End(immediate = "true") feature seems like it would be useful.  It would also 
help if sometime in the future the conversation lifecycle was documented in a 
bit more detail, although I realize it's a work in progress and that might take 
a while.
  | 
  | anonymous wrote : AFAIK you can use the back button when using jpdl:
  | 
  | Thanks for the tip.  I hadn't noticed when that feature was added.  Any 
idea how it works?  Some type of unique token representing the current state 
that's placed in the component tree perhaps?
  | 
  | anonymous wrote : What about putting the datamodel into the PAGE scope? 
Then start a conversation on the next action.
  | 
  | My problem is that the next action after a list is displayed is often 
displaying a selection from the list.  As I understand things, on a postback 
the DataTable component will reaccess the DataModel through EL variable 
resolution, then indicate the row selected.  If the DataModel exists in a long 
running conversation, that will be returned and it'll work great.  If the 
conversation wasn't started when the original DataModel was generated I'd 
imagine a new DataModel will be created on the postback (through the @Factory 
method) and it could be different from what was rendered to the user.  Does 
that make sense?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957441#3957441

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957441
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread CptnKirk
anonymous wrote : Is there no way to end a current conversation and begin an 
entirely new one in the course of a single request?

Have you tried @Begin without the join=true?  From your example it sounds like 
you're asking Seam to propagate the context you're trying to clear out.  It 
make sense to me that resources are not immediately destroyed when @End methods 
are called, and that the rendered response is the last response of this (now 
ended) conversation.

If continuing to render the response to the original request (of the ending 
conversation) is the default, then you may need to use a page action to instead 
kick the rendering over to a page running in the new conversation.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957433#3957433

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957433
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread petemuir
anonymous wrote :  Is there no way to end a current conversation and begin an 
entirely new one in the course of a single request?

I'm pretty sure there isn't, Gavin wrote about this sometime ago on the forum.

anonymous wrote : I'm not using jPDL pageflows (I need to support back button 
usage)
AFAIK you can use the back button when using jpdl:


  | 
  | 
  | 

anonymous wrote : 
  | It makes sense to me that a conversation should be started when a 
@DataModel is accessed so that the corresponding @DataModelSelection matches up 
to the DataTable presented to the user. If the conversation didn't begin until 
a row was selected I'd imagine the postback would start a new conversation, 
retrieving a new List via the factory method with potentially different 
results. Or am I missing something about the conversation lifecycle again?
  | 

What about putting the datamodel into the PAGE scope? Then start a conversation 
on the next action.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957431#3957431

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957431
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-12 Thread iradix
Conversations spanning redirects is certainly a good thing in general, but once 
I've ended a conversation shouldn't it go away?  I'm not entirely certain I 
understand the conversation lifecycle here.  If I invoke an action method 
annotated with @End it seems like the current conversation should be destroyed 
and a new temporary conversation should be started.  That's not what's occuring 
however so when is the conversation actually destroyed?

Doesn't it seem more intuitive that once I've called a method annotated with 
@End the next call to a @Begin(join = true) method will begin a new 
conversation?  Is there no way to end a current conversation and begin an 
entirely new one in the course of a single request?

I'm not using jPDL pageflows (I need to support back button usage) so does 
anyone have any other thoughts on how this could be accomplished?  It makes 
sense to me that a conversation should be started when a @DataModel is accessed 
so that the corresponding @DataModelSelection matches up to the DataTable 
presented to the user.  If the conversation didn't begin until a row was 
selected I'd imagine the postback would start a new conversation, retrieving a 
new List via the factory method with potentially different results.  Or am I 
missing something about the conversation lifecycle again?

Thanks for your help.

-Dave



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957423#3957423

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957423
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Beginning conversations in @Factory methods

2006-07-11 Thread [EMAIL PROTECTED]
Right.

(1) conversations span redirects (a Good Thing)
(2) factory methods are called every time a variable is referenced - you can't 
really "clear" it


I would use some other solution than @Factory (eg. a page action)



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957177#3957177

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957177
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user