{"action":"created","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/967","labels_url":"https://api.github.com/repos/magento/magento2/issues/967/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/967/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/967/events","html_url":"https://github.com/magento/magento2/issues/967","id":54307189,"number":967,"title":"Problem in creating edit  form container of a grid in admin Panel","user":{"login":"aishwaryacedcoss","id":10140297,"avatar_url":"https://avatars.githubusercontent.com/u/10140297?v=3","gravatar_id":"","url":"https://api.github.com/users/aishwaryacedcoss","html_url":"https://github.com/aishwaryacedcoss","followers_url":"https://api.github.com/users/aishwaryacedcoss/followers","following_url":"https://api.github.com/users/aishwaryacedcoss/following{/other_user}","gists_url":"https://api.github.com/users/aishwaryacedcoss/gists{/gist_id}","starred_url":"https://api.github.com/users/aishwaryacedcoss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aishwaryacedcoss/subscriptions","organizations_url":"https://api.github.com/users/aishwaryacedcoss/orgs","repos_url":"https://api.github.com/users/aishwaryacedcoss/repos","events_url":"https://api.github.com/users/aishwaryacedcoss/events{/privacy}","received_events_url":"https://api.github.com/users/aishwaryacedcoss/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/magento/magento2/labels/needs%20update","name":"needs update","color":"eb6420"},{"url":"https://api.github.com/repos/magento/magento2/labels/PS","name":"PS","color":"fad8c7"},{"url":"https://api.github.com/repos/magento/magento2/labels/question","name":"question","color":"207de5"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-01-14T10:38:40Z","updated_at":"2015-02-10T20:03:54Z","closed_at":"2015-02-10T20:03:54Z","body":"I have created a edit form functions some thing like this:-\r\n\r\nnamespace Excercise\\Weblog\\Block\\Adminhtml\\Blogpost;\r\n \r\nclass Edit extends \\Magento\\Backend\\Block\\Widget\\Container\r\n{\r\n protected $_coreRegistry = null;\r\n \r\n    /**\r\n     * @param \\Magento\\Backend\\Block\\Template\\Context $context\r\n     * @param \\Magento\\Registry $registry\r\n     * @param array $data\r\n     */\r\n    public function __construct(\r\n        \\Magento\\Backend\\Block\\Template\\Context $context,\r\n        \\Magento\\Framework\\Registry $registry,\r\n        array $data = array()\r\n    ) {\r\n    \t\r\n        $this->_coreRegistry = $registry;\r\n        parent::__construct($context, $data);\r\n    }\r\n    /**\r\n     * \r\n     * Retrieve text for header element depending on loaded page\r\n     *\r\n     * @return string\r\n     */\r\n    protected function _construct()\r\n    {\r\n    \t\r\n    \t$this->_objectId = 'blogpost_id';\r\n    \t$this->_blockGroup = 'Excercise_Weblog';\r\n    \t$this->_controller = 'adminhtml_blogpost';\r\n    \r\n    \tparent::_construct();\r\n    \r\n    \t$this->_updateButton('save', 'label', __('Save Post'));\r\n    \t$this->_addButton(\r\n    \t\t\t'saveandcontinue',\r\n    \t\t\tarray(\r\n    \t\t\t\t\t'label' => __('Save and Continue Edit'),\r\n    \t\t\t\t\t'class' => 'save',\r\n    \t\t\t\t\t'data_attribute' => array(\r\n    \t\t\t\t\t\t\t'mage-init' => array(\r\n    \t\t\t\t\t\t\t\t\t'button' => array('event' => 'saveAndContinueEdit', 'target' => '#edit_form')\r\n    \t\t\t\t\t\t\t)\r\n    \t\t\t\t\t)\r\n    \t\t\t),\r\n    \t\t\t-100\r\n    \t);\r\n    \r\n    \t$this->_updateButton('delete', 'label', __('Delete Post'));\r\n    }\r\n    \r\n    public function getHeaderText()\r\n    {\r\n        if ($this->_coreRegistry->registry('blog_post')->getId()) {\r\n            return __(\"Edit Post '%1'\", $this->escapeHtml($this->_coreRegistry->registry('blog_post')->getTitle()));\r\n        } else {\r\n            return __('New Post');\r\n        }\r\n    }\r\n\r\n Then Error comes as:-\r\na:4:{i:0;s:142:\"Invalid method Excercise\\Weblog\\Block\\Adminhtml\\Blogpost\\Edit::_updateButton(Array\r\n(\r\n    [0] => save\r\n    [1] => label\r\n    [2] => Save Post\r\n)\r\n\r\nI cant understand where the Problem is existing????Please help me???,my edit controller is:-\r\n\r\nnamespace Excercise\\Weblog\\Controller\\Adminhtml\\Blogpost;\r\n \r\nclass Edit extends \\Excercise\\Weblog\\Controller\\Adminhtml\\Blogpost\\Index\r\n{\r\n\r\n\tprotected $_coreRegistry = null;\r\n\t\r\n\t/**\r\n\t * @var \\Magento\\Framework\\Stdlib\\DateTime\\Filter\\Date\r\n\t */\r\n\tprotected $_dateFilter;\r\n\t\r\n\t\r\n      public function execute()\r\n\t   {\r\n\t\t\r\n\t\t$this->_title->add(__('Blog Post'));\r\n\t\r\n\t\t// 1. Get ID and create model\r\n\t\t$id = $this->getRequest()->getParam('id');\r\n\t\t$model = $this->_objectManager->create('Excercise\\Weblog\\Model\\Blogpost');\r\n\t\r\n\t\t// 2. Initial checking\r\n\t if ($id) {\r\n\t\t\t$model->load($id);\r\n\t\t\tif (!$model->getId()) {\r\n\t\t\t\t$this->messageManager->addError(__('This post no longer exists.'));\r\n\t\t\t\t$this->_redirect('*/*/');\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\t$this->_title->add($model->getId() ? $model->getTitle() : __('New Blog Post'));\r\n\t\r\n\t\t// 3. Set entered data if was error when we do save\r\n\t\t$data = $this->_objectManager->get('Magento\\Backend\\Model\\Session')->getFormData(true);\r\n\t\tif (!empty($data)) {\r\n\t\t\t$model->setData($data);\r\n\t\t}\r\n\t\r\n\t\t// 4. Register model to use later in blocks\r\n\t\t//$this->_coreRegistry->register('blog_post', $model);\r\n\t\r\n\t\t// 5. Build edit form\r\n\t\t$this->_initAction()->_addBreadcrumb(\r\n\t\t\t\t$id ? __('Edit Post') : __('New Post'),\r\n\t\t\t\t$id ? __('Edit Post') : __('New Post')\r\n\t\t);\r\n\t\r\n\t\t$this->_view->renderLayout();\r\n\t}\r\n}\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/magento/magento2/issues/comments/73772998","html_url":"https://github.com/magento/magento2/issues/967#issuecomment-73772998","issue_url":"https://api.github.com/repos/magento/magento2/issues/967","id":73772998,"user":{"login":"snohe","id":10423281,"avatar_url":"https://avatars.githubusercontent.com/u/10423281?v=3","gravatar_id":"","url":"https://api.github.com/users/snohe","html_url":"https://github.com/snohe","followers_url":"https://api.github.com/users/snohe/followers","following_url":"https://api.github.com/users/snohe/following{/other_user}","gists_url":"https://api.github.com/users/snohe/gists{/gist_id}","starred_url":"https://api.github.com/users/snohe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snohe/subscriptions","organizations_url":"https://api.github.com/users/snohe/orgs","repos_url":"https://api.github.com/users/snohe/repos","events_url":"https://api.github.com/users/snohe/events{/privacy}","received_events_url":"https://api.github.com/users/snohe/received_events","type":"User","site_admin":false},"created_at":"2015-02-10T20:03:54Z","updated_at":"2015-02-10T20:03:54Z","body":"@aishwaryacedcoss, since we haven't heard back from you, we'll proceed with closing this issue.  If in case you do have any updates, feel free to reach out to us by submitting a new issue."}}