+ Start a Discussion
mac adminmac admin 

Clear the page message in custom vfpage

Hi all,

I showing the success message after uploading the file as an attachment form custom vfpage. Now I want to clear the page message when I click the Browse button in custom vfpage. Can we achive this.

Can anyone help me over here.

Thanks in advance.

Regards,
mac.
Vivian Charlie 1208Vivian Charlie 1208

Hi Mac,

 

On the Browse button can you set the rerender attribute and specify the pagemessage id for refresh

Example

<apex:page>

<apex:form>

<apex:pagemessages id= "pgMsg"/>

<apex:commandbutton action="{!yourMethod}" value="Browse" rerender="pgMsg"/>

</apex:form>

</apex:page>

 

Thanks

Vivian