二维码

[教程] MAKING A FIELD VALUE AS HYPERLINK IN TABLE VIEW

Twilight发表于 2015-12-04 23:37Twilight 最后回复于 2015-12-04 23:37 [复制链接] 2597 0

Let us again go to the result view.
hyper link 1.jpg

Here we want to make , transaction ID column as a hyper link. When user clicks on any transaction id, he will navigate to the overview page, where he can see that transaction id details.

Go to the UI component and result view context node.
hyper link 2.jpg

In order make any field as a hyperlink we need to code in its P GETTER method. P stands for Property. This method is used to change the property of a field. Right click on it and choose generate P getter method. Frame work will generate p getter method . Green symbol indicates that.
hyper link 3.jpg

Double click on the method and put the following code inside the method and activate it. Here 'objectid' is an event name that will be triggered when user clicks on that hyperlink.
  1. METHOD get_p_object_id.

  2.   CASE iv_property.
  3.     WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
  4.       rv_value = cl_bsp_dlc_view_descriptor=>field_type_event_link.
  5.     WHEN if_bsp_wd_model_setter_getter=>fp_onclick.
  6.       rv_value = 'objectid'.
  7.   ENDCASE.

  8. ENDMETHOD.
复制代码

test the application. we can notice the change in the column ID. each transaction no became as an hyper link.
hyper link 4.jpg
回复

使用道具 举报

快速回帖

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

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