Board index JavaServer Faces General Update component attributes on client

Update component attributes on client

Components, Ajax Framework, Utilities and More.


Posts: 9
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"/>
</p:panel>


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


Thanks!

Return to General