As discussed in the previous tutorial, once we navigate from the search page to the overview page, we are not able to come back to the search page.
In the below screen shot, we can see that back button at top right corner is disabled. So we cannot navigate back to the search screen.
in daily work scenario, user may visit number transactions. bread crumbs will help him to visit the transactions that had already been visited by him.
Providing this feature is very important to the user. Let us do it. We need to do one line coding and rest will be taken care by WEB CLIENT FRAMEWORK.
Go the search overview set implementation class and expand the controller initialization and destruction. Right click on the method WD_DESTROY and choose redefine the method.
Add the following code to the method and activate it. DO NOT FORGET to call the super class method as shown below.
METHOD wd_destroy.
RAISE EVENT history_trigger.
CALL METHOD super->wd_destroy.
ENDMETHOD.
复制代码
Now test the application. Perform the search and go to the over view page. We can notice the back button is enabled to come back to the search page again.
TASK FOR YOU:
1. change the overview page title .
2. forward button is still disabled. In order to enable it follow the same procedure as above in the overview page implementation class. Then both back and forward buttons are enabled. Once you come back to the search page, you can again go to the over view page using forward button.
Click on it, we can navigate back to the search page.
Where is our Search View?
We can see the result view but what happened to the search view?
Answer is, we forgot to bind the search view context node to the custom controller context node. If you remember correctly, we bind the result view context node to the custom controller’s result context node. This is why data on the result view stayed. We did not bind the search view context node to any custom controller, so we lost the data. That is why we use the custom controllers. We hope now you can get clarity on custom controllers.
Let us resolve this issue now in the next chapter.
In the below screen shot, we can see that back button at top right corner is disabled. So we cannot navigate back to the search screen.
in daily work scenario, user may visit number transactions. bread crumbs will help him to visit the transactions that had already been visited by him.
Providing this feature is very important to the user. Let us do it. We need to do one line coding and rest will be taken care by WEB CLIENT FRAMEWORK.
Go the search overview set implementation class and expand the controller initialization and destruction. Right click on the method WD_DESTROY and choose redefine the method.
Add the following code to the method and activate it. DO NOT FORGET to call the super class method as shown below.
Now test the application. Perform the search and go to the over view page. We can notice the back button is enabled to come back to the search page again.
TASK FOR YOU:
1. change the overview page title .
2. forward button is still disabled. In order to enable it follow the same procedure as above in the overview page implementation class. Then both back and forward buttons are enabled. Once you come back to the search page, you can again go to the over view page using forward button.
Click on it, we can navigate back to the search page.
Where is our Search View?
We can see the result view but what happened to the search view?
Answer is, we forgot to bind the search view context node to the custom controller context node. If you remember correctly, we bind the result view context node to the custom controller’s result context node. This is why data on the result view stayed. We did not bind the search view context node to any custom controller, so we lost the data. That is why we use the custom controllers. We hope now you can get clarity on custom controllers.
Let us resolve this issue now in the next chapter.