function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vivek KidambiVivek Kidambi 

Inputfield onchange not rendering component

I have a inputfield field which on changed should rerender a outputpanel. Pretty straightforward, but it couldnt get it working. Any help is appreciated. I can see the value getting changed on blur but the component is not rerendering based on true or false. 
 
<apex:outputPanel> 	
      <apex:inputField value="{!myvalue}"  id="val1" > 
          <apex:actionSupport event="onblur" action="{!validate}" reRender="test1"/>
       </apex:inputField>
</apex:outputPanel>
     <apex:outputPanel id="test1" rendered="{!sample}">
      <apex:outputText value="Please select a value"/>
</apex:outputPanel>


controller - 

            if (myvalue == null){
            	sample = true;    
            }
            else{
               sample = false;  
            }

 
sandeep sankhlasandeep sankhla
Hi success,

Can you share your class code here  so I can look into that and help you out ?

Thanks,
Sandeep
sandeep sankhlasandeep sankhla
Hi Success,

Please refer the below link for better understanding the rendering issue with actionsupport, it will be useful for you ..
http://harshesh7487.blogspot.in/2011/09/rerender-using-action-support-in.html

P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.

Thanks,
Sandeep
Salesforce Certified Developer