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
Anand@SAASAnand@SAAS 

Action:status facet with Images

Can the actionStatus facet have images embedded in them? Below is my visual force page:

 

<apex:page controller="DrilldownController" action="{!init}" showHeader="true">

<apex:form >
    <apex:actionFunction action="{!showRepDetail}" name="viewRepDetail" rerender="repDetail" status="rep_detail_sts">
        <apex:param name="repDetailAcctNbr" assignTo="{!repDetailAcctNbr}" value="" />
    </apex:actionFunction>    
                 
	<apex:outputPanel id="repDetail" layout="none">
		<c:RepDetail critAcctNbrs="{!repDetailAcctNbr}" rendered="{!repDetailAcctNbr!=null}" print="0" currUsr="{!currUsr}"/>	
	</apex:outputPanel>
                 
	<apex:actionStatus id="rep_detail_sts" stopText="">
		<apex:facet name="start">
            <apex:image url="{!URLFOR($Resource.AvonSiteAssets,'images/processing.gif')}"/><br/>
            {!$Label.Processing_Status_Message}
		</apex:facet>
	</apex:actionStatus>

    <table width="950" border="0" cellpadding="0" cellspacing="0">
        <apex:repeat value="{!reportRows}" var="rptRow">
			<tr>
				<td>
					<a href="javascript&colon;viewRepDetail('{!rptRow.row.MRKT_ACCT_KEY__c}');">
					{!rptRow.row.Representative__r.FirstName} {!rptRow.row.Representative__r.LastName}
					</a>
				</td>
			</tr>
		</apex:repeat>
	</table>
</apex:form> 

</apex:page>

 The text is displaying but the image is not getting displayed. Do I have do something different? I tried regular HTML <img> as well.

 

Best Answer chosen by Admin (Salesforce Developers) 
jwetzlerjwetzler

Facets can only have one child component, which is a little confusing since you technically only have one Visualforce component in there.  It's even more confusing because it does seem to be picking up part of your facet with no indication that you're doing anything wrong.  We already have a bug to make facets behave correctly if you supply multiple components.

 

If you wrap what's in your facet with an outputPanel, it should work fine.

All Answers

aballardaballard

That looks like it should be ok.   Have you verified that the image (and the static resource url) works ok if it is NOT in an actionStatus facet ?   I'm suspecting soemthing wrong with your static resource. 

 

jwetzlerjwetzler

Facets can only have one child component, which is a little confusing since you technically only have one Visualforce component in there.  It's even more confusing because it does seem to be picking up part of your facet with no indication that you're doing anything wrong.  We already have a bug to make facets behave correctly if you supply multiple components.

 

If you wrap what's in your facet with an outputPanel, it should work fine.

This was selected as the best answer
theitdeptrockstheitdeptrocks

Just to confirm, wrapping the above within an outputPanel does work.  Here's an example I used:

 

 

<apex:outputPanel >
    <apex:actionStatus id="SearchStatus" stopText="">
        <apex:facet name="start">
            <apex:image url="{!$Resource.searching}"/>                       
        </apex:facet>
    </apex:actionStatus>
</apex:outputPanel>