You need to sign in to do that
Don't have an account?
Kris 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.
The controller class pulls in the ID as seen in the snippet here
I use pretty much the same thing for an Account list, and the output link works fine for the Accounts.
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.
<vs:panel title="Opportunity" type="primary"> <vs:well style="text-align:center;"> <vs:glyph icon="briefcase" style="font-size:40px"/> <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.
Please try this.
-Thanks
Ashlekh Gera