I have a two taskflows, taskflow A with page fragment(.jsff) as view and taskflow B with a page(.jspx). Both of them are bounded. Is it possible to open that page (taskflow B) from any action occurred in the view of taskflow A?
Here is my situation. I have a bounded taskflow album-task-flow.xml. It has two view album-list.jsff and album-details.jsff. It is possible to swap these view. This taskflow has been added to a page within af:region.
The view album-details.xml has images. Beside each image I have a link. On clicking that link I have to display that image in a new tab and have to open the browser's print option dialog.
How can I achieve this functionality?
I created album.jspx:
In this page by the region "albumrg" I have added a task-flow album-task-flow. This album-task-flow has two page fragments added as the view:
From this code we can see there are two views: album-list and album-details, and a managed bean album has been defined. Also it has two control flow rules. These rules are used to navigate or swap the views album-list and album-details.
Album list contain list of album. This is a model created based on data coming from UCM. This is not the part of the topic I think. Each Album item has a commandLink by which it can takes into the Detail view. The Detail view consists of thumbnails of the images of that particulate album.
I not giving the code of these two page fragment. The only thing is needed is the commandLink resides below each image thumbnail, and on-clicking that link it will open a new tab or window. The page of the newly opened tab will have only the enlarged or original image of that thumbnail. Also when this tab will open at that moment the print dialog of the browser must be opened to print that page. I think I made you able to understand my requirement.
Here is the code for that commandLink and also my solution:
The image thumbnails are encapsulated into a data structure of List>.
Now I made another taskflow. This is the taskflow B, that is album-printtask-flow.
From the code we can see this taskflow has a jspx page, i.e., album-detail-print.jspx as its default view and also has a managed bean with name albumPrint.
What I need is to open this taskflow in a new tab. So from the actionListener of the aforesaid commandLink I did this:
And this is opening that album-detail-print.jspx in a new tab. The following code is from album-detail-print.jspx:
In this is the AlbumPrintManagedBean: