You need to sign in to do that
Don't have an account?

visualforce page
hi i created a page which looks like following

when i click on that links i should show another table and get the data from second object. here is my page code what can i do to acheive that.
in command link tag how can i redirect to class where i can get data.
when i click on that links i should show another table and get the data from second object. here is my page code what can i do to acheive that.
<apex:page controller="header" showHeader="false"> <style> table { border-collapse: collapse; } table, td, th { border: 1px solid black; width:20%; } </style> <apex:pageBlock > <apex:form > <table onload="makecasesclickable()"> <tr> <apex:repeat value="{!agrmnts}" var="c"> <td> <apex:outputText value="{!c}"></apex:outputText> </td> </apex:repeat> </tr> <apex:repeat value="{!body}" var="bd"> <apex:variable value="{!0}" var="index"/> <tr> <apex:repeat value="{!bd}" var="cd"> <td> <apex:outputText value="{!cd}" rendered="{!IF(index < 2,'true','false')}"></apex:outputText> <apex:commandLink value="{!cd}" rendered="{!IF(index >= 2,'true','false')}"/> </td> <apex:variable var="index" value="{!index+1}"/> </apex:repeat> </tr> </apex:repeat> </table> </apex:form> </apex:pageBlock> </apex:page>
in command link tag how can i redirect to class where i can get data.
You can do that by passing the parameter and fetching the data in controller and showing it on to the user.
Here is nice blog to achieve that.
http://blog.jeffdouglas.com/2010/03/03/passing-parameters-with-a-commandlink/
After you fetch the you can display it on same page using render reRender function
Here is an post on that
https://developer.salesforce.com/forums/ForumsMain?id=906F0000000BHAMIA4
Code for that is as follows
Page Controller
Donot forget to select best answer to make our efforts visible in the developer forum.
Please mark this as solution by selecting it as best answer if this solves your problem, So that if anyone has this issue this post can help
https://developer.salesforce.com/forums/ForumsMain?id=906F0000000BCIZIA4
Every record you display as link will have a unique id pass that and fetch the result as per that Id.
Hope this makes sense.