You need to sign in to do that
Don't have an account?
raysfdc1988
Rerender visualforce when an item from a picklist is selected
<apex:page controller="BookRoom" docType="html-5.0" > <apex:form > <apex:pageBlock > <apex:pageMessages id="msg"></apex:pageMessages> ////////This Is Picklist field///////////////// <apex:outputtext ><b>Room No</b></apex:outputtext> <apex:inputField value="{!dx.Room__c}" rendered="true" required="true"></apex:inputField> <br></br> <br> <apex:outputText escape="true"><b>Date</b></apex:outputText> <apex:inputfield value="{!dummyroom.Date__c}" required="true" rendered="true" /></br> <apex:outputtext ><b>Client Name</b></apex:outputtext> <apex:inputfield value="{!dx.Contact__c}" required="true" label="Client Name" /> <br/> <apex:commandButton value="Check Availability" action="{!CheckAvailability}" rendered="true"/> <br/> </apex:pageBlock> ///////////////////////////////////////////////////////////////////////// <apex:pageBlock rendered="{!ShowpageBlockFlag}"> <apex:dataTable value="{!BookingSlots}" var="bs" id="thetable" columnClasses="col1,col2,col3,col4" width="60%"> <apex:column value="{!bs.event.subject}"/> <apex:column value="{!bs.event.startdatetime}"/> <apex:column value="{!bs.event.enddatetime}"/> <apex:column ><apex:inputCheckbox value="{!bs.checkbox}" required="true"/></apex:column> </apex:dataTable> <br/><br/><br/> <apex:commandButton value="Book the slot" action="{!Savedetails}" rerender="msg,ol"/> <apex:commandButton value="Cancel" action="{!Cancel}" rerender="msg,pl"/> </apex:pageBlock> </apex:form> </apex:page>I want Rerender the first pageblock after item from picklist is changed...
Hi,
From your code it is hard to say which one is the picklist you are referring to.
You can refer to the below sample code and apply the same in your code
I would suggest you use one pageblock and different pageblockSections. Using multiple pageblocks in a single page is not a good practice
If this resolves your issue, please mark this as the answer
Thanks
You can achive this with the help of below code.
Apex Class:
VF Page:
Please mark as best answer if it solves your problem.
Regards,
Grazitti Team,