<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: How can Formatter access function in parent class in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/how-can-formatter-access-function-in-parent-class/qaa-p/12190264#M4560192</link>
    <description>&lt;P&gt;I'm not sure if there's a way to do this with the "string annotation". Worst case, you can write a delegate function in your controller.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;datTimeFormat: function(){
  this.prototype.datTimeFormat.apply(this, arguments);
}&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 23 Jan 2020 10:51:20 GMT</pubDate>
    <dc:creator>mariusobert</dc:creator>
    <dc:date>2020-01-23T10:51:20Z</dc:date>
    <item>
      <title>How can Formatter access function in parent class</title>
      <link>https://community.sap.com/t5/technology-q-a/how-can-formatter-access-function-in-parent-class/qaq-p/12190260</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I have a requirement to format date. For this I have written function in the parent class. Now how can I access parent function in the formatter ?&lt;/P&gt;
  &lt;P&gt;This is what I am trying but without success. This is piece of code of my Excel Export.&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;{
name: "Level1 Timestamp",
template: {
  content: "{path: 'Level1Timestamp', formatter: 'BaseController.datTimeFormat'}"
}
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;BaseController (the file name and also the instance of parent class is BaseController) is the parent controller which has dateTimeFormat function.&lt;/P&gt;
  &lt;P&gt;I tried full path of Parent class but no luck. Both Parent class and the child class (where I am using formatter) are in the same View folder.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2020 04:47:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-can-formatter-access-function-in-parent-class/qaq-p/12190260</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-01-23T04:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: How can Formatter access function in parent class</title>
      <link>https://community.sap.com/t5/technology-q-a/how-can-formatter-access-function-in-parent-class/qaa-p/12190261#M4560189</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Did you simply try this :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;formatter: '.datTimeFormat'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;With the dot and then without the dot.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joseph&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2020 05:15:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-can-formatter-access-function-in-parent-class/qaa-p/12190261#M4560189</guid>
      <dc:creator>Joseph_BERTHE1</dc:creator>
      <dc:date>2020-01-23T05:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: How can Formatter access function in parent class</title>
      <link>https://community.sap.com/t5/technology-q-a/how-can-formatter-access-function-in-parent-class/qaa-p/12190262#M4560190</link>
      <description>&lt;P&gt;Yep..neither of them worked.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2020 05:54:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-can-formatter-access-function-in-parent-class/qaa-p/12190262#M4560190</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-01-23T05:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: How can Formatter access function in parent class</title>
      <link>https://community.sap.com/t5/technology-q-a/how-can-formatter-access-function-in-parent-class/qaa-p/12190263#M4560191</link>
      <description>&lt;P&gt;are the view(in which that control (resides) and the controller linked? Or is the template code written in controller.?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2020 06:29:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-can-formatter-access-function-in-parent-class/qaa-p/12190263#M4560191</guid>
      <dc:creator>maheshpalavalli</dc:creator>
      <dc:date>2020-01-23T06:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: How can Formatter access function in parent class</title>
      <link>https://community.sap.com/t5/technology-q-a/how-can-formatter-access-function-in-parent-class/qaa-p/12190264#M4560192</link>
      <description>&lt;P&gt;I'm not sure if there's a way to do this with the "string annotation". Worst case, you can write a delegate function in your controller.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;datTimeFormat: function(){
  this.prototype.datTimeFormat.apply(this, arguments);
}&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Jan 2020 10:51:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-can-formatter-access-function-in-parent-class/qaa-p/12190264#M4560192</guid>
      <dc:creator>mariusobert</dc:creator>
      <dc:date>2020-01-23T10:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: How can Formatter access function in parent class</title>
      <link>https://community.sap.com/t5/technology-q-a/how-can-formatter-access-function-in-parent-class/qaa-p/12190265#M4560193</link>
      <description>&lt;P&gt;Template code resides in the controller. And this controller inherits BaseController. And my formatter function is written in the BaseController. All the files are are in the same folder which is 'View'.&lt;/P&gt;&lt;P&gt;I think there is way ....because, if I try to use another formatter function (which is in the util folder under format file name) giving the absolute path (Application root followed by util folder and format file name) then it works.&lt;/P&gt;&lt;P&gt;But same if I try (I mean path) for my BaseController then it doesn't work.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2020 19:52:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-can-formatter-access-function-in-parent-class/qaa-p/12190265#M4560193</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-01-23T19:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: How can Formatter access function in parent class</title>
      <link>https://community.sap.com/t5/technology-q-a/how-can-formatter-access-function-in-parent-class/qaa-p/12190266#M4560194</link>
      <description>&lt;P&gt;I think there is way ....because, if I try to use another formatter function (which is in the util folder of my project with format file name) giving the absolute path (Application root followed by util folder and format file name) then it works.&lt;/P&gt;&lt;P&gt;But same if I try (I mean path) for my BaseController then it doesn't work. So looks like I am not following the correct syntax while providing the BaseController.js path.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2020 19:53:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-can-formatter-access-function-in-parent-class/qaa-p/12190266#M4560194</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-01-23T19:53:49Z</dc:date>
    </item>
  </channel>
</rss>

