在grid里面实现这个方法:
protected function _prepareMassaction()
{
$this->setMassactionIdField('post_id');
$this->getMassactionBlock()->setFormFieldName('blog');
$this->getMassactionBlock()->addItem('delete', array(
'label' => Mage::helper('gao')->__('Delete'),
'url' => $this->getUrl('*/*/massDelete'),
'confirm' => Mage::helper('gao')->__('Are you sure?')
));
$statuses = Mage::getSingleton('blog/status')->getOptionArray();
array_unshift($statuses, array('label'=>'', 'value'=>''));
$this->getMassactionBlock()->addItem('status', array(
'label'=> Mage::helper('blog')->__('Change status'),
'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),
'additional' => array(
'visibility' => array(
'name' => 'status',
'type' => 'select',
'class' => 'required-entry',
'label' => Mage::helper('blog')->__('Status'),
'values' => $statuses
)
)
));
return $this;
}