How call different Classes on button in Ui-Component. Magento2Append block to admin login formHow can i rewrite TierPrice Block in Magento2uiComponent Form. How to show data from DB tableError Add Result page breadcrumbMagento 2 Add new field to Magento_User admin formForm is not displayed on panel admin Magento 2Magento 2 : Error when Add WYSIWYG Editor to Block FormMagento 2 Create new “Catalog Input Type for Store Owner” AttributeAdminhtml form custom renderer - blank page - Magento 1.9Magento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?

What prevents the use of a multi-segment ILS for non-straight approaches?

What was this official D&D 3.5e Lovecraft-flavored rulebook?

What is the evidence for the "tyranny of the majority problem" in a direct democracy context?

Added a new user on Ubuntu, set password not working?

Non-trope happy ending?

Not using 's' for he/she/it

Should I stop contributing to retirement accounts?

GraphicsGrid with a Label for each Column and Row

How to bake one texture for one mesh with multiple textures blender 2.8

How can Trident be so inexpensive? Will it orbit Triton or just do a (slow) flyby?

How to explain what's wrong with this application of the chain rule?

What does routing an IP address mean?

C++ debug/print custom type with GDB : the case of nlohmann json library

2.8 Why are collections grayed out? How can I open them?

Which one is correct as adjective “protruding” or “protruded”?

What is Cash Advance APR?

Is there a name for this algorithm to calculate the concentration of a mixture of two solutions containing the same solute?

Why can Carol Danvers change her suit colours in the first place?

Delivering sarcasm

Is it safe to use olive oil to clean the ear wax?

The screen of my macbook suddenly broken down how can I do to recover

What should you do when eye contact makes your subordinate uncomfortable?

Did Swami Prabhupada reject Advaita?

If a character has darkvision, can they see through an area of nonmagical darkness filled with lightly obscuring gas?



How call different Classes on button in Ui-Component. Magento2


Append block to admin login formHow can i rewrite TierPrice Block in Magento2uiComponent Form. How to show data from DB tableError Add Result page breadcrumbMagento 2 Add new field to Magento_User admin formForm is not displayed on panel admin Magento 2Magento 2 : Error when Add WYSIWYG Editor to Block FormMagento 2 Create new “Catalog Input Type for Store Owner” AttributeAdminhtml form custom renderer - blank page - Magento 1.9Magento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?













1















I create the ui_component which code is



<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">makeanoffer_edit.makeanoffer_data_source</item>
<item name="deps" xsi:type="string">makeanoffer_edit.makeanoffer_data_source</item>
</item>
<item name="label" xsi:type="string" translate="true">Make An Offer</item>
<item name="config" xsi:type="array">
<item name="dataScope" xsi:type="string">data</item>
<item name="namespace" xsi:type="string">makeanoffer_edit</item>
</item>
<item name="template" xsi:type="string">templates/form/collapsible</item>
<item name="buttons" xsi:type="array">
<item name="back" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditBackButton</item>
<!-- <item name="delete" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditDeleteButton</item> -->
<item name="reset" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditResetButton</item>
<item name="save_and_continue" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditRejectButton</item>
<item name="save" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditAcceptButton</item>
<!-- <item name="accept" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditAcceptButton</item> -->

</item>
</argument>
<dataSource name="makeanoffer_data_source">
<argument name="dataProvider" xsi:type="configurableObject">
<argument name="class" xsi:type="string">PMEMakeAnOfferModelMakeAnOfferDataProvider</argument>
<argument name="name" xsi:type="string">makeanoffer_data_source</argument>
<argument name="primaryFieldName" xsi:type="string">makeanoffer_id</argument>
<argument name="requestFieldName" xsi:type="string">id</argument>

<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="submit_url" xsi:type="url" path="makeanoffer/index/acceptoffer"/>
</item>
</argument>

