Tim Holloway wrote:You are correct. If there are no rows in the datamodel, no rows will render in the datatable (except for constants like headers/footers).
Hi Tim,
Strange that the values are not returning after i retrieved them. In the Apache Logs excerpt, it shows that the values are indeed retrieved (see bold):
11:16:09,992 INFO SecurityFilter:? - requestUri = /wm.pet/faces/listTransaction.
11:16:09,995 INFO SecurityFilter:? - authorization succeeded
11:16:10,047 INFO TransactionBean:? -
WM: transactionId-> 5
11:16:10,050 INFO TransactionBean:? -
WM: transactionAction-> closeAction
Hibernate: select transactio0_.id as id0_, transactio0_.USERNAME as USERNAME0_, t
11:16:10,064 INFO TransactionBean:? -
WM: transaction Counter Name-> Tester
11:16:10,066 INFO TransactionBean:? -
WM: transaction Units-> 1000
11:16:10,069 INFO TransactionBean:? -
WM: transaction Selling Date-> 2011-08-03 00:00:00.0
11:16:10,078 INFO TransactionBean:? -
WM: transactionBean Counter Name-> Tester
11:16:10,084 INFO TransactionBean:? -
WM: transactionBean Units-> 1000
11:16:10,091 INFO TransactionBean:? -
WM: transaction Selling Date-> Wed Aug 03 00:00:00 SGT 2011
11:16:10,100 INFO TransactionBean:? - Product with id of 5is retrieved successfu
Aug 5, 2011 11:16:10 AM org.apache.myfaces.config.annotation.Tomcat7AnnotationLif
INFO: Creating instance of wm.pet.view.bean.TransactionBean
but from the view source from Firefox, it shows that the values are not shown as per using your suggestion compared to the value that is retrieved from the logs (above):
One more strange thing is that the entire table generated from the panelGrid although shown in ths view source, is not rendered on the web page. The page returns a blank. Is there something amiss? The current TransactionBean is in request scope, I tried putting it into session scope but to no avail. I was wondering is there some issue with the way the attributes values in the TransactionBean are populated in its loadEditAction() method that does not allow the values to get persisted to the web page? Are there some declarations that I need to do at the start of the JSF page like what we do in JSP to get the TransactionBean instance containing the values?
PS: I need to explain abit more about the navigation that eventually leads to this page. This page is traveresed from a previous page containing a dataTable rendered set of TransactionBeans. Upon clicking a 'Close' link on that respective row, my intention is to traverse to a new page with certain fields that are already populated (e.g. buying price and buying date) during the retrieving of the listing of TransactionBeans to be used in the dataTable. With the empty attributes like the 'selling price' and 'selling date' to be filled in by the user. When I did more trying out, I actually noticed that the particular row's TransactionBean has the values still populated from its earlier without needing to do another database retrieval (via logs in the loadEditAction() method). I assumed that since it was in request scope, that the values would be gone once I clicked on the 'Close' link and the request goes back to the server. Apparently not as the values are still there (like the Counter Name and Units etc.) even without needing to do another database retrieval. Would this be the cause of these values not being passed to the subsequent page as the indirection would not allow the values to span multiple pages, which is the one that is currently giving me the problems?
I guess in a nutshell my question is" "why are the values being correctly shown in the logs but not being able to be displayed on the web page?"
Thanks again!!