I am not able to figure out what I am doing wrong. Request your inputs. Please.
I have a request scoped managed bean , which has a List of which I render as a datatable in my JSF 1.2 Apache my faces application. When I submit the form , and since there are some server side validations that fails, I add a FacesMessage and show the same JSF page.
In this request-response cycle , In the INVOKE-APPLICATION Phase , I am able to see the values of the List of but the when the page is rendered with the FacesMessage, the datatable is empty.
The other bean-properties and their values are retained in this request-response cycle except for this List / Datatable.
This is how the datatable is constructed in the action method - initial request
if(getInputXMLString() != null
&& getInputXMLString().length() >0)
{
List<NodeDetailsVO> nodes = Utility.inputXMLStringNodeDetailsVO(getInputXMLString());
setSelectedNodes(nodes);
}
When I try the same as above in the postback request (inside the other action method),It works okay.When I add my business Logic inside a private method, and If I call it above this code or after this, It doesn't work.I am only using the getter of the List in the private method. And in the getter method - I only have sysouts inside if and else.
This is how the datatable is rendered in the xhtml page:
<h:dataTable width="80%" cellspacing="0" border="1"
id="nodes_datatable" cellpadding="2"
style="border-collapse:collapse;"
value="#{createBean.selectedNodes}"
binding="#{createBean.selectedNodesHTMLDataTable}"
var="aResult"
columnClasses="columnAlignRight,columnAlignLeft"
>