Genius ADF Buttons

I will present some genius ADF buttons that doing specific actions using Javascript

Print Page
I use the following button to print page content using window.print() method in Javascript.

 <af:commandButton text="Print Page" id="print_cb">  
     <af:clientListener type="click" method="window.print"/>  

Note you can use Show Printable Page Behavior operation to do the same purpose

<af:commandButton text="Print Page" id="print_cb">  

Open Website
I use the following button for opening a website in new window.

  <af:commandButton text="Open Dive in Oracle" id="open_cb">  
     <af:clientListener type="click"   
        method="'', '_blank')"/>  

Note you can use Go button for the same operation.

 <af:goButton text="Open Dive in Oracle (Go)" id="gb1" targetFrame="_blank"  

Close Window
I use the following button to close browser window

 <af:commandButton text="Close Page" id="close_cb">  
      <af:clientListener type="action" method="window.close"/>  


Popular posts from this blog

OAF : Get Current Row in Table

ADF : Get Current Logged User Name

ADF : Working with ViewCriteria