on 06-22-2009 8:04 AM
Hi all,
I have the following scenario:
I call RFC to fill a table rows with data and for each row there is an approve button. when i click the button on the table it dispalys a popup confirmation dialog. Then, when I click OK, the row on the table should be removed from the table as the element has been approved. but in my case, the row is still there when i click OK on the confirmation popup.
so, how i can refresh the table with the latest data from the rfc?
appreciate your help!
thanks,
Hi,
use the below code to remove the selected element.
wdContext.node<Table Data Source Node Name>().removeElement(wdContext.node<Table Data Source Node Name>().get<Table Data Source Node Name>ElementAt(wdContext.node<Table Data Source Node Name>().getLeadSelection()));
Regards,
Ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rami,
To refresh table data you can do one more thing i.e. restart the application again and this will be achieved by using IWDPageService.
try {
IWDPageService pageService = (IWDPageService)WDPortalUtils.getService(WDPortalServiceType.PAGE_SERVICE);
pageService.restartApplication();
} catch (Exception e) {
// TODO: handle exception
wdComponentAPI.getMessageManager().reportException(e.getMessage(),true);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
Before writing these 2 lines of code,
wdThis.wdTestCompController().executeRFC().
wdThis.wdTestCompController().populateDataFromBackend()
you can also invalidate the node.For that write the foll code
wdContext.wdTestCompController().invalidate();
These will help in refreshing the node. Write this piece of code before the 2 lines written above.
Thanks
V S Shetty
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
On implementation of the action Ok, after the code written for approving the data , you need to call the method from component controller to execute the RFC again and then populate the table again. This will serve the purpose.
A fine approach will be :
Create a method (say X) which calls the method from component controller to execute the RFC and then populate the table node.
Call the above method(X) initially.
Also call the method()X after the data is approved that is in the implementation of the action OK.
Regards.
Rajat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
For example you have a method for rfc execute like executeRFC() and another method populateDataFromBackend() for populating backend data into the node binded to table.
After OK button click in the same event handler execute the RFC model again and populate the backend data into the node binded to table again as below.
wdThis.wdTestCompController().executeRFC()// I think already you are doing this.
wdThis.wdTestCompController().populateDataFromBackend()// this you need to invoke again
Regards,
Charan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
After the confirmation dialog box coding in the onActionApprove method (which is called on click of approve button), you should write some code lines to remove the row from table (node element from table node).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.