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
TracMikeLTracMikeL 

Rendering in Facet Header

Hey Guys, I have 3 elements in a Header Facet. I want to not render one when a variable = false. Here is the code I have.

 

 

                    <apex:facet name="header">
                        <a href="/00T/e?tsk10=Call&what_id={!oId}&retURL=/{!oId}&followup=1" target="_top" class="btn" style="text-decoration: none;">Log A Call</a>
                        <a href="/_ui/core/email/author/EmailAuthor?p2_lkid={!aId}&rtype=003&p3_lkid={!oId}&retURL=/{!oId}" target="_top" class="btn" style="text-decoration: none;">Send An Email</a>
                        <a href="/007?id={!oId}&rlid=RelatedHistoryList&closed=1" target="_top" class="btn" style="text-decoration: none;">Go To List - Show All</a>
                    </apex:facet>

 

I want to be able to hide the 3rd link. I tried using a outputlink but if I set the rendered to false all elements in the facet disappear.

 

This is what I tried.

 

 

                    <apex:facet name="header">
                        <a href="/00T/e?tsk10=Call&what_id={!oId}&retURL=/{!oId}&followup=1" target="_top" class="btn" style="text-decoration: none;">Log A Call</a>
                        <a href="/_ui/core/email/author/EmailAuthor?p2_lkid={!aId}&rtype=003&p3_lkid={!oId}&retURL=/{!oId}" target="_top" class="btn" style="text-decoration: none;">Send An Email</a>
                        <apex:outputLink value="/007?id={!oId}&rlid=RelatedHistoryList&closed=1" id="theLink" rendered="{!bClosedLarge}">Go To List - Show All</apex:outputLink>
                    </apex:facet>

 

 

 

Thanks

Mike

 

Cory CowgillCory Cowgill

Have you tried wrapping each of the <a> elements in an <apex:outputPanel> and setting the outputPanel render for each outputPanel?

TracMikeLTracMikeL

I tried that. Same behavior as above. All the other elements in facet disappear.

 

Pradeep_NavatarPradeep_Navatar

Put your <apex:commandlink> inside the <apex:outputpanel> and rerender the id of outputpanel through acionfunction. Also check whether you have initialized the value of merge field inside the constructor.