Tuesday, April 27, 2010

JSF Page not submit issue

While using JSF developers may come across problem while submitting the page. Page may not be getting submitted. Following are finding for JSF not submission

1. Component in the jsf page may be seting as null. Check which component is null and fix it. Always initialize the variable in JSF backing bean.

2. Dropdown index value (SelectItem id) should be string and not integer!! So always while setting the List key value make sure it is string.

eg:
//Valid
int i = 0;
SelectItem item = new SelectItem(i+"", rvStatus.getDescription());


//Not Valid
int i = 0;
SelectItem item = new SelectItem(i, rvStatus.getDescription());

3. Rare cases - while displaying the multiple panel based on the render true or false in jsp may leads to break in submiting the button. This can be fixed by handling the render logic in backing bean by binding the panel.


There could be some more reason behind these please share it in the comment. Thanks

No comments:

Post a Comment