after adding the button in ui_component. i give error 500 Internal Server Error not going to post values on save controller. It posting on current url. Example i am using for adding the button.
Question reference
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">categories_index_edit.category_form_data_source</item>
<item name="deps" xsi:type="string">categories_index_edit.category_form_data_source</item>
</item>
<item name="label" xsi:type="string" translate="true">News Category</item>
<!-- <item name="config" xsi:type="array">
<item name="dataScope" xsi:type="string">data</item>
<item name="namespace" xsi:type="string">categories_index_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">Namespace\Modulename\Block\Adminhtml\Category\Edit\BackButton</item>
<item name="save" xsi:type="string">Namespace\Modulename\Block\Adminhtml\Category\Edit\SaveButton</item>
</item>
<item name="layout" xsi:type="array">
<item name="type" xsi:type="string">tabs</item>
</item>
</argument>
error
Notice: Undefined index: data in /opt/lampp/htdocs/m2_module/vendor/magento/framework/View/Element/UiComponent /ContentType/Json.php on line 71
0 /opt/lampp/htdocs/m2_module/vendor/magento/framework/View/Element/UiComponent/ContentType/Json.php
(71): Magento\Framework\App\ErrorHandler->handler(8, 'Undefined index...', '/opt/lampp/htdo...', 71, Array)
1 /opt/lampp/htdocs/m2_module/vendor/magento/module-ui/Component/AbstractComponent.php(118): Magento \Framework\View\Element\UiComponent\ContentType\Json->render(Object(Magento\Ui\Component\Form), 'templates /form/...')
2 /opt/lampp/htdocs/m2_module/vendor/magento/module-ui/Component/Wrapper/UiComponent.php(72): Magento \Ui\Component\AbstractComponent->render()