How do I use jQuery UI's button in my existing JSF code?
Let's say I have the following checkbox code in my xhtml file.
<h:outputLabel value="Status"/><h:selectBooleanCheckbox id="stat" value="#world.getreality().status}"/>
I would like to use jQuery UI's checkbox instead.开发者_开发百科 I do the following and I can get the JQuery UI button rendered but I have no idea how to get it to talk to my bean.
<script>
jQuery( "#display" ).button();
</script>
<div id="display">
<input type="checkbox" id="stat" /><label for="stat">Status</label>
</div>
Update: Is what I'm asking not standard? Update 2: I'd really like some input on this question. If there's something that is unclear or lacking please make a comment.
Perhaps Primefaces might help? They use jQuery UI / ThemeRoller as their primary styling method.
All you need to do is simply wire up your checkbox to an event handler like:
$('#stat').click(function(){
// Do some stuff here
});
精彩评论