+ Start a Discussion

CommandLink tag Question

Hi there,


I have two visualforce pages. PageA and PageB.


In PageA, I have a pageBlockTable and one of the column is a commandLink:


<apex:column headerValue="Name">
     <apex:commandLink value="{!jb.Name}" action="{!jbDetail}" >
          <apex:param name="eJbId" value="{!jb.Id}" />



When the user clicks the commandLink I am passing a parameter to the action jbDetail and that method takes the user to the PageB.


This all works fine and it opens in the same page and that is how I want it to work. But now if a user goes to pageA and right click the commandLink above and select 'Open in New Tab' or 'Open in New Window', it opens PageA again on the tab or the new window instead of opening PageB.  How can I fix this? Did anyone come across this before? Please help. Thank You.




Make it a standard HTML anchor link and generate the URL in VFPage at runtime.