<!-- <argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="submit_url" xsi:type="url" path="makeanoffer/index/acceptoffer"/>
</item>
</argument> -->

</argument>
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>
</item>
</argument>
</dataSource>
<fieldset name="general">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string"/>
</item>
</argument>
<field name="makeanoffer_id">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="visible" xsi:type="boolean">false</item>
<item name="dataType" xsi:type="string">text</item>
<item name="formElement" xsi:type="string">input</item>
<item name="source" xsi:type="string">makeanoffer</item>
</item>
</argument>
</field>
<field name="product_name">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string">Product Name:</item>
<item name="visible" xsi:type="boolean">true</item>
<item name="dataType" xsi:type="string">text</item>
<item name="disabled" xsi:type="boolean">true</item>
<item name="formElement" xsi:type="string">input</item>
<item name="source" xsi:type="string">makeanoffer</item>
</item>
</argument>
</field>
<field name="name">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string">Customer Name:</item>
<item name="visible" xsi:type="boolean">true</item>
<item name="dataType" xsi:type="string">text</item>
<item name="formElement" xsi:type="string">input</item>
<item name="disabled" xsi:type="boolean">true</item>
<item name="source" xsi:type="string">makeanoffer</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">false</item>
</item>
</item>
</argument>
</field>
<field name="email">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string">Customer Email:</item>
<item name="visible" xsi:type="boolean">true</item>
<item name="dataType" xsi:type="string">text</item>
<item name="disabled" xsi:type="boolean">true</item>
<item name="formElement" xsi:type="string">input</item>
<item name="source" xsi:type="string">makeanoffer</item>
</item>
</argument>
</field>
<field name="pnumber">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string">Customer PhoneNo:</item>
<item name="visible" xsi:type="boolean">true</item>
<item name="dataType" xsi:type="string">text</item>
<item name="disabled" xsi:type="boolean">true</item>
<item name="formElement" xsi:type="string">input</item>
<item name="source" xsi:type="string">makeanoffer</item>
</item>
</argument>
</field>
<field name="offer_time">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string">Offerd at time:</item>
<item name="visible" xsi:type="boolean">true</item>
<item name="dataType" xsi:type="string">text</item>
<item name="disabled" xsi:type="boolean">true</item>
<item name="formElement" xsi:type="string">input</item>
<item name="source" xsi:type="string">makeanoffer</item>
</item>
</argument>
</field>
<field name="message">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string">Customer Message:</item>
<item name="visible" xsi:type="boolean">true</item>
<item name="dataType" xsi:type="string">text</item>
<item name="disabled" xsi:type="boolean">true</item>
<item name="formElement" xsi:type="string">input</item>
<item name="source" xsi:type="string">makeanoffer</item>
</item>
</argument>
</field>
<field name="product_price">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string">Product Price:</item>
<item name="visible" xsi:type="boolean">true</item>
<item name="dataType" xsi:type="string">text</item>
<item name="disabled" xsi:type="boolean">true</item>
<item name="formElement" xsi:type="string">input</item>
<item name="source" xsi:type="string">makeanoffer</item>
</item>
</argument>
</field>
<field name="offeramount">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string">Offerd Price:</item>
<item name="visible" xsi:type="boolean">true</item>
<item name="dataType" xsi:type="string">text</item>
<item name="disabled" xsi:type="boolean">true</item>
<item name="formElement" xsi:type="string">input</item>
<item name="source" xsi:type="string">makeanoffer</item>
</item>
</argument>
</field>
</fieldset>
</form>


now my question is I created two buttons first is Accept Offer and other is Reject Offer I want to call different classes on the each class but they both call the same class because of the submit_url now how can I set these two buttons to call the different classes and my Second Question is if I change the name of the Accept Button from save to somthing else then it do not call my class the same issue is withe Reject Button as well if I change the name from "save_and_continue" to something else it do not works.



enter image description here










