Board index JavaServer Faces General Update component attributes on client

Update component attributes on client

Components, Ajax Framework, Utilities and More.

Posts: 15
Hello. How insert component attribute on client with java script, without send request to server?
Button code:
<p:commandButton onclick="showAddBookForm();" value="add book"  update="pan1"/>

Panel code:
<p:panel id="pan1" widgetVar="pn1" visible="#{findBookBean.showFindBookForm}">
         <ui:include src="/pages/searchBook.xhtml"/>

Java Script code:
            function showAddBookForm() {
                pn1.visible = false;


Return to General