Just wondering how I can use the value of a javascript variable to conditionally render a button like the code below.
<script>
var buttonShown = FALSE;
function ShowButton() {
buttonShown = TRUE;
}
</script>
<apex:commandButton onclick="ShowButton()"/>
<apex:commandButton action="{!DoSomething}" rendered="buttonShown"/>
I'm not quite sure how to get the boolean value into that last line. Any suggestions are appreciated!
Lightning Web Components
, which are the present and future of UI on the platform. WhileVisualforce
still has a place, it is basically only appropriate to use for email templates. Otherwise, it's considered a bit archaic.