<?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 we get multiple Dialog boxes using the same function? in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/how-can-we-get-multiple-dialog-boxes-using-the-same-function/qaa-p/521953#M103154</link>
    <description>&lt;P&gt;Hi Aditi,&lt;/P&gt;
  &lt;P&gt;It is possible. Please explain more so that i can give u possible solution.&lt;/P&gt;</description>
    <pubDate>Mon, 25 Sep 2017 09:29:38 GMT</pubDate>
    <dc:creator>irfan_gokak</dc:creator>
    <dc:date>2017-09-25T09:29:38Z</dc:date>
    <item>
      <title>How can we get multiple Dialog boxes using the same function?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-can-we-get-multiple-dialog-boxes-using-the-same-function/qaq-p/521952</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I have a table fetching oData and various input fields to apply filters.&lt;/P&gt;
  &lt;P&gt;On clicking F4 when the input field is active, a pop up with a list of filter values form oData service should appear. Now I wanted to use the same function for calling different dialogs, each through its respective input field using switch statement.Is this possible? If yes, how?&lt;/P&gt;
  &lt;P&gt;Thank You&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 07:47:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-can-we-get-multiple-dialog-boxes-using-the-same-function/qaq-p/521952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-09-25T07:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: How can we get multiple Dialog boxes using the same function?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-can-we-get-multiple-dialog-boxes-using-the-same-function/qaa-p/521953#M103154</link>
      <description>&lt;P&gt;Hi Aditi,&lt;/P&gt;
  &lt;P&gt;It is possible. Please explain more so that i can give u possible solution.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 09:29:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-can-we-get-multiple-dialog-boxes-using-the-same-function/qaa-p/521953#M103154</guid>
      <dc:creator>irfan_gokak</dc:creator>
      <dc:date>2017-09-25T09:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: How can we get multiple Dialog boxes using the same function?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-can-we-get-multiple-dialog-boxes-using-the-same-function/qaa-p/521954#M103155</link>
      <description>&lt;P&gt;Hi Irfan,&lt;/P&gt;
  &lt;P&gt;I have say 2 input fields each having multiple selection available.On pressing F4 when active, a pop up appears with respective filter values out of which more than one selection is possible, which on clicking on "Ok" would be applied to the table.Now to reduce redundant code, I wish to use the same function and call dialogs for the respective input field using the id of the input field.I tried the following code.But its giving the error : "Uncaught TypeError: Cannot read property 'open' of undefined"&lt;/P&gt;
  &lt;P&gt;_getDialog : function (inputId)&lt;/P&gt;
  &lt;P&gt; {&lt;/P&gt;
  &lt;P&gt; if (!this._valueHelpDialog) &lt;/P&gt;
  &lt;P&gt;{ &lt;/P&gt;
  &lt;P&gt;switch (inputId)&lt;/P&gt;
  &lt;P&gt; { &lt;/P&gt;
  &lt;P&gt; case "MaterialID": &lt;/P&gt;
  &lt;P&gt; this._valueHelpDialog = sap.ui.xmlfragment("mpo.fragment.Dialog",this);&lt;/P&gt;
  &lt;P&gt; break; &lt;/P&gt;
  &lt;P&gt; case "MRPController":&lt;/P&gt;
  &lt;P&gt; this._valueHelpDialog = sap.ui.xmlfragment("mpo.fragment.DialogMRPCtlr",this);&lt;/P&gt;
  &lt;P&gt; break;&lt;/P&gt;
  &lt;P&gt; }&lt;/P&gt;
  &lt;P&gt; this.getView().addDependent(this._valueHelpDialog);&lt;/P&gt;
  &lt;P&gt; } &lt;/P&gt;
  &lt;P&gt; return this._valueHelpDialog;&lt;/P&gt;
  &lt;P&gt; },&lt;/P&gt;
  &lt;P&gt; handleValueHelp : function (oEvent)&lt;/P&gt;
  &lt;P&gt; { &lt;/P&gt;
  &lt;P&gt;var inputId = oEvent.getSource().getId();&lt;/P&gt;
  &lt;P&gt; this._getDialog(inputId).open(); &lt;/P&gt;
  &lt;P&gt; }, &lt;/P&gt;
  &lt;P&gt;_handleValueHelpSearch : function (evt) { &lt;/P&gt;
  &lt;P&gt;var sValue = evt.getParameter("value"); &lt;/P&gt;
  &lt;P&gt;var oFilter1 = new sap.ui.model.Filter("MaterialID","EQ", sValue); evt.getSource().getBinding("items").filter([oFilter1]);&lt;/P&gt;
  &lt;P&gt; }, &lt;/P&gt;
  &lt;P&gt; _handleValueHelpClose : function (evt) { &lt;/P&gt;
  &lt;P&gt;var oSelectedItem = evt.getParameter("selectedItem");&lt;/P&gt;
  &lt;P&gt; if (oSelectedItem) { var FilteredItems =oSelectedItem.getTitle();&lt;/P&gt;
  &lt;P&gt; var bindItems = this.byId("table").getBindingInfo("items"),&lt;/P&gt;
  &lt;P&gt; template = bindItems.template, &lt;/P&gt;
  &lt;P&gt;path = bindItems.path;&lt;/P&gt;
  &lt;P&gt; var filterMaterialID = new sap.ui.model.Filter("MaterialID", "EQ", FilteredItems);&lt;/P&gt;
  &lt;P&gt; }&lt;/P&gt;
  &lt;P&gt; this.getView().byId("table").bindItems(path, template, null, [filterMaterialID]);&lt;/P&gt;
  &lt;P&gt; },&lt;/P&gt;
  &lt;P&gt; onCloseDialog :function(){&lt;/P&gt;
  &lt;P&gt; this._getDialog().close();&lt;/P&gt;
  &lt;P&gt; } &lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 12:38:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-can-we-get-multiple-dialog-boxes-using-the-same-function/qaa-p/521954#M103155</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-09-25T12:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: How can we get multiple Dialog boxes using the same function?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-can-we-get-multiple-dialog-boxes-using-the-same-function/qaa-p/521955#M103156</link>
      <description>&lt;P&gt;As I understand, one function which handles value help for two fields. &lt;/P&gt;
  &lt;P&gt;Use the Event paramaters and attach some custom parameters to the event handler methods to differentiate the source of the call. &lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2017 03:12:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-can-we-get-multiple-dialog-boxes-using-the-same-function/qaa-p/521955#M103156</guid>
      <dc:creator>Sharathmg</dc:creator>
      <dc:date>2017-09-26T03:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: How can we get multiple Dialog boxes using the same function?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-can-we-get-multiple-dialog-boxes-using-the-same-function/qaa-p/521956#M103157</link>
      <description>&lt;P&gt;Hi Sharath,&lt;/P&gt;
  &lt;P&gt;I have tried that but am getting errors.The snippet I used is as following :&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://answers.sap.com/comments/316211/view.html" target="test_blank"&gt;https://answers.sap.com/comments/316211/view.html&lt;/A&gt; &lt;/P&gt;
  &lt;P&gt;Its giving an error for passing inputID.&lt;/P&gt;
  &lt;P&gt;Thank You&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2017 05:41:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-can-we-get-multiple-dialog-boxes-using-the-same-function/qaa-p/521956#M103157</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-09-26T05:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can we get multiple Dialog boxes using the same function?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-can-we-get-multiple-dialog-boxes-using-the-same-function/qaa-p/521957#M103158</link>
      <description>&lt;P&gt;When using a control by passing the input id, as a practice get the control into a separate variable and then perform the bind items or any further action on it. &lt;/P&gt;
  &lt;P&gt;Paste the code and line at which the error is raised. &lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;Sharath&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 07:27:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-can-we-get-multiple-dialog-boxes-using-the-same-function/qaa-p/521957#M103158</guid>
      <dc:creator>Sharathmg</dc:creator>
      <dc:date>2017-09-29T07:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: How can we get multiple Dialog boxes using the same function?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-can-we-get-multiple-dialog-boxes-using-the-same-function/qaa-p/521958#M103159</link>
      <description>&lt;P&gt;Thank You!&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 07:24:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-can-we-get-multiple-dialog-boxes-using-the-same-function/qaa-p/521958#M103159</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-10-03T07:24:05Z</dc:date>
    </item>
  </channel>
</rss>

