Author |
Message |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 06/11/2009 16:34:28
|
mreich
Power User
![[Avatar]](/forum/images/avatar/093f65e080a295f8076b1c5722a46aa2.jpg)
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
|
|
![](/forum/templates/default/images/spacer.gif) |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 06/11/2009 16:52:51
|
CaptainCasa
Power User
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.jpg)
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 |
|
![](/forum/templates/default/images/spacer.gif) |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 06/11/2009 18:11:48
|
mreich
Power User
![[Avatar]](/forum/images/avatar/093f65e080a295f8076b1c5722a46aa2.jpg)
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
|
|
![](/forum/templates/default/images/spacer.gif) |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 06/11/2009 18:18:12
|
CaptainCasa
Power User
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.jpg)
Joined: 21/11/2007 12:23:06
Messages: 5538
Offline
|
...yesss!
Björn
|
Björn Müller, CaptainCasa GmbH |
|
![](/forum/templates/default/images/spacer.gif) |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 06/11/2009 18:34:41
|
mreich
Power User
![[Avatar]](/forum/images/avatar/093f65e080a295f8076b1c5722a46aa2.jpg)
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 |
Download
|
Description |
|
Filesize |
11 Kbytes
|
Downloaded: |
338 time(s) |
|
|
![](/forum/templates/default/images/spacer.gif) |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 06/11/2009 19:02:01
|
CaptainCasa
Power User
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.jpg)
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 |
|
![](/forum/templates/default/images/spacer.gif) |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 07/11/2009 10:10:17
|
mreich
Power User
![[Avatar]](/forum/images/avatar/093f65e080a295f8076b1c5722a46aa2.jpg)
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();
}
|
|
![](/forum/templates/default/images/spacer.gif) |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 07/11/2009 10:59:07
|
CaptainCasa
Power User
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.jpg)
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 |
|
![](/forum/templates/default/images/spacer.gif) |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 07/11/2009 12:05:47
|
mreich
Power User
![[Avatar]](/forum/images/avatar/093f65e080a295f8076b1c5722a46aa2.jpg)
Joined: 30/01/2009 08:34:23
Messages: 750
Offline
|
perfect, this solved my problem, thank you
|
|
![](/forum/templates/default/images/spacer.gif) |
|