+1 This should be available on wiki. Thanks & Regards -- Pranay Pandey On Mar 27, 2009, at 2:01 AM, Jacques Le Roux wrote:
Thanks for the clear explanation Hans! Maybe we could write something in the wiki about all that?Jacques From: "Hans Bakker" <mailingl...@antwebsystems.com>In the development of the mypage/myportal component I ran into a problem where i needed to show a screen (view) from different places and be ableto return to the place it was called from.In the past we did that with "donePage" variables which was a bit messy. We discussed this in the mailing list and David came up with a solutionto this problem which will save a lot of screen/form code. how does it work?In the controller.xml it is now possible to save the last view displayedand return to it at a later stage. In the <response tag a parameter is added: 'save-last-view' <response name="success" type="view" value="justAView" save-last-view="true"/>This will save the view that WAS displayed, not the one that is going tobe displayed. Then later on it is possible to override a view with this saved view with <response name="success" type="view-last" value="justAView/> This is working pretty good, however when i was using it in the new portal functions i found the following problems:1. it is only possible to store the last view, not the one that is goingthe be displayed. If there was a 'lookup' view after the 'real' last one, that lookup got saved. So there is a need to save the 'current' view2. sometimes you want to be able to save 2 views. A 'current' view and a 'home' view. An example is the portal page, create an email, add a role(return to email) , send the email (return to portal page=home) so i extended the implementation from David with the following tag extensions using the same pattern as the 'view-last/save-last-view': save-last-view save-current-view save-home-view view-Last view-home This is all committed with a number of other changes in revision: 758522. regards, Hans -- Antwebsystems.com: Quality OFBiz services for competitive rates
smime.p7s
Description: S/MIME cryptographic signature