This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I have a condition inside columns and it seems dataTable process it when no date from getter for data for dataTable. So, I solve problem by adding one line and with disabling rednering. But I think, it is not a good solution.
I don't put logic in my View (JSF page). Logic is what I put in the model (Backing Bean).
JSF was not intended to split program logic between model, view, and controller components and people frequently have problems when they try and do that.
Customer surveys are for companies who didn't pay proper attention to begin with.
Dmitriy Kastikovich
Greenhorn
Joined: Jun 29, 2008
Posts: 22
posted
0
del
Dmitriy Kastikovich
Greenhorn
Joined: Jun 29, 2008
Posts: 22
posted
0
Sorry-sorry-sorry... I haven't condition in JSF code. it looks like this:
And when list in bean is empty it crashes: javax.servlet.ServletException: Missing 'rows' attribute on component 'requests'
but I have it:
>
Actually, you do have conditions ("var.status = true"). But that one should be safe, although it's redundant. You don't have to compare a boolean to true/false, so you can just code it as 'rendered="#{var.status}"'.
I think you're missing some of your sample code, which may be because we just went online with new forum software (yes, the JavaRanch is now actually coded in Java!).
But specifying rows="0" makes no sense, so you may be triggering a bug. The "rows" attribute isn't used to indicate the amount of data you have, it's used to limit the maximum number of rows that will display. Normally, I set it to around 10 to 20 and add a page control if there's possibly more data than that. That way I can keep the displayed page to something that's fairly readable.
Tim Holloway wrote:Actually, you do have conditions ("var.status = true"). But that one should be safe, although it's redundant. You don't have to compare a boolean to true/false, so you can just code it as 'rendered="#{var.status}"'.
Note that he is comparing them as strings instead of booleans.