SAPUI5 Routing - Difference between controlId and targetControl

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-25 08:47:07

问题


In my routing configuration I can either set the property "controlId" or "targetControl" to specify the ID of the control where I want to put my new view. The only difference I figured out so far is that it seems that "controlId" has a higher priority. Means: If I specify both controlId is used.

Despite that, is there any difference between these keys or are they synonyms? The same goes for "targetAggregation" and "controlAggregation"?

I've read a lot of SAP documentation but I couldn't find a page where every parameter is explained and especially I wasn't able to find the answer for this question.


回答1:


The documentation states targetControl and targetAggregation as deprecated since 1.28.

In the sourcecode you can find some places where the pre 1.28 route configs are converted to the new route config including targets, which were introduced at that version. That might explain the naming: targetControl and targetAggregation have there origin a time where there was no separate target configuration object but everything was defined within the route.

You can find the available parameters more or less explained in the developer guide: overview and more details on parameters here.



来源:https://stackoverflow.com/questions/39489463/sapui5-routing-difference-between-controlid-and-targetcontrol

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!