0

I have a visualforce page (importContacts) which will take users through two flows of screen. The first is to give an option of which type of contact i.e. temporary/permanent. Upon selecting from the selectRadio and clicking next button, I want to be able to display a table of contact based on the selection option without redirecting to a new page and without using flow:interview.

1

The way I like to this is by using the rendered and reRender attributes.

<apex:form id='theForm>
    <apex:commandButton id='button' action="{!myAction}" reRender="theForm"/>
     // rendered if boolean variable in controller is true
     <apex:pageBlock rendered="{!displayQuestions}">

           //Your questions section goes here

     </apex:pageBlock>
     // rendered if boolean variable in controller is true
     <apex:pageBlock rendered={!displayContactList}>  

            //your contact list goes here

     </apex:pageBlockSection>
</apex:form>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.