function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kris HankinsKris Hankins 

output link not working in VF page using visualstrap

I am trying to use visualstrap to create a panel that shows Opportunities on a visualforce page. The panel shows fine, the information shows fine.....except for the output link. That does not seem to be functioning. If you click on the link it just stays on the current page. 
 
<vs:panel title="Opportunity" type="primary">  
           <vs:well style="text-align:center;">  
              <vs:glyph icon="briefcase" style="font-size:40px"/>&nbsp;<span style="font-size:54px">{!Opportunities.size}</span>  
              <p class="text-muted">Opportunities</p>  
           </vs:well>  
           <apex:dataTable value="{!Opportunities}" var="opp" styleClass="table table-condensed table-hover table-bordered" rows="3">  
             <apex:column headerValue="Opp Name ">  
               <apex:outputLink onclick="return goToDetailPage('{!opp.ID}')" >{!opp.Name}</apex:outputLink>  
             </apex:column>  
             <apex:column value="{!opp.StageName}" headerValue="Stage"/>  
             <apex:column value="{!opp.Amount}" headerValue="Amount"/>  
           </apex:dataTable>  
           <vs:alert rendered="{!Opportunities.empty}" type="warning" style="text-align:center">  
             <vs:glyph icon="exclamation-sign"/> No records to display  
           </vs:alert>  
         </vs:panel>

The controller class pulls in the ID as seen in the snippet here
 
public List<Opportunity> getOpportunities(){
     return [SELECT Id, Name, AccountID, StageName, Amount FROM Opportunity WHERE OwnerId=:UserInfo.getUserId() ORDER BY LastViewedDate DESC];  
   }

I use pretty much the same thing for an Account list, and the output link works fine for the Accounts. 
 
<vs:panel title="Last Viewed Accounts" type="primary">  
           <apex:dataTable value="{!Accounts}" var="acc" styleClass="table table-condensed table-hover table-bordered" >  
             <apex:column headerValue="Name">  
               <apex:outputLink onclick="return goToDetailPage('{!acc.Id}')" >{!acc.Name}</apex:outputLink>  
             </apex:column>  
             <apex:column value="{!acc.Type}" headerValue="Type"/>  
             <apex:column value="{!acc.BillingState}" headerValue="State"/>  
           </apex:dataTable>  
           <vs:alert rendered="{!Accounts.empty}" type="warning" style="text-align:center">  
             <vs:glyph icon="exclamation-sign"/> No records to display  
           </vs:alert>  
         </vs:panel>

I'm not getting why the Opportunity link isn't redirecting me to the record's detail page. Any ideas? i also have this issue with the Contact output link not redirecting. 

 
AshlekhAshlekh
Hi,

Please try this.
 
<apex:outputLink onclick="window.location.href='/{!opp.ID}')" >

-Thanks
Ashlekh Gera