最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - sapui5 table onAfterRendering causes problems - Stack Overflow

programmeradmin3浏览0评论

While I have successfully created a simple project using the table object and the function onAfterRendering, I realized that just implementing the onAfterRendering function changes the appearance and disables some functions of the table object. The header bees misaligned with the columns, the left row selectors are bunched up and the scrollbar does not work.

I have seen this happen on any table object that I have tried. As an example, I took SAP's Fixed Columns Example from the SDK, added the onAfterRendering function with no contents and see the problem. I changed the column width to 50px or 100px which causes the problem to be more obvious.

I'm implementing the function following the placeAt statement. I'm using Eclipse Luna with SAPUI5 1.24.4.

		//Bring the table onto the UI 
		oTable2.placeAt("sample2");

 		oTable2.onAfterRendering = function(){
 		};

While I have successfully created a simple project using the table object and the function onAfterRendering, I realized that just implementing the onAfterRendering function changes the appearance and disables some functions of the table object. The header bees misaligned with the columns, the left row selectors are bunched up and the scrollbar does not work.

I have seen this happen on any table object that I have tried. As an example, I took SAP's Fixed Columns Example from the SDK, added the onAfterRendering function with no contents and see the problem. I changed the column width to 50px or 100px which causes the problem to be more obvious.

I'm implementing the function following the placeAt statement. I'm using Eclipse Luna with SAPUI5 1.24.4.

		//Bring the table onto the UI 
		oTable2.placeAt("sample2");

 		oTable2.onAfterRendering = function(){
 		};

Share Improve this question edited Feb 4, 2015 at 11:33 Manuel Richarz 1,92613 silver badges28 bronze badges asked Feb 4, 2015 at 3:46 Darrel FrittsDarrel Fritts 111 gold badge1 silver badge2 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 15

You should use the addEventDelegate method to register such functions.

oTable.addEventDelegate({
  onAfterRendering: function() {
    // ...
  }
}, this);

In your way you are overwriting the plete onAfterRendering of the control itself.

发布评论

评论列表(0)

  1. 暂无评论