[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Refresh WorkplaceFunctionTree  XML
Forum Index -> Development
Author Message
mreich

Power User
[Avatar]

Joined: 30/01/2009 08:34:23
Messages: 750
Offline

Hi,

is there a possibility to manually rebuild the a function tree?
I already tried to recall the loadFunctionTree() method of the tree, this seems to work, but the changes (new nodes) doesn't show up in the UI?

regards
Markus
[WWW]
CaptainCasa

Power User
[Avatar]

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

Hmmm,

changing the function tree is reflected in the workplace...

Do you use some optimization features like..

Code:
         ((WorkpageContainer)getWorkpageContainer()).setUpdateOnInnerEventOnly(true);
 
 or 
 
 ROWINCLUDE-UPDATEONINNEREVENTS
 (e.g. inside your workplace.jsp page - maybe you copied from the demo workplace?)
 


If so: call ThradData.getInstance() and then the following method:
Code:
     /**
      * Included pages (ROWINCLUDE usage) may only be updated if an event occurred
      * within the scope of the page (attribute ROWINCLUDE-UPDATEONINNEREVENTONLY).
      * By calling this method you define that all areas will be checked for updates
      * within the current event processing.
      */
     public void registerChangeUpdatingAllAreas()
     {
         m_updateAll = true;        
     }
 


Björn

Björn Müller, CaptainCasa GmbH
mreich

Power User
[Avatar]

Joined: 30/01/2009 08:34:23
Messages: 750
Offline

ok, I checked my sources, the coding you mentioned is not implemented, by the way I tried the your coding, but without an effect.
I use the function tree inside of an outlook menu, could this be a cause?
Should I upload the relevant sources?

regards
Markus
[WWW]
CaptainCasa

Power User
[Avatar]

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

...yesss!
Björn

Björn Müller, CaptainCasa GmbH
mreich

Power User
[Avatar]

Joined: 30/01/2009 08:34:23
Messages: 750
Offline

ok, I have an own impl. for a function tree (WPFunctioTreeCoach), this is wrapped in an outlook menu (workplace.jsp).
I want to reload the tree in bean PersonDetailUI (public void postSave)

Markus
 Filename sources.zip [Disk] Download
 Description
 Filesize 11 Kbytes
 Downloaded:  338 time(s)

[WWW]
CaptainCasa

Power User
[Avatar]

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

...the function reloadTree() that is called in postSave() is implemented in some parent class, e.g. AEntityDetailUI or higher. Could you attach this one as well? Thanks!

Björn

Björn Müller, CaptainCasa GmbH
mreich

Power User
[Avatar]

Joined: 30/01/2009 08:34:23
Messages: 750
Offline

oh, yes sorry

Code:
	public void reloadFunctionTree(Constants.Role role) {
 		switch(role) {
 		case ADMIN:
 			((WPFunctionTreeAdmin)getOwningDispatcher().getDispatchedBean(WPFunctionTreeAdmin.class)).reload();
 			break;
 		case ATHLETE:
 			((WPFunctionTreeAthlet)getOwningDispatcher().getDispatchedBean(WPFunctionTreeAthlet.class)).reload();
 			break;
 		case COACH:
 			((WPFunctionTreeCoach)getOwningDispatcher().getDispatchedBean(WPFunctionTreeCoach.class)).reload();
 			break;
 		case SCOUTER:
 			((WPFunctionTreeScouter)getOwningDispatcher().getDispatchedBean(WPFunctionTreeScouter.class)).reload();
 			break;
 		}
 		ThreadData.getInstance().registerChangeUpdatingAllAreas();
 	}
[WWW]
CaptainCasa

Power User
[Avatar]

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

Hi,

now (I believe) I know what the background is:

You try to access from a "workpage-content"-bean the WPFunction tree object - and you are on different dispatcher levels:

the wokrpage content is on "sub-dispatcher-level": e.g. #{d.d_1.XXX}, so if XXX asks for its dispatcher then you get #{d.d_1]. This is the isolation of the workplace management, d_1 is the disptacher (object factory) that isolates the objects against dispatchers in neighbout workpages (#{d.d_2} etc.).

The workplace management is done on top-dispatcher level: "#{d}".

So, instead of going to getOwningDispatcher(), you need to go to getOwningDispatcher().getTopOwner() => then you receive the #{d} one.

Probability that this response will hit the problem is close to 100% ;-)

Björn

Björn Müller, CaptainCasa GmbH
mreich

Power User
[Avatar]

Joined: 30/01/2009 08:34:23
Messages: 750
Offline

perfect, this solved my problem, thank you
[WWW]
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team