You need to sign in to do that
Don't have an account?
Apex method in visualforce page
Hi!
I want to include an apex method, which needs an object as variable, into my own visualforce page. So, if anybody clicks on a commandLink the method should be envoked with the relative object.
My approach:
<apex:pageBlock title="Title">
<apex:dataTable value="{!method}" var="object" width="100%">
<apex:column >
<apex:facet name="header">ID</apex:facet>
<apex:form >
<apex:commandLink value="{!object.name}" action="{!method(object)}"/>
</apex:form>
</apex:column>
</apex:dataTable>
</apex:pageBlock>
The method [in dataTable value] is defined in an apex class and returns a list of several objects with some attributes, e.g. the name.
The method(object) [in commandLink action] is also defined in an apex class. Unfortunately I can't refer to the object.
Does anybody know why?
Thanks in advance!
Phil
All Answers
unfortunately there is a way to solve this problem ;-)
http://community.salesforce.com/sforce/board/message?board.id=Visualforce&thread.id=18815