[JBoss Seam] - Re: Seam Conversations - Best practices?
by pete.muirï¼ jboss.org
"Delphi's Ghost" wrote : I did try to seam-gen up an application using my dummy dev database (Projects, and Issues per project), and it simply created pages to list, view and edit the projects or issues. I'm not sure whether it was supposed to pick up on the foreign key and list the issues per project or not, but it didn't work with either Seam 1.2.1 or 1.3 Alpha (I'm using mySQL for test dev work).
No, I don't think it does this, though it could be a nice extension.
anonymous wrote : So, with that in mind, I'm not quite sure what you mean by nesting CRUDs, but does it handle sharing the persistence contexts between multiple nested conversations and only flushing the item you are editing?
Normally, you would have a (SM)PC associated with the outer conversation, which would then be used by nested conversations. If you want to only flush certain changes, then you *don't* want to share the PCs.
anonymous wrote : Based on the docs and my experiences, nested conversations are about providing multiple continuation points within the same conversation as opposed to having the same amount of work in just one conversation.
| Nesting is fine for browsing (i.e. breadcrumbs), but it seems that only one editing page can be involved in one conversation at a time when the flushMode is manual.
I sort of follow what you are saying. If you have one SMPC, then when you flush it *any* changes made to entities loaded with it will be saved.
anonymous wrote : I'm trying out a single conversation view page with the edit Widget page, and the Widget subDetail editing taking place in new separate top level conversations without any nesting involved. This way, the user can open editors in new windows, or tabs, without any dire consequences. I pass the Ids to the urls in an slink with a propagation of none, and the links are bookmarkeable.
That sounds sensible, and sort of what I was trying to say earlier (well, what I meant to say at least).
anonymous wrote : Part of the reason for this was the lack of an immediately obvious way to click on a subDetail item to edit it which would then POST my changes to the currently edited widget , start a new conversation for the subDetail editor, and pass over some kind of value from the old conversation indicating which subDetail I am supposed to be editing. The s:link with propagation and a param does all that, except for the POST, hence it is being launched from a view only page.
|
| It feels like the only option left, but at the same time, it feels like I'm only using a fraction of the power of Seam to do master/detail editing which is the bread and butter of software development. (Generate CRUD which is a close second is something Seam excels at). Alternatively, I could be using it exactly in the right way it was designed to be used for this particular scenario. It's hard to tell without any kind of standard best practices of how to use the different elements within seam. The examples highlight particular parts of the framework as opposed to demonstrating how to use them all together.
|
Yes, this is a pattern that isn't quite down yet! I'll mull it over ;)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057143#4057143
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057143
18Â years, 10Â months
[JBoss Seam] - Suggestion <page component=
by sergeypk
I think it would be a nice addition to the page actions mechanism if it was possible to specify that a certain component is to be instantiated when the page is visited, unless the component already exists. This would allow me to put some initialization code for a page into that component's @Create method and outject variables that the page would then display.
On subsequent requests the creation code would not be executed since the component would exist already.
Depending on the component's scope, it would either get recreated every time the user revisits the page, or only once per conversation.
This is currently achievable by specifying an empty method of the component as the page action, but I think it would be nicer if I this was supported directly.
Does this sound reasonable or am I talking nonsense?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057133#4057133
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057133
18Â years, 10Â months