-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
4Questions
-
3Replies
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
-
- student
- November 19, 2009
- Like
- 0
- Continue reading or reply
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
-
- student
- November 19, 2009
- Like
- 0
- Continue reading or reply
How to include the standard button edit
Hi!
I want to include the standard button "Edit" into my own visualforce page. So, if anybody clicks on the ID of an entry, the relative edit page should open.
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.ID__c}" action="{!Edit}"/>
</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. One of these attributes is ID__c.
I'm already able to display the ID as normal text, but it isn't shown as commandLink with the action Edit.
Does anybody knows why?
Thanks in advance!
Phil
-
- student
- November 19, 2009
- Like
- 0
- Continue reading or reply
How to include a Standard Button
Hi,
I've made a new visualforce page for an object. As controller of this page, i made a new apex class with some additional methods...
Now I want to include the standard button "New" of this object in my own visualforce page. But everytime I include
<apex:commandButton value="blabla" action="{!New}"/>
to my page, the error "Unknown Method 'Controller.New()' " occurs.
Does anybody have an idea how to include the standard button otherwise?
Thanks in advance!
Phil
-
- student
- November 18, 2009
- Like
- 0
- Continue reading or reply
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
- student
- November 19, 2009
- Like
- 0
- Continue reading or reply
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
- student
- November 19, 2009
- Like
- 0
- Continue reading or reply
How to include a Standard Button
Hi,
I've made a new visualforce page for an object. As controller of this page, i made a new apex class with some additional methods...
Now I want to include the standard button "New" of this object in my own visualforce page. But everytime I include
<apex:commandButton value="blabla" action="{!New}"/>
to my page, the error "Unknown Method 'Controller.New()' " occurs.
Does anybody have an idea how to include the standard button otherwise?
Thanks in advance!
Phil
- student
- November 18, 2009
- Like
- 0
- Continue reading or reply