You need to sign in to do that
Don't have an account?
DaniHell
How can I call a apex method with an parameter?
I want to call an apex method with an parameter on my own visualforce page?
public void getListe(String objectId){ Zeiterfassungsliste__c [] zeiterfassungslisteList; zeiterfassungslisteList = [SELECT Id FROM Zeiterfassungsliste__c WHERE Id =: objectId]; delete zeiterfassungslisteList; }
i hope you want to set the objectid value from the visualforce page. is this that you are looking out?
Yes, I want to call an apex method with an parameter from my custom visualforce page.
Hi,
Use <apex:param> tag to pass value from visualforce page to controller.
Regards,
Manjunath
you can simply call the method using the method name in the visualforce whether it is a parameterized or not....
if you want to pass a value to that parameter you can make use of query strings or apex:param tags to assign the value to a property varaible... or you can make use remoteaction like this
It's not working. I am getting the following error message.
I tried the same apexfunction with apex:param. I am getting the same error.
Please help.
Error Message:
My Code:
if you are passing as param then you neeed to get the value of the param using
apexpages.currentpage().getparameters().get('objectid')..........
you can do in an another way also
prepare a property in the class like
publis string objectid{get;set;}
and then in the vf page add the property to param like
<apex:param name="objectid" assignto="{!objectid}"/>
then you can use the objectid in the query directly....
ok and how can I set the parameter dynamically?
I want to set the value with javascript oder jquery.