Output Text problem..

hey guys, I'm having a problem with my output text display. it keeps giving me the error

javax.faces.el.EvaluationException: Cannot get value for expression '#{messageController.statMessage!=null}'

i know i set and got it right, but I can't figure out why in won't continue..

<h:outputText styleClass="greenBoldText" rendered="#{messageController.statMessage!=null}" value="#{messageController.statMessage}"/>

here's my backing bean:

publicclass MessageController{

static Logger log= Logger.getLogger(MessageController.class);

private String statMessage;

public String getStatMessage(){

log.debug(statMessage);

ApplicationResources application = (ApplicationResources) FacesUtil.instance().getApplicationMapValue(FacesContext.getCurrentInstance(),"applicationRes");

statMessage = parseMessages(application.getMessageProps(),statMessage);

log.debug(statMessage);

return statMessage;

}

private String parseMessages(Properties propFile, String compareString){

String message =null;

message = propFile.getProperty(compareString);

return message;

}

publicvoid setStatMessage(String statMessage){

this.statMessage = statMessage;

log.debug(statMessage);

}

}

here's my faces config snippet:

<managed-bean>

<managed-bean-name>messageController</managed-bean-name>

<managed-bean-class>com.shipserv.webui.controllers.MessageController</managed-bean-class>

<managed-bean-scope>request</managed-bean-scope>

</managed-bean>

need all the help i can get.. thanks in advance!

[2395 byte] By [Arch_Bytesa] at [2007-11-27 8:06:52]
# 1
write a method with boolean return type. and there comes your logic. i hope it will work.
Manoj.s.Jaina at 2007-7-12 19:49:31 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
I do not think that the expression language understands the keyword null. Try using the empty keyword instead, e.g. #{empty messageController.statMessage}.
RaymondDeCampoa at 2007-7-12 19:49:31 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

what version/implementation of JSF are you using? You are correct this is a legal expression. Returning boolean will obviously work and actually I recommend doing that as I think value expression shuld be simple.

FYI. I tried your example using glassfish 1.2 implementation and it works fine so it could be your implementation.

smurray_eriea at 2007-7-12 19:49:31 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
The condition seems to be find I think I've narrowed down the problem.. There seems to be a problem in the get and set values.. I am able to set the values but then when I get them, it goes back to either blank or null.
Arch_Bytesa at 2007-7-12 19:49:31 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
I assume you can debug right, put break points in setter/getter to find out what is being set and what is being returned on get.
smurray_eriea at 2007-7-12 19:49:31 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...