no, I had right constructor, my example just missed the
severity
From: Hans Sowa [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 09, 2006 10:38 AM
To: MyFaces Discussion
Subject: Re: <h:message problem
This code should work it looks my code except one but I think this should not be the problem but maybe:
FacesMessage errMsg = new FacesMessage(
FacesMessage.SEVERITY_INFO,
shortMsg,
longMsg);
I used an other Constructor. Maybe there is a problem with missing Severtiy.
best regards Hans
2006/2/9, Andrew Robinson <[EMAIL PROTECTED]>:
Are you using subviews or tiles perhaps? Before I switched to facelets I saw many problems like this where components fell out of "local scope" and the message tag could not locate a component due to the view/subview structure of a page.
On 2/9/06, Virtudazo, Dennis (Exchange) < [EMAIL PROTECTED]> wrote:Adding a message to the context for a clientId is not working. I saw in
the wiki page that the example matches my code. Can somebody give me a
hint what may be wrong?
Jsp:
<h:inputText id="refreshminutes" binding="#{ backingBean.myComponent}"
size="5" value="#{backingBean.refreshMinutes}" />
<h:message for="" showDetail="true"/>
Code:
FacesContext context = FacesContext.getCurrentInstance();
context.addMessage(myComponent.getClientId(context), new
FacesMessage("test", "test"));
The test message never displays. But error messages from the validator
do, for example, when I enter a non-numeric value into the
refreshMinutes inputText.
Btw, if I use <h:messages globalOnly="false", then the test message
displays.
I tried version 1.09-m9 and 1.1.1.
***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.
***********************************************************************
--
mfg Hans Sowa
mailto:[EMAIL PROTECTED]
*********************************************************************** Bear Stearns is not responsible for any recommendation, solicitation, offer or agreement or any information about any transaction, customer account or account activity contained in this communication. ***********************************************************************