on 02-08-2010 11:48 AM
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
> 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
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
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.
>
> 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.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.