[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
setOpenMultipleInstances(true) - scenario: Inform workpage about workpage creating it  XML
Forum Index -> Development
Author Message
unger

Power User

Joined: 22/07/2008 05:19:28
Messages: 261
Offline

Dear Captain,

in a MultipleInstances - workplace - scenario, which ID can be used for a newly created workpage to inform about the creator?

We want give back information from the created workpage (only) to the creator.

Something like param 'wid':
Code:
 IWorkpageDispatcher wpd = (IWorkpageDispatcher) getOwningDispatcher().getTopOwner();
 			IWorkpageContainer wpc = getWorkpageContainer();
 			WorkpageStartInfo wpsi = new WorkpageStartInfo();
 			wpsi.setJspPage(EclntConstants.REL_JSP_PATH + EclntConstants.JSP_AUFTRAG_DATEN);
 			wpsi.setId(EclntConstants.WORKPAGE_ID);
 			wpsi.setText("Auftragsdaten");
 			wpsi.setOpenMultipleInstances(false);
 			wpsi.setDecorated(false);
 			wpsi.setImage("/images/workplaceicons/application_form_edit.png");
 			wpsi.setOpenAsPopupByDefault(true);
 
 			if (withData && selectedItem != null) {
 				wpsi.setParam("aid", "" + selectedItem.getAuftragId());
 				wpsi.setParam("asid", "" + selectedItem.getAuftragsschrittId());
 				wpsi.setParam("asrid", "" + selectedItem.getAuftragsschrittRessourceId());
 				wpsi.setParam("wid", getWorkpage().getId());
 			}
 			workpage = WorkpageStarterFactory.getWorkpageStarter().startWorkpage(wpd, wpc, wpsi);
 


But wid is only the JSP name.

Regards,
Joachim
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5520
Offline

Hi,

in principal we like the approach that workpages are quite isolated from one another - and they are startable by simple string-configuration (WorkpageStartInfo can be XML-ed as string). If workpages want to update one another then the preferred way is to do so by workpage-messaging.

What we do not "totally" like is that one workpage e.g. directly knows its caller by pointer instance. THen there is a modularization problem on the one hand and a garbage collection problem on the other hand (e.g. if calling workpage is closed).

Please take a look at workplace eventing.

Thanks! Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team