h:commandLink problem solved by using hidding commandLink outside of the div.