2 Replies Latest reply: Feb 23, 2012 1:17 PM by kamal_khadka RSS

how to save h:message in a bean property

kamal_khadka Newbie

I have a errro page. If the server throws an error this page is shown with details of error.

 

 


<ui:define name="body">

    <h1>#{messages.error_server}</h1>

    <p>#{messages.error_unkownError}</p>

    <p>#{messages.error_tryAgain}</p>

   

   

 

    <h:messages styleClass="message"/>

 

We tell the poeple who see this error to take screen shot and send it to us. Instead of that now I want to show this message in an inputArea with a submit button and when they submit it. It will come to my email. So i would know what the error users are getting.

 

So I tried to

 

<h:messages styleClass="message" bindind="#{someBean.errroMessage}"/>

 

my bean has getter and setter for errorMessage

 

And I have a mailTemplate setup so when they hit submit someBean.errorMessage is put in body of template and send to me.

 

There was problem with binding.

 

What should I be doing to work this.

 

Error doesn't happen often but sometimes it does.

 

Thank you for help.