Update component attributes on client

Components, Ajax Framework, Utilities and More.
Post Reply
stim644
Posts: 15
Joined: 01 Apr 2012, 13:05

07 Apr 2012, 19:17

Hello. How insert component attribute on client with java script, without send request to server?
Button code:

Code: Select all

<p:commandButton onclick="showAddBookForm();" value="add book"  update="pan1"/>
Panel code:

Code: Select all

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

Code: Select all

            function showAddBookForm() { 
                pn1.visible = false;
                
            }
Thanks!

Post Reply
  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 9 guests