[JBoss Seam] - Re: conversation ends unexpectedly!
by mnrz
I put some log in my code, here is the result:
this is ExportDataUtil.exportToExcel() method:
| public void exportToExcel(String filepath,Map<Class, IndexResultSet> indexResultSet,Map<IndexCategory, ColumnHeaderList<ColumnHeader>> columnHeaders) throws Exception {
| logger.debug("building Excel's sheet is in progress...");
| int rowCount = 0;
| int colCount = 0;
| int savedCurrentIndex = 1;
| int x = 0;
| logger.debug("--->>>> "+x++);
| String filename = ".xls";
|
| // Create Excel Workbook and Sheet
| HSSFWorkbook wb = new HSSFWorkbook();
| logger.debug("--->>>> "+x++);
| HSSFSheet sheet = wb.createSheet(filename);
| HSSFHeader header = sheet.getHeader();
| header.setCenter(filename);
| logger.debug("--->>>> "+x++);
| HSSFFont tahomaFont = wb.createFont();
| tahomaFont.setFontName("Tahoma");
| logger.debug("--->>>> "+x++);
|
|
and the result is:
| DEBUG building Excel's sheet is in progress...
| DEBUG --->>>> 0
| DEBUG --->>>> 1
| starting IndexSearchAction
| DEBUG destroying IndexSearchAction...
| DEBUG --->>>> 2
| DEBUG --->>>> 3
| DEBUG --->>>> 4
| DEBUG --->>>> 5
| DEBUG --->>>> 6
| DEBUG --->>>> 7
| DEBUG --->>>> 11111
| DEBUG --->>>> 22222
| DEBUG --->>>> 3333
| DEBUG --->>>> 4444
| DEBUG --->>>> 5555
| DEBUG --->>>> 6666
| DEBUG --->>>> 7777
| DEBUG --->>>> 8888
| DEBUG --->>>> 9999
| DEBUG --->>>> aaaa
| DEBUG --->>>> bbbb
| DEBUG --->>>> cccc
| INFO Export to Excel done.
| DEBUG EXCEL-END
|
as you can see, after two logs is displayed, the conversation ends, this is highlighted in green
any idea?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085858#4085858
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085858
18 years, 10 months
[JBoss Seam] - Re: Feature request regarding nested conversations
by matt.drees
Hi Jacob,
So you're not using a SMPC. I guess I tend to assume everybody uses them. :-) My bad.
So I understand more, but I'm still missing a few pieces.
"jacob.orshalick" wrote : ...Seam has taken a snapshot of my Person entity in the outer conversation on nesting (which didn't have the new addresses). The original Person instance will be reverted back to should the user back up to the original edit Person screen and submit. Seam retrieves the outer conversation by id on submit and restores the state of my Person object at the time of the snapshot which doesn't include the new addresses.
|
It seems like you're embellishing Seam's behavior a little bit. It's my understanding that when you begin a nested conversation, Seam doesn't take a snapshot, it just creates a new empty "container", and prevents you from storing new objects in the parent container. While in the nested conversation, new objects are stored in this new container, and lookups look there before looking in the parent container; there's no automatic cloning going on. And if a user backbuttons out of a nested conversation, then there's no "restoring" going on, either; the nested container is simply not there, so new objects get stored in the parent container and lookups look there first.
So, to get the behavior you're talking about, I think you'd need to manually clone the person object when starting a nested conversation. The "original state" Person would stay in the parent conversation, and the new cloned Person, which might be edited, goes in the nested conversation. I'm guessing you must be doing this cloning manually somehow to get the behavior you describe, but you speak as if it's automatic. Could you explain a little more or show some code?
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085857#4085857
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085857
18 years, 10 months
[JBoss Seam] - Re: Feature request regarding nested conversations
by baz
Very interesting thread.
i like to give a new usecase (or workflow)
We have a search screen, where the user can search for an object(e.g. an experiment)
When navigation to the show/edit screen ocurs a conversation is started and the object(the experiment) is shown.
Now the user can work with the object(the experiment)
What comes in now is a subworkflow. This workflow uses a nested conversation and could be started on any page. When this subworkflow ends, the nested conversation ends and redirection to the starting page occurs.
Now imagine that our object(experiment) consists of many parts (analysis,mtplate,samples and so on). Could it be good design to create some of this parts in a subworkflow? And if so, how can i get hold of the assembled object in my outer conversation?
This gets more complex when you are aiming to an object hierarchy
An experiment has mtplates and analyses. Now when editing an analysis, this analysis has to be associated with an mtplate. But if none exist, it must be created. After creation of the mtplate there is no connection between analysis and the created mtplate because the mtplate belongs to the experiment.
I hope you see my point.
My question is how this kind of workflows can be correctly implemented with seam and conversations? For now, it seems to me that it is nessacary to deliver results from the nested conversation to the outer conversation.
Ciao,
Carsten
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085852#4085852
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085852
18 years, 10 months