二维码

[教程] BREAD CRUMBS

Twilight发表于 2015-12-05 00:34Twilight 最后回复于 2015-12-05 00:34 [复制链接] 2846 0

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.
back 1.jpg

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.
BREAD CRUMBS 2.jpg

Add the following code to the method and activate it. DO NOT FORGET to call the super class method as shown below.
  1. METHOD wd_destroy.

  2.   RAISE EVENT history_trigger.
  3.   CALL METHOD super->wd_destroy.

  4. 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.
back 2.jpg

Click on it, we can navigate back to the search page.
back 3.jpg

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.
回复

使用道具 举报

快速回帖

本版积分规则
您需要登录后才可以回帖 登录 | 注册有礼

快速回复 返回顶部 返回列表