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.
***********************************************************************


Reply via email to