Sir,
The row custom action is giving error "star not found", when i click the "Add Star" link in the List Page.
Code as in documentation just copied and pasted for checking
function ListOptions_Load()
{
// Example:
$opt = &$this->ListOptions->add("new");
$opt->Header = "xxx";
$opt->OnLeft = true; // Link on left
$opt->moveTo(0); // Move to first column
}
// ListOptions Rendered event
function ListOptions_Rendered()
{
// Example:
//$this->ListOptions["new"]->Body = "xxx";
$this->ListOptions["new"]->Body = "<a href=\"#\" onclick=\"return ew.submitAction(event, {action: 'star', method: 'ajax', msg: 'Add star?', key: " . $this->keyToJson(true) . "});\">Add Star</a>";
}
// Row Custom Action event
function Row_CustomAction($action, $row)
{
// Return false to abort
if ($action == "star") { // Check action name
$this->setSuccessMessage("All selected records updated.");
return true; // Success
}
}
When i was searching for solution in the forum, i found one topic @ /viewtopic.php?t=51081
to check the protected function processListAction()
i did var_dump as
$actionCaption = $userAction;
var_dump($userAction,$filter);
$listAction = $this->ListActions[$userAction] ?? null;
it is showing string(4) "star" string(17) "(ProductID
= 3)" 'star' not found
Then i var_dump as
$actionCaption = $userAction;
$listAction = $this->ListActions[$userAction] ?? null;
if ($listAction) {
var_dump($userAction,$filter);
$this->UserAction = $userAction;
giving error "star not found", execution is not entering if ($listAction) {
i could not figure out where i did mistake.
Anything i am missing or entered incorrect sir