[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Data Transmission from Bean to Bean (ModalPopup) Problem  XML
Forum Index -> Development
Author Message
becherer

Active
[Avatar]

Joined: 28/11/2007 18:16:59
Messages: 20
Offline

hi there,

i'm actually tryin to transmit Data from a Bean(Adapter a) to another, which should be opened as ModalPopup (Adapter b)....

The Code in Adapter A looks as follows :

---------------------------------------------------------------------------
b myB = (b)getOwningDispatcher.getDispatchedBean(b.class).

Object sureNotNull = .getObject();

myB.setData(sureNotNull);


ModalPopup poppel = ModalPopup.createInstance();
poppel.open("/b.jsp", "HollaDieWaldFee", 800, 600, this);

---------------------------------------------------------------------------

The Code in Adapter B :

---------------------------------------------------------------------------
private Object o;

public String getObjectVal(){
if(o==null)
return "No Object Available";
else
return o.getVal();
}

public void setO(Object oO){
this.o = oO;
}


--------------------------------------------------------------------------

-> Effect : Popup opens, but the submitted Data is not available, as if a new Instance of b was active...

-> Getter in b checks, if the submitted Object is null and it is


any hints for me ?


thnx n bye


Olli
CaptainCasa

Power User
[Avatar]

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

Hi,

if the popup is opened inside the workpalce processing then you need to add something to the popup:

Code:
 public class DemoOpenPopup
 extends DefaultDispatchedBean
 {
 ...
 ...
 public void onOpenHelloWorld(ActionEvent ae)
 {
   IDispatcher d = getOwningDispatcher();
   m_popup = ModalPopup.createInstance();
   m_popup.open("/workplace/demohelloworld.jsp",
   "Hello World",
   800,
   600,
   new ModalPopup.IModalPopupListener()
   {
   public void reactOnPopupClosedByUser()
   {
   m_popup.close();
   }
   });
   m_popup.setContentReplaceDrillDown(d.getContentReplace());
 }
 


It's the m_popup.setContentReplaceDrillDown that has to be called. Could you please check?

Björn

Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

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

...I took the example from the docu, which I recommend to scan if you want to look inside: "Workplace Concepts, pg. 80".

Björn

Björn Müller, CaptainCasa GmbH
becherer

Active
[Avatar]

Joined: 28/11/2007 18:16:59
Messages: 20
Offline

thnx captain....

see ya

Olli
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team