You need to sign in to do that
Don't have an account?
vishwa attikeri
Problem in Rendered in apex:outputpanel
Hi,
I need help on Rendered functions, may be i am wrong with below code.
can any one please help me on this
i have a variable 'total' that contains some integer value this total will change depending on picklist by 'apex:actionsupport'.
here i have one button which will disable and enable with condition for
Ex: if total=50 enable the button
if total!=50 disable button
here is my code
<apex:form > <table class="list" > <tr> <td><b>field one</b></td> <td><apex:selectList value="{!licens}" size="1"> <apex:selectOptions value="{!Licenses}"/> <apex:actionSupport event="onchange" action="{!test}" reRender="lcnc,totl,counter" /> </apex:selectList></td> <td><apex:outputtext id="lcnc" value="{!licenses_Customer_have_Value}"/></td> </tr> <tr> <td><b>other Reason</b> </td> <td> <apex:selectList value="{!Reason}" size="1"> <apex:selectOptions value="{!Reasons}"/> <apex:actionSupport event="onchange" action="{!test}" reRender="Add,totl,counter" /> </apex:selectList></td> <td> <apex:outputtext id="Add" value="{!other_Reason_Value}"/></td> </tr> <tr> <td align="right"><b>Total</b> </td> <td > </td> <td > <apex:Outputtext id="totl" value="{!Total}"/> </td> </tr> </table> <apex:outputpanel id="counter" rendered="{!Total > 85}"> <apex:commandbutton action="{!Updatecase}" value="Update" /> </apex:outputpanel> </apex:form>
Hi Vishwa, Id and Rendered attribute don't work if used for same component, sometimes.
Try splitting them across the two components like done below.:
All Answers
Hi Vishwa, Id and Rendered attribute don't work if used for same component, sometimes.
Try splitting them across the two components like done below.:
Hi,
Yes Rahul is correct.
The output might not be rendered at the very first time of page load which is because rendered=false.
Further on refreshing this via AJAX will not work, since the id of the component will not be created in the page.
Checkout this link,
http://bobbuzzard.blogspot.co.uk/2011/02/visualforce-re-rendering-woes.html
Regards,
Bharathi
Salesforce For All
Thank you