You need to sign in to do that
Don't have an account?
CodeBee
How to render a DIV section ?
Good day,
I need to show a TextArea box when user select specific value from the multi-picklist, i do a little test myself on how to display the textarera if the multi-picklist value was change, here some sample code
VF page --------------- <apex:pageblock >
<apex:pageBlockSection collapsible="false" column="1"> <apex:pageBlockSectionItem> <apex:outputLabel value="Rating :" /> <apex:inputField value="{!myObject.multipicklist}" > <apex:actionSupport event="onchange" action="{!doMyAction}" /> </apex:inputField> </apex:pageBlockSectionItem> </apex:pageBlockSection> <apex:pageBlockSection collapsible="false" column="1"> <apex:pageBlockSectionItem rendered="{!isVisible}"> <apex:outputLabel value="Comment" /> <apex:inputField value="{!myObject.myTextArea}" /> </apex:pageBlockSectionItem> </apex:pageBlockSection> </apex:pageBlock>
Controller ----------- public isVisible {set;get;} public PageReference doMyAction(){ isVisible = true; return null; }
I can't figure out how to display the myTextArea div , anyone feel free to pinpoint my mistake, thank you !
You need to define a rerender on your actionsupport and an id on the element to rerender
Thanks Jim,
I found that pageBlockSectionItem can't be render and it only pageBlockSection allow.