This is an extension post for How to use jQuery star rating in JSF2
This post show how to set the Star Rating value when page loading.
It's also applicable for retrieving Star Rating value from database.
Steps:
Managed Bean
1. Declared a value holder, in session scope managedBean.
2. capture the star value and set into the value holder.
XHTML
1. bind the value holder with the "checked" attribute of the radio button.
This post show how to set the Star Rating value when page loading.
It's also applicable for retrieving Star Rating value from database.
Steps:
Managed Bean
1. Declared a value holder, in session scope managedBean.
2. capture the star value and set into the value holder.
XHTML
1. bind the value holder with the "checked" attribute of the radio button.
With the above steps, the Star Rating will show previously rated value (or value stored in database).
Done!!
No comments:
Post a Comment