{"id":5584,"date":"2016-05-18T15:59:32","date_gmt":"2016-05-18T12:59:32","guid":{"rendered":"http:\/\/www.karadere.com\/blog\/?p=5584"},"modified":"2016-06-09T11:17:37","modified_gmt":"2016-06-09T08:17:37","slug":"sap-html5-open-ui5-fiori-row-repeater-image-link-event-press-function","status":"publish","type":"post","link":"https:\/\/www.karadere.com\/blog\/sap-html5-open-ui5-fiori-row-repeater-image-link-event-press-function.html","title":{"rendered":"SAP HTML5 Open UI5 Fiori row repeater image link event press function"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"http:\/\/www.karadere.com\/blog\/uploads\/\/2010\/02\/sap-abap-logo.png\" width=\"230\" height=\"121\" \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"http:\/\/openui5.org\/images\/OpenUI5_new_big_side.png\" width=\"288\" height=\"75\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&lt;html&gt;<br \/>\n&lt;head&gt;<br \/>\n&lt;meta http-equiv=\u201dX-UA-Compatible\u201d content=\u201dIE=edge\u201d \/&gt;<br \/>\n&lt;meta http-equiv=\u201dContent-Type\u201d content=\u201dtext\/html;charset=UTF-8\u2033\/&gt;<\/p>\n<p>&lt;script src=\u201dhttps:\/\/sapui5.hana.ondemand.com\/resources\/sap-ui-core.js\u201d<br \/>\nid=\u201dsap-ui-bootstrap\u201d<br \/>\ndata-sap-ui-libs=\u201dsap.m,sap.ui.layout,sap.ui.commons\u201d<br \/>\ndata-sap-ui-theme=\u201dsap_bluecrystal\u201d<br \/>\ntype=\u201dtext\/javascript\u201d&gt;<br \/>\n&lt;\/script&gt;<\/p>\n<p>&lt;\/head&gt;<br \/>\n&lt;body class=\u201dsapUiBody\u201d&gt;<br \/>\n&lt;div id=\u201duiArea\u2033&gt;&lt;\/div&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<\/p>\n<p>&lt;script&gt;<\/p>\n<p>var aData = [<br \/>\n{name: \u201cTest one\u201d,surname:\u201d11111\u2033},<br \/>\n{name: \u201cAnother test\u201d,surname:\u201d2222\u2033},<br \/>\n{name: \u201ctest\u201d,surname:\u201d333333333\u2033},<br \/>\n{name: \u201cfourth\u201d,surname:\u201d444444\u2033},<br \/>\n{name: \u201cfifth\u201d,surname:\u201d5555\u2033},<\/p>\n<p>];<\/p>\n<p>var oTable = new sap.ui.table.Table({<br \/>\neditable: false,<br \/>\ncolumns: [<br \/>\nnew sap.ui.table.Column({<br \/>\ntemplate: new sap.ui.commons.Link({<br \/>\ntext: \u201c{name}\u201d,<\/p>\n<p>press : function(e) {<br \/>\nvar model = this.getModel();<br \/>\nvar path = e.getSource().getBindingContext().getPath();<br \/>\nvar obj = model.getProperty(path);<\/p>\n<p>console.log(obj.surname);<br \/>\nalert(obj.surname);<br \/>\n}<\/p>\n<p>})<br \/>\n}),<br \/>\nnew sap.ui.table.Column({<br \/>\ntemplate:new sap.ui.commons.Link({<br \/>\ntext: \u201c{surname}\u201d,<\/p>\n<p>})<br \/>\n})<br \/>\n]<br \/>\n});<br \/>\noTable.placeAt(\u201cuiArea\u201d);<\/p>\n<p>var oModel = new sap.ui.model.json.JSONModel();<br \/>\noModel.setData(aData);<br \/>\noTable.setModel(oModel);<br \/>\noTable.bindRows(\u201c\/\u201d);<\/p>\n<p>var oButton = new sap.ui.commons.Button({<br \/>\ntext: \u201cTestButton\u201d,<br \/>\npress: function() {<br \/>\nconsole.log(\u201c\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014-\u201c);<br \/>\nconsole.log(\u201cIndices: \u201d + oTable.getSelectedIndices());<br \/>\nvar rows = oTable.getRows();<br \/>\nconsole.log(\u201cRows: \u201d + rows.length);<br \/>\nfor (var i = 0; i &lt; rows.length; i++) {<br \/>\n\/\/ console.log(rows[i].getCells()[0].mProperties.text);<br \/>\n}<br \/>\n}<br \/>\n});<\/p>\n<p>oButton.placeAt(&#8220;uiArea&#8221;);<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv=\u201dX-UA-Compatible\u201d content=\u201dIE=edge\u201d \/&gt; &lt;meta http-equiv=\u201dContent-Type\u201d content=\u201dtext\/html;charset=UTF-8\u2033\/&gt; &lt;script src=\u201dhttps:\/\/sapui5.hana.ondemand.com\/resources\/sap-ui-core.js\u201d id=\u201dsap-ui-bootstrap\u201d data-sap-ui-libs=\u201dsap.m,sap.ui.layout,sap.ui.commons\u201d data-sap-ui-theme=\u201dsap_bluecrystal\u201d type=\u201dtext\/javascript\u201d&gt; &lt;\/script&gt; &lt;\/head&gt; &lt;body class=\u201dsapUiBody\u201d&gt; &lt;div id=\u201duiArea\u2033&gt;&lt;\/div&gt; &lt;\/body&gt; &lt;\/html&gt; &lt;script&gt; var aData = [ {name: \u201cTest one\u201d,surname:\u201d11111\u2033}, {name: \u201cAnother test\u201d,surname:\u201d2222\u2033}, {name: \u201ctest\u201d,surname:\u201d333333333\u2033}, {name: \u201cfourth\u201d,surname:\u201d444444\u2033}, {name: \u201cfifth\u201d,surname:\u201d5555\u2033}, ]; var oTable = new sap.ui.table.Table({ editable: false, columns: [ new sap.ui.table.Column({ template: new [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[2],"tags":[948,2548,1837,2546,2141],"class_list":["post-5584","post","type-post","status-publish","format-standard","hentry","category-2015-2016","tag-fiori-2","tag-row-repeater","tag-sap","tag-sapui5","tag-ui5","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"aioseo_notices":[],"views":1174,"_links":{"self":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts\/5584","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/comments?post=5584"}],"version-history":[{"count":3,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts\/5584\/revisions"}],"predecessor-version":[{"id":5673,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts\/5584\/revisions\/5673"}],"wp:attachment":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/media?parent=5584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/categories?post=5584"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/tags?post=5584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}