Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ve-dev] How can i get the visual component's remote BeanProxy in ve's viewer?

I am write myowner ve's viewers.

In the viewer, according the visual editor, firstly,i get
IJavaInstanceObject all of a visual beans. It worked correctly.

Then, i get  BeanProxy according the IJavaInstanceObject.

If i open the visual editor at first, open my viewer at second, it can work
correctly.

But if i open my viewer at first, open visual editor at second,sometimes it
can work correctly,sometimes it cannot work.

The related source is as followed.
 .....
 private void getBeanProxyFromJavaInstance(JavaObjectInstance joi,EditDomain
ed){

   //get proxy according the JavaObjectInstance
   //**Step1
   IBeanProxy proxy=BeanProxyUtilities.getBeanProxy(joi);
   if(proxy==null){
    continue;
   }
   ...
   //get value from the proxy.
   //**Step2
   IBeanProxy
isp=(IBeanProxy)BeanProxyUtilities.invoke(proxy,"MethodNameOfGetMethod");
   ...

 }
 .....

At Step1 and Step2 ,the value  returned sometimes was null .(Not always)

But ,if  debugged  this part of source, it always worked correctly.

I think the time I get the beanProxy is wrong.

The beanProxy should be got after some flag. Or the beanProxy should be got
in some listener according the visaul editor.

Can anyone help me?

Thanks.




Back to the top