You need to sign in to do that
Don't have an account?
Kbhaskar
dynamically render a pageblock based on radiobutton onchange
hi,
the below code(Still incorrect) is dynamically render a label value based on radiobutton onchange.but how i can dynamically render a pageblock based radiabutton onchange ?
Class
the below code(Still incorrect) is dynamically render a label value based on radiobutton onchange.but how i can dynamically render a pageblock based radiabutton onchange ?
<apex:page controller="Sample34"> <apex:form > <apex:pageBlock > <apex:pageBlockSection > Object Permissions: <apex:selectRadio > <apex:selectOption id="read1" itemLabel="Read" itemValue="f" /> <apex:selectOption id="write1" itemLabel="Write" itemvalue="cpp" /> <apex:actionsupport event="onchange" rendered="sampleView" /> </apex:selectRadio> </apex:pageBlockSection> <apex:outputPanel id="SampleView"> <apex:pageBlockSection rendered="{!isChecked}"> <apex:pageblockSectionItem > <apex:outputlabel value="Section 1"/> </apex:pageblockSectionItem> </apex:pageBlockSection> <apex:pageBlockSection rendered="{!IF(isChecked = true , false , true)}"> <apex:pageblockSectionItem > <apex:outputlabel value="Section 2"/> </apex:pageblockSectionItem> </apex:pageBlockSection> </apex:outputPanel> <apex:pageBlockButtons > <apex:commandButton value="Assign"/> </apex:pageBlockButtons> </apex:pageBlock> </apex:form> </apex:page>
Class
public class Sample34 { public Boolean isChecked { get; set; } }
Try code below
Vf page Apex Controller
Let me know if it's help.
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks,
Alex
All Answers
Try code below
Vf page Apex Controller
Let me know if it's help.
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks,
Alex