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
RustyboyRustyboy 

Conditional display of component

Hi,

I have a component which I want to conditionally display (as a modal dialog). It is all working fine, but the second, thrid call etc do NOT reset the attributes, the component seems stuck with the attributes from the first call.

Here is the component:
<apex:page Controller="DemoModalController" >
    <apex:pageMessages />
	<apex:form id="theForm">
		<h1>Demo Modal</h1>
		<apex:pageBlock id="thePageBlock2" >	
			<apex:inputField value="{!meetingItem.Meeting__c}" required="false"/>
		</apex:pageBlock>
		
		<apex:outputPanel id="itemPanel"> 		
			<apex:commandButton value="Open Dialog"
       		     	action="{!openCreateMeetingItem}" 
           		 	title="Open the modal dialog"
           		 	rerender="itemPanel"/>
	   
	   		<apex:outputPanel id="CreateMeetingItem" " >	            		 	
				<c:CreateMeetingItem rendered="{!displayModal.displayCreateMeetingItem}"
					displayModalObj="{!displayModal}" meetId="{!meetingID}" attendeeList="{!attendees}" itemVoterList="{!itemVoters}"/>
			</apex:outputPanel>		
		</apex:outputPanel>
	</apex:form>
</apex:page>
Is there a way to force the component to refresh?

Thanks in advance