You need to sign in to do that
Don't have an account?
miko Lee
how to show a pageBlock using outputLink value
Hi guys, I want to show a pageBlock in the same VF page only after i press the outputLink. Hence, what should I put in outputLink so that when I press the link, it will direct me to the pageBlock that I want. Or there are still another way except from outputLink.
Now, the code below show the <apex:pageBlock title="Examination Result"> is stick with <apex:pageBlock title="Grade and Result" >. But what I want is after I press View, it will show the Grade and Result in the same VF page but without Examination Result pageBlock.
<apex:pageBlock title="Examination Result" rendered="{!showRecords}" > <!--apex:pageBlock title="Examination Result"--> <table> <tr> <td><apex:outputLabel >Current Date:</apex:outputLabel></td> <td><apex:outputText value="{!myCurrentDate}"/></td> </tr> </table> <apex:outputPanel> <apex:pageBlockTable value="{!resultList}" var="rl"> <apex:column value="{!rl.Exam_Date__c}"/> <apex:column value="{!rl.Exam_Token__r.Exam_Type__c}"/> <apex:column value="{!rl.Exam_Token__r.Proficiency_Level__c}"/> <apex:column value="{!rl.Exam_CorrectAns__c}"/> <apex:column value="{!rl.Exam_Token__r.Total_Question__c}"/> <apex:column value="{!rl.Exam_Score__c}"/> <apex:column > <apex:facet name="header">Grade and Result</apex:facet> <apex:outputLink value="/" >View</apex:outputLink> </apex:column> </apex:pageBlockTable> </apex:outputPanel > </apex:pageBlock> <apex:pageBlock title="Grade and Result" > <apex:outputPanel id="myPreviousResult"> <h3>Hello, {!$User.FirstName} {!$User.LastName}</h3> </apex:outputPanel> </apex:pageBlock>Thanks!!!
I think instead of using outputlink you can use a commandLink for this.
Now to show the pageblock with title 'grade and result' use a render attribute and make this false by default , make it true when the user click on the link in the page.The same can be done with the pageblock with title 'Examination Result'. I just make a demo code for it . Hope this will help you to achieve the functionality for your page. Refer this and let us know of this helps. Thanks.
All Answers
I think instead of using outputlink you can use a commandLink for this.
Now to show the pageblock with title 'grade and result' use a render attribute and make this false by default , make it true when the user click on the link in the page.The same can be done with the pageblock with title 'Examination Result'. I just make a demo code for it . Hope this will help you to achieve the functionality for your page. Refer this and let us know of this helps. Thanks.