You need to sign in to do that
Don't have an account?
Javeed Shaik
I am not able to render a outputPanel based on the picklist Value selection
I am unable to render outputPanel based on the picklist Value selection. Please let me know what is wrong with my code.
Thanks in advancve!!
Thanks in advancve!!
<apex:page standardController="Case" extensions="PublisherController" showHeader="false"> <apex:form > <br/><br/><br/><br/> <table align="center" width="50%" cellpadding="5"> <tr> <th></th> <th></th> <th></th> <th></th> </tr> <tr> <td align="right"><apex:outputText >Model</apex:outputText> </td> <td align="left"><apex:inputField value="{!case.Model__c}"/> </td> <td align="right" rowspan="2"><apex:outputText >Description</apex:outputText> </td> <td align="left" rowspan="2"><apex:inputField value="{!case.description}"/> </td> </tr> <tr> <td align="right"><apex:outputText >Category</apex:outputText> </td> <td align="left"><apex:inputField value="{!case.Category__c}"/> </td> <td align="right"> </td> <td align="center"> </td> </tr> <tr> <td align="right"><apex:outputText >Problem</apex:outputText> </td> <td align="left"> <apex:ActionRegion > <apex:inputField value="{!case.Problem__c}"><apex:ActionSupport event="onchange" reRender="ddc"/></apex:inputField> </apex:ActionRegion> </td> <apex:outputPanel rendered="{!case.Problem__c=='Repair'}" id="ddc"> <td align="right"><apex:outputText >Requested Day</apex:outputText> </td> <td align="left"><apex:inputField value="{!case.Requested_Date__c}"/> </td> </apex:outputPanel> </tr> <tr> <td align="right"> </td> <td align="right"><apex:commandButton value="Cancel" Model="{!Cancel}"/> </td> <td align="left"><apex:commandButton value="Create Case" Model="{!save}"/> </td> <td align="center"> </td> </tr> </table> </apex:form> </apex:page>
Problem with your code has been explained by bob buzzard(Keir Bowden). This is due to re-rendering woes.
http://bobbuzzard.blogspot.in/2011/02/visualforce-re-rendering-woes.html
Try with below code , it will work fine . Hope this helps :)
Thanks a lot! I used the above code, the component is Rendering but not in the proper positon.
Try with below one , previously your table may not be forming properly , now it will work fine.
But I was trying to render the set of fields using a div or outputPanel by calling a single id (id of div or outputPanel) in reRender attribute.
Thanks a lot for your help!!