You need to sign in to do that
Don't have an account?
EIE50
When clicked on an account link, user should navigate to respective account page
Hi,
when i click on any of the account listed, it should navigate to that particular account page. Currently, when i click on any of the account, the page gets refreshed and remains in the same place. Can any one tell me how this can be achived. Here is the VF'code,
<apex:page standardController="Account" recordSetVar="accounts"> <apex:pageBlock title="Viewing Accounts"> <apex:form id="theForm"> <apex:pageBlockSection> <apex:dataList value="{!accounts}" var="a" type="1"> <apex:commandLink>{!a.name} </apex:commandLink> </apex:dataList> </apex:pageBlockSection> <apex:panelGrid columns="4"> <apex:commandLink action="{!first}">First</apex:commandLink> <apex:commandLink action="{!previous}">Previous</apex:commandLink> <apex:commandLink action="{!next}">Next</apex:commandLink> <apex:commandLink action="{!last}">Last</apex:commandLink> </apex:panelGrid> </apex:form> </apex:pageBlock> </apex:page>
Thanks.
In my opinion, outputlink component seems more appropriate than commandlink. Try using the code below :
<apex:outputLink value="/{!a.Id}" target="_top">{!a.Name}</apex:outputLink>
Did this answer your question? if so, please mark it solved.
All Answers
Your command link need to be fixed ....you are not linking to anything
Good Luck!!
In my opinion, outputlink component seems more appropriate than commandlink. Try using the code below :
<apex:outputLink value="/{!a.Id}" target="_top">{!a.Name}</apex:outputLink>
Did this answer your question? if so, please mark it solved.
Hi,
I've made a similar list with my tasks using Data Tables. Check the next link
http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_dataTable.htm
Hope It could help you
Hi,
Thanks for the valuable inputs.
Mike : In command link if i use a value attrribute equal to {!a.id}, i get output like 07800000000aacDcikenson plc, and whn i click on the account displayed above i still stay on the same page after a page refresh.
Thanks.