on 07-08-2010 2:13 AM
Hi Experts,
I have created a pop up window that will be opened from multiple buttons in the same view. There are input fields that the data will be populated from a pop up window. How can I set up which button that a pop up window is opened from? I also would like to populate the data from a pop up window to the input field next to a clicked button. There are 6 buttons and 6 input fields that share the same pop up window. I would very appreciate your responses.
Thank you,
Don
You can also launch event from your actions buttons and catch them in the parent window.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for all of your responses.
I created a context attribute say "ButtonClicked" for example and mapped it with a controller, a parent view, and a popup view. Each button has its own action but opens the same popup view. In the wdDoInit of the popup view, I set the value of a ButtonClicked attribute according to the button that I click. For example, if I clicked on button A, I set it to "A". Then the event handler of the parent view, I check what value of "ButtonClicked" is. If ButtonClicked == "A" then populate Input field A.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try creating 2 context attributes, one in your component controller and the other in the pop-up view. Bind the attribute of pop-up view to the component controller attribute.
In the main view, on click of every button set a unique code in the controller's context which helps you in identifying the button clicked. Since u have created a binding to the pop-up view attribute the value flows from the controller.
In the init method of your pop-up view, check the value of the attribute and based on that display which ever UI elements are required.
Eg:
On Button 1 click set value "B1", Button 2 value "B2" etc. In the init() of pop-up view u can check the values and perform the required operation:
if(("B1").wdContext().currentContextElement().getButtonIdentifier()){
}
else...{
}
Hope this helps you.
Regards,
Poojith MV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.