You need to sign in to do that
Don't have an account?
I have created a vf page and controller where I used action method, Now I want to display some data from controller but I am not able to retrieve.
Hi Members,
I have created a vf page and controller where I used action method, Now I want to display some data from controller but I am not able to retrieve. if I am creating constructor then Void method is not working.
Getting Error "Unknown property 'ControllerFeedback.obj'"
Below are the code:
Sumit,
I have created a vf page and controller where I used action method, Now I want to display some data from controller but I am not able to retrieve. if I am creating constructor then Void method is not working.
Getting Error "Unknown property 'ControllerFeedback.obj'"
Below are the code:
- <apex:page controller="ControllerFeedback">
- <apex:form >
- <apex:actionFunction name="doCallout" action="{!init}" rerender="none"/>
- </apex:form>
- <script>
- window.onload=function()
- {
- doCallout();
- }
- </script>
- <p><center><b>You have Successfully update Opt Out.</b></center></p>
- <apex:outputPanel>
- <apex:repeat value="{!obj}" var="a">
- <p>{!a.Name}</p>
- </apex:repeat>
- </apex:outputPanel>
- </apex:page>
- public class ControllerFeedback {
- private final alu_Opportunity_Matching__c obj;
- public void init() {
- Id ids = ApexPages.currentPage().getParameters().get('id');
- system.debug('Id'+ids);
- alu_Opportunity_Matching__c obj = [select id, Name,Application_Status__c FROM alu_Opportunity_Matching__c WHERE id = :ids];
- obj.Application_Status__c = 'Withdrawn';
- Update obj;
- return;
- }
- }
Sumit,
Can you just try the method name as below
public void getinit()
{
}
1) To access in VF page your variable should be public:
public final alu_Opportunity_Matching__c obj;
2) <apex:repeat accepts iterable, so change it to list
public List<alu_Opportunity_Matching__> obj;
3) It should be accessible I changed it to getter setter property:
public List<alu_Opportunity_Matching__> obj {get; set;}
ControllerFeedback class code:
Please compare your code and let me know if you have any question.
Thanks
Gulshan Raj