You need to sign in to do that
Don't have an account?
vanessa veron
visualforce action with parameters
Hello!!!
Is it possible to pass parameters / args in Visualforce Page?
Thank you!!!
Is it possible to pass parameters / args in Visualforce Page?
Thank you!!!
PAGE: <apex:pageBlockTable value="{!jobRecords}" var="ac"> <apex:column headervalue="Name Job" value="{!ac.CronJobDetail.Name}"/> <apex:column headervalue="Status" value="{!ac.State}"/> <apex:column headervalue="Expression" value="{!ac.CronExpression}"/> <apex:column> <apex:commandButton value="X" action="{!deleteJob('NAMEEE')}"/></apex:column> </apex:pageBlockTable> APEX: public void deleteJob(String nameJob) { idJobDel= new List<CronTrigger>(); idJobDel= [SELECT Id FROM CronTrigger where CronJobDetail.Name =: nameJob]; System.abortJob(idJobDel[0].id); }
use strJobName as property of the class.
public String strJobName {get;set;}
thanks,
Ramesh
All Answers
Ramesh
Hi Vanessa,
Yes it is possible to pass parameters to Apex Class from Visualforce Page.
You will need to create following points :
1. Public String strJobName {get;set;}
2. Action function on visualforce page.
3. On apex:commandbutton remove action attribute and have onclick attribute.
I hope this will provide answer for your question.
Please let me know your response.
Thanks
Rehan Developer, It didn't work:
The job is not deleted as desired!!!
use strJobName as property of the class.
public String strJobName {get;set;}
thanks,
Ramesh
thanks,
Ramesh