cancel
Showing results for 
Search instead for 
Did you mean: 

Need Help !!!

Former Member
0 Kudos

Hi WD Gurus,

Well I am very much new to WD and I am stuck with a issue. I hope you guys can hep me out. This is the scenario

I have two windows, Window A (having iViewA) and Window B (having iViewB).

iViewA calls a popup iViewB. I do some search within iViewB which returns me a integer value. I select a value from table. I need to pass this value of iViewB to iViewA and populate input field in iViewA.

Can someone guide me as how can I achive this? Any pointers/sample code would be very handy.

Thanks and Regards,

Vivek

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hello Vivek,

1. In your controller(custom/Component) create a value attribute of type integer.

2. You need to map this attribute to your Views namely A and B. In the view A map this attribute to your Input field directly or you can SET that value explicitly in the view A.

3. Since there is a mapping between all the views and the controller, the value flows automatically between them. So when you set value either in View A,B or the controller, the same value is available across them.

4. So now in your view B you need to set the value for the attribute that you have created and then destroy the window B.

5. Once you destroy the window, you will be able to see your View A and the value will be available in the input field in View A.

Regards,

Aditya

Message was edited by:

Armin Reichert

Former Member
0 Kudos

Hi Guys,

Thank you very much for the quick response. I've done the things accordingly.

~Cheers,

Vivek

Former Member
0 Kudos

Hi Vivek,

Please follow the steps given below.

1. Open the component controller and in the context create a value attribute of type integer.

2. In the diagram view map this value attribute to both the views.

3. Now in view 2 set the value which is selected to this value attribute.

wdContext.currentContextElement.setXXX(value you want to return);

4. Since it is mapped to view1 also we can directly access the value from view1.

wdContext.currentContextElement.getXXX();

Thanks,

Suvarna

Message was edited by:

suvarna chittoor

Message was edited by:

Armin Reichert

Former Member
0 Kudos

Hi Vivek,

Assume you have created a value attribute of type integer name value in your Controller.

Bind this same attribute to both view1 as well as view2.

In view2 set it value as wdContext.currentContextElement90.setValue(<value that you want to return>);

Now in view1 you can get this value as wdContext.currentContextElement().getValue();

Regards,

Murtuza

Former Member
0 Kudos

Hi Vivek

As you are opening a popup window

1) Create a Value Attribute of Type <i>Integer</i> and pass your return value to that like

int i = .. //your return value

wdContext.currentXXElement.setXX(i)

2) copy this iViewB's context value attribute to the iViewA's context

3) you can use the iViewB's values directly using

int k;

k=wdContext.current<>B<>Element.getB() //return value of iviewb

4) you can use the <i>k</i> value direclty in view A

Regards

Chaitanya.A