0

I have 3 dependent dropdowns in my VF page. Upon selection of these, a pageblocktable is displayed. I want the table to be displayed only after the selection of 3 dropdowns. I dont want the table to be visible on PageLoad. How do i control the visibility of this table?

2

Add a property to your controller that checks the values selected in the 3 dropdowns:

public Boolean renderTable {
    get {
        return !String.isEmpty(dropDown1)
                && !String.isEmpty(dropDown2)
                && !String.isEmpty(dropDown3);
    }
}

and render your table accordingly:

<apex:pageBlockTable rendered="{!renderTable}" ...

You will need to add an onchange apex:actionSupport to the dropdowns that re-renders the containing element of the apex:pageBlockTable when any of them change.

| improve this answer | |

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.