<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Pooja Khandhadia on Medium]]></title>
        <description><![CDATA[Stories by Pooja Khandhadia on Medium]]></description>
        <link>https://medium.com/@pooja.khandhadia.pk?source=rss-1d506ce7af0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*8B7jFXec405KE1Xpe23unw.jpeg</url>
            <title>Stories by Pooja Khandhadia on Medium</title>
            <link>https://medium.com/@pooja.khandhadia.pk?source=rss-1d506ce7af0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 01:48:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pooja.khandhadia.pk/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to deselect checkbox in SAP UI5 table.]]></title>
            <link>https://medium.com/@pooja.khandhadia.pk/how-to-deselect-checkbox-in-sap-ui5-table-3519baf5a919?source=rss-1d506ce7af0------2</link>
            <guid isPermaLink="false">https://medium.com/p/3519baf5a919</guid>
            <category><![CDATA[ui5]]></category>
            <category><![CDATA[sapui5]]></category>
            <category><![CDATA[json]]></category>
            <dc:creator><![CDATA[Pooja Khandhadia]]></dc:creator>
            <pubDate>Fri, 14 Sep 2018 10:18:42 GMT</pubDate>
            <atom:updated>2018-09-17T06:21:02.651Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello folks,</p><p>In one of my app I was using sap.m.Table. This table has checkbox to select a particular row. On a click of a button after some functionality I wanted to deselect all the selected checkbox. I found this as a simple solution to do it, hope it helps you too.</p><p>In this blog I have explained on how to deselect on the press of a button but this method can also be used on any other events like on navigating to different views or on completing some backend activities the checkbox is deselected.</p><p>The xml code will be like:</p><pre>&lt;Table id=”idChartTable”<br> <strong><em>mode=</em></strong><em>”</em><strong><em>MultiSelect</em></strong><em>”</em><br> inset=”false” <br> items=”{ <br> path: ‘oModel&gt;/’<br> }”<br> selectionChange=”onTableSelection”&gt;<br>   &lt;headerToolbar&gt;<br>     &lt;Toolbar&gt;<br>        &lt;Button id=&quot;<strong>idBtn</strong>&quot; text=&quot;Terminate&quot;  <strong>press=&quot;onTerminate&quot;</strong>/&gt;<br>     &lt;/Toolbar&gt;<br>   &lt;/headerToolbar&gt;</pre><pre>   &lt;columns&gt;<br>       &lt;Column minScreenWidth=&quot;Tablet&quot; id=&quot;idInstanceId&quot;&gt;<br>        &lt;Text text=&quot;Instance Id&quot;/&gt;<br>       &lt;/Column&gt;<br>       &lt;Column minScreenWidth=&quot;Tablet&quot;&gt;<br>        &lt;Text text=&quot;Subject&quot;/&gt;<br>       &lt;/Column&gt;<br>       ...<br>   &lt;/columns&gt;<br>      <br>   &lt;items&gt;<br>    &lt;ColumnListItem  class=&quot;listitemclass&quot;&gt;<br>      &lt;cells&gt;<br>       &lt;Text text=&quot;{oModel2&gt;id}&quot;/&gt;<br>      &lt;/cells&gt;<br>      &lt;cells&gt;<br>       &lt;Text text=&quot;{oModel2&gt;subject}&quot;/&gt;<br>      &lt;/cells&gt;<br>        ...<br>    &lt;/ColumnListItem&gt;<br>  &lt;/items&gt;<br>&lt;/Table&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oCbczSODD_jOVrDClZ9pYA.png" /></figure><p>The parameter <strong>mode=”MultiSelect”</strong> adds the checkbox, we don’t need to code anything more for it.</p><p>Now suppose onclick of button whose onPress event is <strong>onTerminate </strong>following things should happen:<br>i) ajax call : Calls the api from which data is fetched in the table and terminate the instance in the backend.<br>ii) Show a message as the instance is terminated.<br>iii) Deselect the terminated rows.</p><p>Controller code:</p><pre>onTerminate: function(oEvent){<br>  var oTable = this.getView().byId(&quot;idChartTable&quot;);<br>  var oContext = oTable.getSelectedContexts();<br>  var workInstanceId = [];<br>  var i = 0;<br>  var that = this;<br>  oContext.forEach(function(oContextItem){<br>    workInstanceId.push(oContextItem.getObject().id);<br>   });</pre><pre> workInstanceId.forEach(function(workInstanceIdItem){<br>    $.ajax({<br>     url: URL,<br>     method: &quot;PATCH&quot;,<br>     dataType: &quot;json&quot;,<br>     contentType :&quot;application/json&quot;,<br>     data: &quot;{\&quot;status\&quot;: \&quot;CANCELED\&quot;}&quot;,<br>     headers: {<br>      &quot;X-CSRF-Token&quot;: token<br>     },<br>     success: function(){<br>      console.log(&quot;Instance Terminated&quot;);<br>     }<br>    });<br>  oTable.removeSelections();<br>  sap.m.MessageToast.show(&quot;Work Instance Terminated&quot;);<br>  i++;<br>}</pre><p>Hope this helps you.<br>Thanks,<br>Pooja</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3519baf5a919" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>