You need to sign in to do that
Don't have an account?

rerendering apex:messages
Hey everyone
I'm trying to create a responsive visualforce page, only rerendering the proper pageblocks etc. when needed to avoid doing full page rerenders. BUT I use <apex:messages/> to display error messages and I've not been able to get the apex:messages component to update without doing a full page rerender.
I've tried something like this:
<apex:messages id="msgBlock"/> ... <apex:commandButton action="{!someMethod} value="button" rerender="msgBlock"/>
Does anyone know how to do this or something with a simular functionality?
Thanks
Ronni
<apex:outputPanel id = "msgPanel"
<apex:outputLabel value ="{!message}"/>
<apex:outputPanel>
<apex:commandButton action="{!someMethod} value="button" rerender="msgPanel"/>
or
<apex:outputPanel id = "msgPanel"
<apex:messages id="msgBlock"/>
<apex:outputPanel>
...
<apex:commandButton action="{!someMethod} value="button" rerender="msgPanel"/>
All Answers
<apex:outputPanel id = "msgPanel"
<apex:outputLabel value ="{!message}"/>
<apex:outputPanel>
<apex:commandButton action="{!someMethod} value="button" rerender="msgPanel"/>
or
<apex:outputPanel id = "msgPanel"
<apex:messages id="msgBlock"/>
<apex:outputPanel>
...
<apex:commandButton action="{!someMethod} value="button" rerender="msgPanel"/>
Thanks, wrapping the <apex:messages/> in a outputPanel worked for me.