O'Reilly logo

PrimeFaces Beginner's Guide by K. Siva Prasad Reddy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – creating Panel with custom actions

In this section we will look at creating a panel with two custom actions.

  1. Create a panel component and add custom actions using the actions facet:
    <p:dialog widgetVar="helpWidget" header="PrimeFaces Help">
      <p>Forum: http://forum.primefaces.org/ </p>
    </p:dialog>
    
    <p:panel header="About PrimeFaces" footer="PrimeFaces Rocks!!!">
          
       <f:facet name="actions">  
        <h:outputLink styleClass="ui-panel-titlebar-icon ui-corner-all ui-state-default"  value="javascript:void(0)" onclick="helpWidget.show()">  
          <h:outputText styleClass="ui-icon ui-icon-help" />  
        </h:outputLink>
    
        <h:outputLink styleClass="ui-panel-titlebar-icon ui-corner-all ui-state-default"  value="welcome.jsf?faces-redirect=true">  
     <h:outputText styleClass="ui-icon ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required