dcsimg
Question about component rendering
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Catalin_Barbu
Posted On:   Friday, March 24, 2006 12:03 PM

Hello, I have a page which is supposed to display either a dataTable with some values taken from a DB, or an error message (e.g. "list empty"). I have tried setting a boolean variable in the backing bean, after reading from the DB and checking the returned ArrayList. This boolean is used in the .jsp page to decide whether the error message (an outputLabel) should be rendered or not. However, I cannot seem to get this to work. It seems to me that the life cylcle is so that the decision whether the outputText should be rendered is taken before the values are read from the DB. Even if the boolean getter is called again after the getter for the values has been called, this does not affect the way the page is displayed. Is there   More>>

Hello,



I have a page which is supposed to display either a dataTable with some values taken from a DB, or an error message (e.g. "list empty").



I have tried setting a boolean variable in the backing bean, after reading from the DB and checking the returned ArrayList. This boolean is used in the .jsp page to decide whether the error message (an outputLabel) should be rendered or not. However, I cannot seem to get this to work.



It seems to me that the life cylcle is so that the decision whether the outputText should be rendered is taken before the values are read from the DB. Even if the boolean getter is called again after the getter for the values has been called, this does not affect the way the page is displayed. Is there any way around this? How can I display an error message on the same page on which I am checking some data, i.e. without submitting the form?



Thank you,


Catalin

   <<Less
About | Sitemap | Contact