AnsweredAssumed Answered

How can I make an action without loading the header?

Question asked by Pitou Pitou on Apr 26, 2014
Latest reply on May 3, 2014 by Pitou Pitou

Sorry for the title, english isn't my mother language :) .

My problem is simple. Actually, i've created a button for each row in my subpanel (like the remove button).

I've "copy-paste" the solution of the remove button to achieve my goal (My button change the value of a relation value). Everythings work perfect, except when i click on the button, the subpanel load the action in my controller and load a new html sugar page. After that, i make a refresh page, so the html sugar page instead of the subpanel stays 1 second but it isn't really cool.

So my question is : "How to simply make the action of my controller and not load the html sugar page ? ". In fact i want the same visible effect that i have when i remove a relation. Or is there something i can put in my action like "charge_header(false);" ? Or where is this famous "delete action" ? Because i didn't find it. 

I've a second question. Now, i've replaced the remove action by my new action. I don't find a way to add a new (third) button. How can i do that ? I've created a field in my  defaultSubpanel.php but it doesn't work if the name of the field isn't remove_button or edit_button. Where can i add my new_button.  i've tried in the vardefs, but didn't work. 

Thanks and Regards,