当前位置: 动力学知识库 > 问答 > 编程问答 >

java - jsf page displays blank values on first load

问题描述:

I am new to JSF and need help with the following.

I have a scenario where I receive a response from a thrid party website in a ResponseServlet.

In the ResponseServlet, I call a 'CCBean' method to do some processing using the POST parameters appended to the ResponseServlet by the 3rd party website. I have some new result after an API call in this 'CCbean' method.

I need to display this result and some of the POST parameters in the jsf page which displays the properties of the CCBean.

The problem I have is whenever the jsf page is loaded for the first time, it displays blank values.If I attempt the transaction again - it displays all the values.

I am not initializing the bean in the jsf page, if I do the result value from the API is null.

I am simply doing

How do I get the CCBean properties to display correctly on the first load of the jsf page.

Please suggest.

My Code:

String paySuccess = CCBean.makePayment();

if(paySuccess.equalsIgnoreCase("X")) {

request.getRequestDispatcher("/pages/hpp_success.xhtml").forward(request, response);

} else {

request.getRequestDispatcher("/pages/failed.xhtml").forward(request, response);

}

分享给朋友:
您可能感兴趣的文章:
随机阅读: