I'm doing blog system in JSF. I have an idea similar to Facebook's 'like' system. I want to do my own such system in this blog. I ran into a problem because of tag. I mean, the page is refreshing when user clicked the like button. How can I fix that? Here is my JSF code:
<ui:repeat value="#{blogPost.queryPosts}" var="post">
<div style="border:1px;border-color: #333;" >
<li><h1>#{post.title}</h1></li>
<li><h:outputText value="#{post.content}" escape="false" /> </li>
<li>Like :<h:button value="Like" onclick="#{likePost.like2Post(post.id)}" title="Like" />
</li>
<li>reBlog</li>
<li>Comments:</li>
</div>
</ui:repeat>