on 08-02-2006 11:41 AM
Hi.
The scenario is:
I have two views related using plugs.
first view has a table with set of records(for ex: name, empid, dept)
second view has text fields to be entered for all the above mentioned fields (name, empid, dept).
This view has 2 buttons, save and cancel.
If i click save button it saves the record and add the record to the table.
If i click cancel button, it shows me the table (first view).
I have written code in view1, wdDoInit( ) method to call a method X which gets data to be filled in the table.
In view 2 while save is clicked im calling the same method X. which adds new row and populates the table.
The problem comes here.
when I click cancel button, it shows me the view1 with table as empty. since im calling the method in wdDoInit() to populate the table.
when the cancel button is pressed it is not going to init method again. Im not sure how to proceed
Can anyone help me on this issue.
Regards
Bala
I guess the collection is still not empty . You might try to rebind the collection back to that context. Maybe write a action to a plug fired from View 2 to view 1.
Regards,
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Instead of writing your code in the wdDoInit()-method, make a private method eg. setData() where your write your code in.
in the wdDoInit() call this method with this.setData().
On the plug-method where you entered the view again you can call this method again with this.setData();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Init method will be called only once, after that it wont be called.
So write the code somewhere in onplug method
Regards,
Vijayakhanna Raman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.