I ran in to this problem a while back as well. You need to use Ajax in your "Add to call list" javascript button to invoke your apex class. Specifically, you will use the 'GETRECORDIDS' function to get the ids of the selected records. I'm not sure exactly what you are trying to accomplish, but i've included some code that may help get you started.
{!REQUIRESCRIPT("/soap/ajax/21.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/21.0/apex.js")}
sforce.connection.sessionId = "{!$Api.Session_ID}";
// get the selected record ids
records= {!GETRECORDIDS($ObjectType.Widget)};
if (records[0] == null)
{
alert("Please select at least one Widget");
} else
{
var result = sforce.apex.execute("WidgetController","UpdateWidgets",{widget_ids:records,unlockFields:'LockedBy'});
var resultString = String(result);
// after our changes have been made, refresh the enhanced list on the page
ListViewport.instances['j_id0:enhancedWidgetList'].refreshList()
}
I ran in to this problem a while back as well. You need to use Ajax in your "Add to call list" javascript button to invoke your apex class. Specifically, you will use the 'GETRECORDIDS' function to get the ids of the selected records. I'm not sure exactly what you are trying to accomplish, but i've included some code that may help get you started.
Also, check out this link: AJAX toolkit