cancel
Showing results for 
Search instead for 
Did you mean: 

Navigation Issue - popup

Former Member
0 Kudos

Hi experts,

I have two windows ,one is mainwindow and another one is popup window.

In the main window I have two views,first views action button calls the popup window. On clicking OK from popup i need to display second view of main window.

I intially created the action for the OK in main window first view but I need to validate the input in pop-up so I created the action for OK in popup view.The validation is working fine but the navigation to next is not working.

Layout : Window1-view1 --> POPUP window --> Window1-View2

Thanks & Regards,

Vicky

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

> intially created the action for the OK in main window first view but I need to validate the input in pop-up so I created the action for OK in popup view.The validation is working fine but the navigation to next is not working.

Its true, you can't fire navigation plugs from within the popup. You need to do that from the main view. Without knowing more about your application it is very difficult to say how one might restructure. Generally moving logic and even the event handler for the OK button to the component controller might be a better solution.

Former Member
0 Kudos

Thanks Thomas.

I am new to WDA. I have some mandatory fields in my popup.So I validated those fields in pop-up on OK button action and that action is in popup view.If validation is success then navigate to second view of the main window.

How to achieve this through events?

Thanks&Regards,

Vicky.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

As I said, it is difficult to redesign the flow of your application without studying it. However, is there any way you could perform the validation from the component controller method? Keep in mind that you can place view object instances into variables of the component controller. With access to the view object you could still call the Utility method to check for mandatory fields. Also you could of course have the context attributes at the component controller level (and map them to the view) if you need additional checks.

If you have your validation in a reusable method of the component controller, then it can be called from within an event handler of the main view and not the popup view. The main view can then be responsible for closing the popup and for initiating navigation to the secondary view.

Former Member
0 Kudos

This is my structure.

In my component. First view have an action button and second view to display values from popup window. On action first view 'CREATE' button I called the pop-up,the popup have some fields which are mandatory If user click OK without mandatory fields I need to display the error in popup itself, only after filling all the mandatory fields second view needs to be called with values.

All my context is in component controller.Kindly provide me with steps to achieve the navigation after validation.

Thanks & Regards,

Vicky

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>Kindly provide me with steps to achieve the navigation after validation.

I already spelled those steps out in my previous posting. Was there some aspect that you had deeper questions on?

Former Member
0 Kudos

I am new to WDA. Can you provide me any steps to use the component controller event for this? I searched in the forum by not able to achieve the same.

Thanks&Regards,

Vicky

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I'm actually not suggesting that you register the event to an event handler in the component controller. Only that you use a method from the component controller for the madatory validation. You should register the event handler for the OK button in the main view and then call this component controller method from that event handler.

Former Member
0 Kudos

The fier plug is not working for the first OK button popup click and I am receiving the following error when I click the OK button for the second "Controller for View, Window, Interface, and Configuration Cannot Be Created " .

Thanks&Regards,

Vicky

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> The fier plug is not working for the first OK button popup click and I am receiving the following error when I click the OK button for the second "Controller for View, Window, Interface, and Configuration Cannot Be Created " .

>

> Thanks&Regards,

> Vicky

Yes, I believe we have established that you can't fire the plug from the event handler of a popup window. The plug must be triggered from the main view. This is the reason for my recommendation of moving the event handler of the OK button from the popup to the main view.

Former Member
0 Kudos

But now I am registering the pop-up event in the main view and the action for the POP-UP is in main view. Even then it is throwing exception.

Where I have to specify the fier plug.It is not recongising in the component controller.

Regards,

Vicky

Edited by: Vickeee on Feb 8, 2010 4:39 PM

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Are you closing the popup before executing the navigation plug from the main view? Have you tried to fired the same navigation plug from the main view directly (with any popup) to make sure the plug is working correctly?

Answers (0)