[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Dispatcher.getDispatchedBean(Class) returns another instance as the ui use  XML
Forum Index -> Development
Author Message
wocher

Power User
[Avatar]

Joined: 14/04/2008 13:10:19
Messages: 49
Location: Ravensburg
Offline

Hello Björn,

by the use of disp.getDispatchedBean(c); a another class will bring back as the ui use to show the popup.
So the .setValueSelectionListener() do "nothing" then the user select one entry in the ui popup ( NullPointer by the listener )

Greet Wocher



Source:
Class c = Class.forName(className);
Object o = disp.getDispatchedBean(c);
if (o instanceof IValueSelectionProvider) {
((IValueSelectionProvider) o)
.setValueSelectionListener(this);
}
// optics
String popupPageName = "/" + m_propertyName + "SuchePopup.jsp";
m_popup = ModalPopup.createInstance();
IModalPopupListener l = new IModalPopupListener() {
/**
* Innere anonyme Klasse um auf das X eine Funktion zu
* legen.
*/
public void reactOnPopupClosedByUser() {
m_popup.close();
}
};
m_popup.open(popupPageName, "Search for " + m_propertyName, 400, 300, l);

„Ein Haus ohne Bücher ist arm, auch wenn schöne Teppiche seinen Boden und kostbare Tapeten und Bilder die Wände bedecken.“
Hermann Hesse, Dichter, Schriftsteller und Maler * 02. 07. 1877 - Calw † 09. 08. 1962 - Montagnola, Schweiz

Rainer Wocher Quentia Development GmbH (Sotware Developer)
[ICQ]
CaptainCasa

Power User
[Avatar]

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

...pls pay attention when using Popups with dispatcher: you need to set the contentreplacedrilldown... Please check the wokrplace examples in the Demo Workpalce. Otherwise the popup will refer to the main dispatcher, while you want the popup to refer to your current dispatcher.

Hope this helps...

Björn

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