share|improve this question


























    1















    I create the ui_component which code is



    <?xml version="1.0" encoding="UTF-8"?>
    <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <argument name="data" xsi:type="array">
    <item name="js_config" xsi:type="array">
    <item name="provider" xsi:type="string">makeanoffer_edit.makeanoffer_data_source</item>
    <item name="deps" xsi:type="string">makeanoffer_edit.makeanoffer_data_source</item>
    </item>
    <item name="label" xsi:type="string" translate="true">Make An Offer</item>
    <item name="config" xsi:type="array">
    <item name="dataScope" xsi:type="string">data</item>
    <item name="namespace" xsi:type="string">makeanoffer_edit</item>
    </item>
    <item name="template" xsi:type="string">templates/form/collapsible</item>
    <item name="buttons" xsi:type="array">
    <item name="back" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditBackButton</item>
    <!-- <item name="delete" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditDeleteButton</item> -->
    <item name="reset" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditResetButton</item>
    <item name="save_and_continue" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditRejectButton</item>
    <item name="save" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditAcceptButton</item>
    <!-- <item name="accept" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditAcceptButton</item> -->

    </item>
    </argument>
    <dataSource name="makeanoffer_data_source">
    <argument name="dataProvider" xsi:type="configurableObject">
    <argument name="class" xsi:type="string">PMEMakeAnOfferModelMakeAnOfferDataProvider</argument>
    <argument name="name" xsi:type="string">makeanoffer_data_source</argument>
    <argument name="primaryFieldName" xsi:type="string">makeanoffer_id</argument>
    <argument name="requestFieldName" xsi:type="string">id</argument>

    <argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
    <item name="submit_url" xsi:type="url" path="makeanoffer/index/acceptoffer"/>
    </item>
    </argument>

    <!-- <argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
    <item name="submit_url" xsi:type="url" path="makeanoffer/index/acceptoffer"/>
    </item>
    </argument> -->

    </argument>
    <argument name="data" xsi:type="array">
    <item name="js_config" xsi:type="array">
    <item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>
    </item>
    </argument>
    </dataSource>
    <fieldset name="general">
    <argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
    <item name="label" xsi:type="string"/>
    </item>
    </argument>
    <field name="makeanoffer_id">
    <argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
    <item name="visible" xsi:type="boolean">false</item>
    <item name="dataType" xsi:type="string">text</item>
    <item name="formElement" xsi:type="string">input</item>
    <item name="source" xsi:type="string">makeanoffer</item>
    </item>
    </argument>
    </field>
    <field name="product_name">
    <argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
    <item name="label" xsi:type="string">Product Name:</item>
    <item name="visible" xsi:type="boolean">true</item>
    <item name="dataType" xsi:type="string">text</item>
    <item name="disabled" xsi:type="boolean">true</item>
    <item name="formElement" xsi:type="string">input</item>
    <item name="source" xsi:type="string">makeanoffer</item>
    </item>
    </argument>
    </field>
    <field name="name">
    <argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
    <item name="label" xsi:type="string">Customer Name:</item>
    <item name="visible" xsi:type="boolean">true</item>
    <item name="dataType" xsi:type="string">text</item>
    <item name="formElement" xsi:type="string">input</item>
    <item name="disabled" xsi:type="boolean">true</item>
    <item name="source" xsi:type="string">makeanoffer</item>
    <item name="validation" xsi:type="array">
    <item name="required-entry" xsi:type="boolean">false</item>
    </item>
    </item>
    </argument>
    </field>
    <field name="email">
    <argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
    <item name="label" xsi:type="string">Customer Email:</item>
    <item name="visible" xsi:type="boolean">true</item>
    <item name="dataType" xsi:type="string">text</item>
    <item name="disabled" xsi:type="boolean">true</item>
    <item name="formElement" xsi:type="string">input</item>
    <item name="source" xsi:type="string">makeanoffer</item>
    </item>
    </argument>
    </field>
    <field name="pnumber">
    <argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
    <item name="label" xsi:type="string">Customer PhoneNo:</item>
    <item name="visible" xsi:type="boolean">true</item>
    <item name="dataType" xsi:type="string">text</item>
    <item name="disabled" xsi:type="boolean">true</item>
    <item name="formElement" xsi:type="string">input</item>
    <item name="source" xsi:type="string">makeanoffer</item>
    </item>
    </argument>
    </field>
    <field name="offer_time">
    <argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
    <item name="label" xsi:type="string">Offerd at time:</item>
    <item name="visible" xsi:type="boolean">true</item>
    <item name="dataType" xsi:type="string">text</item>
    <item name="disabled" xsi:type="boolean">true</item>
    <item name="formElement" xsi:type="string">input</item>
    <item name="source" xsi:type="string">makeanoffer</item>
    </item>
    </argument>
    </field>
    <field name="message">
    <argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
    <item name="label" xsi:type="string">Customer Message:</item>
    <item name="visible" xsi:type="boolean">true</item>
    <item name="dataType" xsi:type="string">text</item>
    <item name="disabled" xsi:type="boolean">true</item>
    <item name="formElement" xsi:type="string">input</item>
    <item name="source" xsi:type="string">makeanoffer</item>
    </item>
    </argument>
    </field>
    <field name="product_price">
    <argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
    <item name="label" xsi:type="string">Product Price:</item>
    <item name="visible" xsi:type="boolean">true</item>
    <item name="dataType" xsi:type="string">text</item>
    <item name="disabled" xsi:type="boolean">true</item>
    <item name="formElement" xsi:type="string">input</item>
    <item name="source" xsi:type="string">makeanoffer</item>
    </item>
    </argument>
    </field>
    <field name="offeramount">
    <argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
    <item name="label" xsi:type="string">Offerd Price:</item>
    <item name="visible" xsi:type="boolean">true</item>
    <item name="dataType" xsi:type="string">text</item>
    <item name="disabled" xsi:type="boolean">true</item>
    <item name="formElement" xsi:type="string">input</item>
    <item name="source" xsi:type="string">makeanoffer</item>
    </item>
    </argument>
    </field>
    </fieldset>
    </form>


    now my question is I created two buttons first is Accept Offer and other is Reject Offer I want to call different classes on the each class but they both call the same class because of the submit_url now how can I set these two buttons to call the different classes and my Second Question is if I change the name of the Accept Button from save to somthing else then it do not call my class the same issue is withe Reject Button as well if I change the name from "save_and_continue" to something else it do not works.



    enter image description here










    share|improve this question
























      1












      1








      1








      I create the ui_component which code is



      <?xml version="1.0" encoding="UTF-8"?>
      <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
      <argument name="data" xsi:type="array">
      <item name="js_config" xsi:type="array">
      <item name="provider" xsi:type="string">makeanoffer_edit.makeanoffer_data_source</item>
      <item name="deps" xsi:type="string">makeanoffer_edit.makeanoffer_data_source</item>
      </item>
      <item name="label" xsi:type="string" translate="true">Make An Offer</item>
      <item name="config" xsi:type="array">
      <item name="dataScope" xsi:type="string">data</item>
      <item name="namespace" xsi:type="string">makeanoffer_edit</item>
      </item>
      <item name="template" xsi:type="string">templates/form/collapsible</item>
      <item name="buttons" xsi:type="array">
      <item name="back" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditBackButton</item>
      <!-- <item name="delete" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditDeleteButton</item> -->
      <item name="reset" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditResetButton</item>
      <item name="save_and_continue" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditRejectButton</item>
      <item name="save" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditAcceptButton</item>
      <!-- <item name="accept" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditAcceptButton</item> -->

      </item>
      </argument>
      <dataSource name="makeanoffer_data_source">
      <argument name="dataProvider" xsi:type="configurableObject">
      <argument name="class" xsi:type="string">PMEMakeAnOfferModelMakeAnOfferDataProvider</argument>
      <argument name="name" xsi:type="string">makeanoffer_data_source</argument>
      <argument name="primaryFieldName" xsi:type="string">makeanoffer_id</argument>
      <argument name="requestFieldName" xsi:type="string">id</argument>

      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="submit_url" xsi:type="url" path="makeanoffer/index/acceptoffer"/>
      </item>
      </argument>

      <!-- <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="submit_url" xsi:type="url" path="makeanoffer/index/acceptoffer"/>
      </item>
      </argument> -->

      </argument>
      <argument name="data" xsi:type="array">
      <item name="js_config" xsi:type="array">
      <item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>
      </item>
      </argument>
      </dataSource>
      <fieldset name="general">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="label" xsi:type="string"/>
      </item>
      </argument>
      <field name="makeanoffer_id">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="visible" xsi:type="boolean">false</item>
      <item name="dataType" xsi:type="string">text</item>
      <item name="formElement" xsi:type="string">input</item>
      <item name="source" xsi:type="string">makeanoffer</item>
      </item>
      </argument>
      </field>
      <field name="product_name">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="label" xsi:type="string">Product Name:</item>
      <item name="visible" xsi:type="boolean">true</item>
      <item name="dataType" xsi:type="string">text</item>
      <item name="disabled" xsi:type="boolean">true</item>
      <item name="formElement" xsi:type="string">input</item>
      <item name="source" xsi:type="string">makeanoffer</item>
      </item>
      </argument>
      </field>
      <field name="name">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="label" xsi:type="string">Customer Name:</item>
      <item name="visible" xsi:type="boolean">true</item>
      <item name="dataType" xsi:type="string">text</item>
      <item name="formElement" xsi:type="string">input</item>
      <item name="disabled" xsi:type="boolean">true</item>
      <item name="source" xsi:type="string">makeanoffer</item>
      <item name="validation" xsi:type="array">
      <item name="required-entry" xsi:type="boolean">false</item>
      </item>
      </item>
      </argument>
      </field>
      <field name="email">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="label" xsi:type="string">Customer Email:</item>
      <item name="visible" xsi:type="boolean">true</item>
      <item name="dataType" xsi:type="string">text</item>
      <item name="disabled" xsi:type="boolean">true</item>
      <item name="formElement" xsi:type="string">input</item>
      <item name="source" xsi:type="string">makeanoffer</item>
      </item>
      </argument>
      </field>
      <field name="pnumber">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="label" xsi:type="string">Customer PhoneNo:</item>
      <item name="visible" xsi:type="boolean">true</item>
      <item name="dataType" xsi:type="string">text</item>
      <item name="disabled" xsi:type="boolean">true</item>
      <item name="formElement" xsi:type="string">input</item>
      <item name="source" xsi:type="string">makeanoffer</item>
      </item>
      </argument>
      </field>
      <field name="offer_time">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="label" xsi:type="string">Offerd at time:</item>
      <item name="visible" xsi:type="boolean">true</item>
      <item name="dataType" xsi:type="string">text</item>
      <item name="disabled" xsi:type="boolean">true</item>
      <item name="formElement" xsi:type="string">input</item>
      <item name="source" xsi:type="string">makeanoffer</item>
      </item>
      </argument>
      </field>
      <field name="message">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="label" xsi:type="string">Customer Message:</item>
      <item name="visible" xsi:type="boolean">true</item>
      <item name="dataType" xsi:type="string">text</item>
      <item name="disabled" xsi:type="boolean">true</item>
      <item name="formElement" xsi:type="string">input</item>
      <item name="source" xsi:type="string">makeanoffer</item>
      </item>
      </argument>
      </field>
      <field name="product_price">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="label" xsi:type="string">Product Price:</item>
      <item name="visible" xsi:type="boolean">true</item>
      <item name="dataType" xsi:type="string">text</item>
      <item name="disabled" xsi:type="boolean">true</item>
      <item name="formElement" xsi:type="string">input</item>
      <item name="source" xsi:type="string">makeanoffer</item>
      </item>
      </argument>
      </field>
      <field name="offeramount">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="label" xsi:type="string">Offerd Price:</item>
      <item name="visible" xsi:type="boolean">true</item>
      <item name="dataType" xsi:type="string">text</item>
      <item name="disabled" xsi:type="boolean">true</item>
      <item name="formElement" xsi:type="string">input</item>
      <item name="source" xsi:type="string">makeanoffer</item>
      </item>
      </argument>
      </field>
      </fieldset>
      </form>


      now my question is I created two buttons first is Accept Offer and other is Reject Offer I want to call different classes on the each class but they both call the same class because of the submit_url now how can I set these two buttons to call the different classes and my Second Question is if I change the name of the Accept Button from save to somthing else then it do not call my class the same issue is withe Reject Button as well if I change the name from "save_and_continue" to something else it do not works.



      enter image description here










      share|improve this question














      I create the ui_component which code is



      <?xml version="1.0" encoding="UTF-8"?>
      <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
      <argument name="data" xsi:type="array">
      <item name="js_config" xsi:type="array">
      <item name="provider" xsi:type="string">makeanoffer_edit.makeanoffer_data_source</item>
      <item name="deps" xsi:type="string">makeanoffer_edit.makeanoffer_data_source</item>
      </item>
      <item name="label" xsi:type="string" translate="true">Make An Offer</item>
      <item name="config" xsi:type="array">
      <item name="dataScope" xsi:type="string">data</item>
      <item name="namespace" xsi:type="string">makeanoffer_edit</item>
      </item>
      <item name="template" xsi:type="string">templates/form/collapsible</item>
      <item name="buttons" xsi:type="array">
      <item name="back" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditBackButton</item>
      <!-- <item name="delete" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditDeleteButton</item> -->
      <item name="reset" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditResetButton</item>
      <item name="save_and_continue" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditRejectButton</item>
      <item name="save" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditAcceptButton</item>
      <!-- <item name="accept" xsi:type="string">PMEMakeAnOfferBlockAdminhtmlMakeAnOfferEditAcceptButton</item> -->

      </item>
      </argument>
      <dataSource name="makeanoffer_data_source">
      <argument name="dataProvider" xsi:type="configurableObject">
      <argument name="class" xsi:type="string">PMEMakeAnOfferModelMakeAnOfferDataProvider</argument>
      <argument name="name" xsi:type="string">makeanoffer_data_source</argument>
      <argument name="primaryFieldName" xsi:type="string">makeanoffer_id</argument>
      <argument name="requestFieldName" xsi:type="string">id</argument>

      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="submit_url" xsi:type="url" path="makeanoffer/index/acceptoffer"/>
      </item>
      </argument>

      <!-- <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="submit_url" xsi:type="url" path="makeanoffer/index/acceptoffer"/>
      </item>
      </argument> -->

      </argument>
      <argument name="data" xsi:type="array">
      <item name="js_config" xsi:type="array">
      <item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>
      </item>
      </argument>
      </dataSource>
      <fieldset name="general">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="label" xsi:type="string"/>
      </item>
      </argument>
      <field name="makeanoffer_id">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="visible" xsi:type="boolean">false</item>
      <item name="dataType" xsi:type="string">text</item>
      <item name="formElement" xsi:type="string">input</item>
      <item name="source" xsi:type="string">makeanoffer</item>
      </item>
      </argument>
      </field>
      <field name="product_name">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="label" xsi:type="string">Product Name:</item>
      <item name="visible" xsi:type="boolean">true</item>
      <item name="dataType" xsi:type="string">text</item>
      <item name="disabled" xsi:type="boolean">true</item>
      <item name="formElement" xsi:type="string">input</item>
      <item name="source" xsi:type="string">makeanoffer</item>
      </item>
      </argument>
      </field>
      <field name="name">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="label" xsi:type="string">Customer Name:</item>
      <item name="visible" xsi:type="boolean">true</item>
      <item name="dataType" xsi:type="string">text</item>
      <item name="formElement" xsi:type="string">input</item>
      <item name="disabled" xsi:type="boolean">true</item>
      <item name="source" xsi:type="string">makeanoffer</item>
      <item name="validation" xsi:type="array">
      <item name="required-entry" xsi:type="boolean">false</item>
      </item>
      </item>
      </argument>
      </field>
      <field name="email">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="label" xsi:type="string">Customer Email:</item>
      <item name="visible" xsi:type="boolean">true</item>
      <item name="dataType" xsi:type="string">text</item>
      <item name="disabled" xsi:type="boolean">true</item>
      <item name="formElement" xsi:type="string">input</item>
      <item name="source" xsi:type="string">makeanoffer</item>
      </item>
      </argument>
      </field>
      <field name="pnumber">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="label" xsi:type="string">Customer PhoneNo:</item>
      <item name="visible" xsi:type="boolean">true</item>
      <item name="dataType" xsi:type="string">text</item>
      <item name="disabled" xsi:type="boolean">true</item>
      <item name="formElement" xsi:type="string">input</item>
      <item name="source" xsi:type="string">makeanoffer</item>
      </item>
      </argument>
      </field>
      <field name="offer_time">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="label" xsi:type="string">Offerd at time:</item>
      <item name="visible" xsi:type="boolean">true</item>
      <item name="dataType" xsi:type="string">text</item>
      <item name="disabled" xsi:type="boolean">true</item>
      <item name="formElement" xsi:type="string">input</item>
      <item name="source" xsi:type="string">makeanoffer</item>
      </item>
      </argument>
      </field>
      <field name="message">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="label" xsi:type="string">Customer Message:</item>
      <item name="visible" xsi:type="boolean">true</item>
      <item name="dataType" xsi:type="string">text</item>
      <item name="disabled" xsi:type="boolean">true</item>
      <item name="formElement" xsi:type="string">input</item>
      <item name="source" xsi:type="string">makeanoffer</item>
      </item>
      </argument>
      </field>
      <field name="product_price">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="label" xsi:type="string">Product Price:</item>
      <item name="visible" xsi:type="boolean">true</item>
      <item name="dataType" xsi:type="string">text</item>
      <item name="disabled" xsi:type="boolean">true</item>
      <item name="formElement" xsi:type="string">input</item>
      <item name="source" xsi:type="string">makeanoffer</item>
      </item>
      </argument>
      </field>
      <field name="offeramount">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="label" xsi:type="string">Offerd Price:</item>
      <item name="visible" xsi:type="boolean">true</item>
      <item name="dataType" xsi:type="string">text</item>
      <item name="disabled" xsi:type="boolean">true</item>
      <item name="formElement" xsi:type="string">input</item>
      <item name="source" xsi:type="string">makeanoffer</item>
      </item>
      </argument>
      </field>
      </fieldset>
      </form>


      now my question is I created two buttons first is Accept Offer and other is Reject Offer I want to call different classes on the each class but they both call the same class because of the submit_url now how can I set these two buttons to call the different classes and my Second Question is if I change the name of the Accept Button from save to somthing else then it do not call my class the same issue is withe Reject Button as well if I change the name from "save_and_continue" to something else it do not works.



      enter image description here







      magento2 adminhtml






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked yesterday









      Asad KhanAsad Khan

      1478




      1478




















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "479"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f266981%2fhow-call-different-classes-on-button-in-ui-component-magento2%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f266981%2fhow-call-different-classes-on-button-in-ui-component-magento2%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Sum ergo cogito? 1 nng

          三茅街道4182Guuntc Dn precexpngmageondP