Displaying Custom Error messages for DataTable in JSF

hi,i am using a data table to display the content of a list.the content gets displayed fine if the list is not empty,but nothing is displayed if the list is null...is there a way to display an error message if the datatable/list is null
[292 byte] By [ne.ideaa] at [2007-11-27 6:43:38]
# 1
You can use the outputText tag with the rendered attribute:<h:outputText rendered="#{empty myList}" value="No elements" />
RaymondDeCampoa at 2007-7-12 18:14:36 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Thanks a lot for your reply ...its working....but is there any way to use <h:message> for displaying the error message.
ne.ideaa at 2007-7-12 18:14:36 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
You would need to register a message via the FacesContext. If you are already executing bean code before rendering the page you should be able to add it there.
RaymondDeCampoa at 2007-7-12 18:14:36 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...