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
AkiTAkiT 

Detail page's title bar mystically remains on the page

Hi folks!

I have two iframes in the page and show only 1 of these at a time. In action method I set which should show and return null PageReference. Iframe 1 contains detail page of an object - Iframe 2 other web content.

Mystically the title bar (apex:detail "title" attribute) of 1st iframe remains after action method is invoked. Is this known issue..?

I noticed that if I remove "subject" attribute from apex:detail,  title bar will not spook around. But I need "subject" attribute because I rerender the apex:detail - if "subject" is not defined, after rerender there is no result.

Code:
********* Page (only relev parts) ***************

<apex:iframe height="-100" width="-100" id="frame1" rendered="{!NOT(frame)}">

<!-- Standard Detail -->
<apex:outputPanel id="det" >
<apex:detail subject="{!$CurrentPage.parameters.id}" relatedList="false" title="false" relatedListHover="false" />
</apex:outputPanel>

</apex:iframe>

<apex:iframe id="frame2" src="http://www.google.com" rendered="{!frame}"/>

<apex:commandButton ... that invokes action... action="{!button}" />
<apex:commandButton ... other btn invokes other action and rerenders details... action="{!button2}" rerender="det"/>


********* Controller (only main parts) ***************

showFrame = false;

public PageReference button() {
  
  showFrame = true;

  return null;
  }
  
public Boolean getFrame() {
  
  return showFrame;
    
    }