SlideShare a Scribd company logo
1 of 60
Download to read offline
Çagatay Çivici
Çagatay Çivici
 JSF Expert Group Member (JSR-314, JSR-344)
 PrimeFaces Architect and Lead Developer
 Apache MyFaces PMC
 Speaker, Author, Reviewer
 Co-Founder of Prime Teknoloji
 Nickname: optimus.prime
Prime Teknoloji
 Java EE, OSS, Agile, Mobile, E-Commerce
 Consulting
 Training
 Delivery
 Offices in Istanbul and Ankara
 34 Employees (Nov 2012)
 www.prime.com.tr
4 years old
Lightweight
Easy to Use
Only 1 Jar
1.7~ mb
No required
dependencies
Zero Config
Who Uses PrimeFaces?
PrimeFaces in the Wild
Most Popular
Global
100+ UI Components
Mock OS X
Form Components
Browser Support
Hide Complexity
       CSS                         JS                         AJAX



                 Keep Flexibility
 <p:tabView onTabChange=”handleTabChange()”>
   <p:ajax event=”change” listener=”#{bean.onTabChange}” update=”comp” />
      //tabs
 </p:tabView>


 CSS                   JS                Client                 Ajax
Override               API              Callbacks             Callbacks
Anatomy of a Component
 JSF      <p:schedule id=”sch” value=”#{bean.model}” editable=”true” />


Markup    <div id=”sch”></div>


          <script type=”text/javascript”>
 Script     scheduleWidget = new PrimeFaces.widget.Schedule(‘sch’, {editable:true});
          </script>




                     You get:
Accessibility
Keyboard/Mouse




ARIA Attributes
HTML5

                 data-*
canvas                            websockets

         forms            media
Ajax in PrimeFaces


 Server APIs: Standard JSF 2
 Client APIs:
Ajax Extensions

                p:ajax

autoUpdate                   Callbacks

              Selectors

AjaxStatus                RequestContext

             partialSubmit
p:ajax       f:ajax
oncomplete   onevent
 onerror     onerror
  onstart
onsuccess
  async
  global
AjaxStatus
               <p:ajaxStatus>
                 <f:facet name=”start”>
                       <p:graphicImage value=”fancyanimation.gif” />
                 </f:facet>
 Declarative     <f:facet name=”complete”>
                       <h:outputText value=”Request Completed” />
                 </f:facet>
               </p:ajaxStatus>



Programmatic   <p:ajaxStatus onstart=”dialog.show()” oncomplete=”dialog.hide()” />



   Global      <p:commandButton global=”true|false” />
RequestContext - Params
               <p:commandButton value=”Submit” action=”#{bean.save}”
JSF Page           oncomplete=”handleComplete(xhr, status, args)” />


 Bean          public void save() {
                RequestContext rc = RequestContext.getCurrentInstance();
                rc.addCallbackParam(“person”, person);
           }




Callback   <script type=”text/javascript”>
             function handleComplete(xhr, status, args) {
                   alert(args.person.name);
             }
           </script>
RequestContext - Scripts
               <p:commandButton value=”Submit” action=”#{bean.save}” />
JSF Page
               <p:dialog widgetVar=”dialogWidget” ... />


               public void save() {
 Bean           RequestContext rc = RequestContext.getCurrentInstance();
                rc.execute(“dialogWidget.hide()”);
           }
RequestContext - Update
               <p:commandButton value=”Submit” action=”#{bean.save}” />
JSF Page
               <h:outputText id=”val” value=”#{bean.property}” />


               public void save() {
 Bean           RequestContext rc = RequestContext.getCurrentInstance();
                rc.addPartialUpdateTarget(“val”);
           }


                                                   or
               <p:commandButton value=”Submit” action=”#{bean.save}”
                               update=”val” />

               <h:outputText id=”val” value=”#{bean.property}” />
RequestContext - Scroll

           <p:commandButton value=”Submit” action=”#{bean.save}” />
Page
           <h:outputText id=”val” value=”#{bean.property}” />


           public void save() {
Bean        RequestContext rc = RequestContext.getCurrentInstance();
            rc.scrollTo(“val”);
       }
AutoUpdate
  <p:growl id=”messages” />

 <p:commandButton value=”Save” update=”messages” />
 <p:commandButton value=”Update” update=”messages” />
 <p:commandButton value=”Delete” update=”messages” />




 <p:growl id=”messages” autoUpdate=”true”/>

 <p:commandButton value=”Save” />
 <p:commandButton value=”Update” />
 <p:commandButton value=”Delete” />
PartialSubmit
                     False                                                           True
 Post                                                       Post
Data:javax.faces.partial.ajax=true&javax.faces.source=fo   Data:javax.faces.partial.ajax=true&javax.faces.source=for
rm%3Aj_idt18&javax.faces.partial.execute=form              m%3Aj_idt18&javax.faces.partial.execute=form
%3Aname&javax.faces.partial.render=form                    %3Aname&javax.faces.partial.render=form
%3Adisplay&form%3Aj_idt18=form                             %3Adisplay&form%3Aj_idt18=form
%3Aj_idt18&form=form&form%3Aname=&form                     %3Aj_idt18&form=form&form
%3Aj_idt20=&form%3Aj_idt22=&form%3Aj_idt24=&form           %3Aname=&javax.faces.ViewState=7916482521909421
%3Aj_idt26=&form%3Aj_idt28=&form%3Aj_idt30=&form           983%3A-2156051337299048496
%3Aj_idt32=&form%3Aj_idt34=&form%3Aj_idt36=&form
%3Aj_idt38=&form%3Aj_idt40=&form%3Aj_idt42=&form
%3Aj_idt44=&form%3Aj_idt46=&form%3Aj_idt48=&form
%3Aj_idt50=&form%3Aj_idt52=&form%3Aj_idt66=&form
%3Aj_idt68=&form%3Aj_idt70=&form%3Aj_idt72=&form
%3Aj_idt74=&form%3Aj_idt76=&form%3Aj_idt78=&form
%3Aj_idt80=&form%3Aj_idt82=&form%3Aj_idt84=&form
%3Aj_idt86=&form%3Aj_idt88=&form%3Aj_idt90=&form
%3Aj_idt92=&form%3Aj_idt94=&form%3Aj_idt96=&form
%3Aj_idt98=&javax.faces.ViewState=79164825219094
21983%3A-2156051337299048496
PrimeFaces Selectors (PFS)
  update=”@(form)”

  update=”@(form.first)”

  update=”@(.mystyle)”

  update=”@(.ui-datatable)”

  update=”@(:input:not(select))”

 update=”@(:input:disabled))”
ResourceHandling

                                On The Fly
         Optimizations    and    Loading




Minify      Merge    Compress
Demo
Themes
Twitter Bootstrap Theme
Install a Theme

    Add primefaces-{themename}.jar




                    Configure
   <context-param>
    <param-name>primefaces.THEME</param-name>
    <param-value>{themename}</param-value>
   </context-param>
Roll your own
Advanced Themes
Demo
PrimeFaces Mobile
PrimeFaces Mobile
 <pm:page title="TwitFaces">

        <pm:view id="main" swatch="b">
            <pm:header title="TwitFaces">
            </pm:header>

            <pm:content>
                <h:form id="twitForm">
                    <h:outputText value="Account: " />
                    <h:inputText value="#{twitterController.username}" />
                    <p:separator />
                    <p:commandButton value="Get Tweets" icon="refresh" update="tweetList"
                                      actionListener="#{twitterController.loadTweets}" />

                    <p:dataList id="tweetList" value="#{twitterController.tweets}" var="tweet">
                        #{tweet}
                    </p:dataList>
                </h:form>
            </pm:content>
        </pm:view>

    </pm:page>
PrimeFaces Mobile



         powered by
Demo
PrimeFaces Push


        Atmosphere
Demo
Javascript                        CSS




   Rest, Jax-RS, Php, Spring MVC ...
Pure JavaScript
<input id=”spinner” type=”text” />          $(‘#spinner’).puispinner();



 <div id="default">                                            $(‘#default’).puitabview();
    <ul>
       <li><a href="#tab1">Tab 1</a></li>
       <li><a href="#tab2">Tab 2</a></li>
       <li><a href="#tab3">Tab 3</a></li>
   </ul>
   <div>
       <div id="tab1">                                          $(‘#default’).puitabview({
           content 1                                               orientation: ‘left’
       </div>                                                 });
       <div id="tab2">
           content 2
       </div>
       <div id="tab3">
           content 3
       </div>
   </div>
</div>
Demo
Portlets

                    via




    Sample: /svn/examples/trunk/prime-portlet
On the Cloud

      http://primefaces-rocks.appspot.com



     http://primefaces-gae-kickstart.appspot.com


     http://blog.jelastic.com/2012/06/11/how-to-deploy-primefaces-applications-into-jelastic-cloud/
Documentation



        500+ Pages
Community



            3000 posts / month
Bundled with NetBeans 7.x
PrimeFaces PRO




 Support   Training   Consulting
Scaffholding
RoadMap
Current 3.4.2
Next Major 3.5
Maintenance 3.4.x
Mobile 1.0
PrimeUI JS Library
PrimeFaces for ASP.NET
Q/A
       contact@prime.com.tr

           @primefaces


        groups/primefaces


      http://blog.primefaces.org

More Related Content

What's hot

E2 appspresso hands on lab
E2 appspresso hands on labE2 appspresso hands on lab
E2 appspresso hands on labNAVER D2
 
[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법Jeado Ko
 
Angular JS blog tutorial
Angular JS blog tutorialAngular JS blog tutorial
Angular JS blog tutorialClaude Tech
 
jQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a TreejQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a Treeadamlogic
 
Introduction to backbone presentation
Introduction to backbone presentationIntroduction to backbone presentation
Introduction to backbone presentationBrian Hogg
 
浜松Rails3道場 其の参 Controller編
浜松Rails3道場 其の参 Controller編浜松Rails3道場 其の参 Controller編
浜松Rails3道場 其の参 Controller編Masakuni Kato
 
IndexedDB - Querying and Performance
IndexedDB - Querying and PerformanceIndexedDB - Querying and Performance
IndexedDB - Querying and PerformanceParashuram N
 
Secure WordPress Development Practices
Secure WordPress Development PracticesSecure WordPress Development Practices
Secure WordPress Development PracticesBrandon Dove
 
Jlook web ui framework
Jlook web ui frameworkJlook web ui framework
Jlook web ui frameworkHongSeong Jeon
 
Django class based views for beginners
Django class based views for beginnersDjango class based views for beginners
Django class based views for beginnersSpin Lai
 
What's new in Rails 4
What's new in Rails 4What's new in Rails 4
What's new in Rails 4Fabio Akita
 
Posts ‹ teslaecoenergy — word press php
Posts ‹ teslaecoenergy — word press phpPosts ‹ teslaecoenergy — word press php
Posts ‹ teslaecoenergy — word press phpMiroslav Miskovic
 
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)arcware
 
PHPConf-TW 2012 # Twig
PHPConf-TW 2012 # TwigPHPConf-TW 2012 # Twig
PHPConf-TW 2012 # TwigWake Liu
 
No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...
No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...
No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...Atlassian
 
ILUG 2010 - Deploying plug-ins to the enterprise
ILUG 2010 - Deploying plug-ins to the enterpriseILUG 2010 - Deploying plug-ins to the enterprise
ILUG 2010 - Deploying plug-ins to the enterpriseRené Winkelmeyer
 

What's hot (18)

E2 appspresso hands on lab
E2 appspresso hands on labE2 appspresso hands on lab
E2 appspresso hands on lab
 
Sane Async Patterns
Sane Async PatternsSane Async Patterns
Sane Async Patterns
 
[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법
 
Angular JS blog tutorial
Angular JS blog tutorialAngular JS blog tutorial
Angular JS blog tutorial
 
jQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a TreejQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a Tree
 
Introduction to backbone presentation
Introduction to backbone presentationIntroduction to backbone presentation
Introduction to backbone presentation
 
浜松Rails3道場 其の参 Controller編
浜松Rails3道場 其の参 Controller編浜松Rails3道場 其の参 Controller編
浜松Rails3道場 其の参 Controller編
 
IndexedDB - Querying and Performance
IndexedDB - Querying and PerformanceIndexedDB - Querying and Performance
IndexedDB - Querying and Performance
 
Secure WordPress Development Practices
Secure WordPress Development PracticesSecure WordPress Development Practices
Secure WordPress Development Practices
 
Jlook web ui framework
Jlook web ui frameworkJlook web ui framework
Jlook web ui framework
 
Django class based views for beginners
Django class based views for beginnersDjango class based views for beginners
Django class based views for beginners
 
What's new in Rails 4
What's new in Rails 4What's new in Rails 4
What's new in Rails 4
 
Posts ‹ teslaecoenergy — word press php
Posts ‹ teslaecoenergy — word press phpPosts ‹ teslaecoenergy — word press php
Posts ‹ teslaecoenergy — word press php
 
JSF 2.0 Preview
JSF 2.0 PreviewJSF 2.0 Preview
JSF 2.0 Preview
 
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
 
PHPConf-TW 2012 # Twig
PHPConf-TW 2012 # TwigPHPConf-TW 2012 # Twig
PHPConf-TW 2012 # Twig
 
No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...
No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...
No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...
 
ILUG 2010 - Deploying plug-ins to the enterprise
ILUG 2010 - Deploying plug-ins to the enterpriseILUG 2010 - Deploying plug-ins to the enterprise
ILUG 2010 - Deploying plug-ins to the enterprise
 

Viewers also liked

AnkaraJUG Haziran 2013 - No SQL / Big Data
AnkaraJUG Haziran 2013 - No SQL / Big DataAnkaraJUG Haziran 2013 - No SQL / Big Data
AnkaraJUG Haziran 2013 - No SQL / Big DataAnkara JUG
 
Ankara JUG Şubat 2014 Etkinliği - Design Patterns
Ankara JUG Şubat 2014 Etkinliği - Design PatternsAnkara JUG Şubat 2014 Etkinliği - Design Patterns
Ankara JUG Şubat 2014 Etkinliği - Design PatternsAnkara JUG
 
Java EE7 in action
Java EE7 in actionJava EE7 in action
Java EE7 in actionAnkara JUG
 
Ankara JUG Eylül 2013 Etkinliği - Eclipse RCP 4
Ankara JUG Eylül 2013 Etkinliği - Eclipse RCP 4Ankara JUG Eylül 2013 Etkinliği - Eclipse RCP 4
Ankara JUG Eylül 2013 Etkinliği - Eclipse RCP 4Ankara JUG
 
Programlama Dili Olarak JAVA - Muhammet ÇAĞATAY
Programlama Dili Olarak JAVA - Muhammet ÇAĞATAYProgramlama Dili Olarak JAVA - Muhammet ÇAĞATAY
Programlama Dili Olarak JAVA - Muhammet ÇAĞATAYMuhammet ÇAĞATAY
 

Viewers also liked (7)

AnkaraJUG Haziran 2013 - No SQL / Big Data
AnkaraJUG Haziran 2013 - No SQL / Big DataAnkaraJUG Haziran 2013 - No SQL / Big Data
AnkaraJUG Haziran 2013 - No SQL / Big Data
 
Ankara JUG Şubat 2014 Etkinliği - Design Patterns
Ankara JUG Şubat 2014 Etkinliği - Design PatternsAnkara JUG Şubat 2014 Etkinliği - Design Patterns
Ankara JUG Şubat 2014 Etkinliği - Design Patterns
 
Java EE7 in action
Java EE7 in actionJava EE7 in action
Java EE7 in action
 
Ankara JUG Eylül 2013 Etkinliği - Eclipse RCP 4
Ankara JUG Eylül 2013 Etkinliği - Eclipse RCP 4Ankara JUG Eylül 2013 Etkinliği - Eclipse RCP 4
Ankara JUG Eylül 2013 Etkinliği - Eclipse RCP 4
 
Nedir Bu Java ?
Nedir Bu Java ?Nedir Bu Java ?
Nedir Bu Java ?
 
Programlama Dili Olarak JAVA - Muhammet ÇAĞATAY
Programlama Dili Olarak JAVA - Muhammet ÇAĞATAYProgramlama Dili Olarak JAVA - Muhammet ÇAĞATAY
Programlama Dili Olarak JAVA - Muhammet ÇAĞATAY
 
Eclipse
EclipseEclipse
Eclipse
 

Similar to AnkaraJUG Kasım 2012 - PrimeFaces

Primefaces Confess 2012
Primefaces Confess 2012Primefaces Confess 2012
Primefaces Confess 2012cagataycivici
 
Primefaces Nextgen Lju
Primefaces Nextgen LjuPrimefaces Nextgen Lju
Primefaces Nextgen LjuSkills Matter
 
Primefaces Nextgen Lju
Primefaces Nextgen LjuPrimefaces Nextgen Lju
Primefaces Nextgen LjuSkills Matter
 
Rich Portlet Development in uPortal
Rich Portlet Development in uPortalRich Portlet Development in uPortal
Rich Portlet Development in uPortalJennifer Bourey
 
ASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin LauASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin LauSpiffy
 
JavaServer Faces 2.0 - JavaOne India 2011
JavaServer Faces 2.0 - JavaOne India 2011JavaServer Faces 2.0 - JavaOne India 2011
JavaServer Faces 2.0 - JavaOne India 2011Arun Gupta
 
RichFaces: more concepts and features
RichFaces: more concepts and featuresRichFaces: more concepts and features
RichFaces: more concepts and featuresMax Katz
 
Client-side Rendering with AngularJS
Client-side Rendering with AngularJSClient-side Rendering with AngularJS
Client-side Rendering with AngularJSDavid Lapsley
 
Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoBuilding iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoRob Bontekoe
 
Implementation of GUI Framework part3
Implementation of GUI Framework part3Implementation of GUI Framework part3
Implementation of GUI Framework part3masahiroookubo
 
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...Uniface
 
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0Arun Gupta
 
Rails 3 overview
Rails 3 overviewRails 3 overview
Rails 3 overviewYehuda Katz
 
Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)Joao Lucas Santana
 
Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Chris Alfano
 
E3 appspresso hands on lab
E3 appspresso hands on labE3 appspresso hands on lab
E3 appspresso hands on labNAVER D2
 

Similar to AnkaraJUG Kasım 2012 - PrimeFaces (20)

Primefaces Confess 2012
Primefaces Confess 2012Primefaces Confess 2012
Primefaces Confess 2012
 
Primefaces Nextgen Lju
Primefaces Nextgen LjuPrimefaces Nextgen Lju
Primefaces Nextgen Lju
 
Primefaces Nextgen Lju
Primefaces Nextgen LjuPrimefaces Nextgen Lju
Primefaces Nextgen Lju
 
Rich Portlet Development in uPortal
Rich Portlet Development in uPortalRich Portlet Development in uPortal
Rich Portlet Development in uPortal
 
ASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin LauASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin Lau
 
JSP
JSPJSP
JSP
 
Flask – Python
Flask – PythonFlask – Python
Flask – Python
 
JavaServer Faces 2.0 - JavaOne India 2011
JavaServer Faces 2.0 - JavaOne India 2011JavaServer Faces 2.0 - JavaOne India 2011
JavaServer Faces 2.0 - JavaOne India 2011
 
Jsf
JsfJsf
Jsf
 
RichFaces: more concepts and features
RichFaces: more concepts and featuresRichFaces: more concepts and features
RichFaces: more concepts and features
 
Client-side Rendering with AngularJS
Client-side Rendering with AngularJSClient-side Rendering with AngularJS
Client-side Rendering with AngularJS
 
Primefaces.ppt
Primefaces.pptPrimefaces.ppt
Primefaces.ppt
 
Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoBuilding iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" Domino
 
Implementation of GUI Framework part3
Implementation of GUI Framework part3Implementation of GUI Framework part3
Implementation of GUI Framework part3
 
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
 
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
 
Rails 3 overview
Rails 3 overviewRails 3 overview
Rails 3 overview
 
Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)
 
Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011
 
E3 appspresso hands on lab
E3 appspresso hands on labE3 appspresso hands on lab
E3 appspresso hands on lab
 

More from Ankara JUG

Home Automation Using RPI
Home Automation Using  RPIHome Automation Using  RPI
Home Automation Using RPIAnkara JUG
 
Ankara JUG Ağustos 2013 - Oracle ADF
Ankara JUG Ağustos 2013 - Oracle ADFAnkara JUG Ağustos 2013 - Oracle ADF
Ankara JUG Ağustos 2013 - Oracle ADFAnkara JUG
 
Java EE7 Demystified
Java EE7 DemystifiedJava EE7 Demystified
Java EE7 DemystifiedAnkara JUG
 
Ankara jug mayıs 2013 sunumu
Ankara jug mayıs 2013 sunumuAnkara jug mayıs 2013 sunumu
Ankara jug mayıs 2013 sunumuAnkara JUG
 
AnkaraJUG Nisan 2013 - Java Persistance API
AnkaraJUG Nisan 2013 - Java Persistance APIAnkaraJUG Nisan 2013 - Java Persistance API
AnkaraJUG Nisan 2013 - Java Persistance APIAnkara JUG
 
HTML5 - Daha Flash bir web?
HTML5 - Daha Flash bir web?HTML5 - Daha Flash bir web?
HTML5 - Daha Flash bir web?Ankara JUG
 
AnkaraJUG Aralık 2012 - Agile, Adaptasyon ve Dönüşüm
AnkaraJUG Aralık 2012 - Agile, Adaptasyon ve DönüşümAnkaraJUG Aralık 2012 - Agile, Adaptasyon ve Dönüşüm
AnkaraJUG Aralık 2012 - Agile, Adaptasyon ve DönüşümAnkara JUG
 
Ankara jug 201211
Ankara jug 201211Ankara jug 201211
Ankara jug 201211Ankara JUG
 

More from Ankara JUG (8)

Home Automation Using RPI
Home Automation Using  RPIHome Automation Using  RPI
Home Automation Using RPI
 
Ankara JUG Ağustos 2013 - Oracle ADF
Ankara JUG Ağustos 2013 - Oracle ADFAnkara JUG Ağustos 2013 - Oracle ADF
Ankara JUG Ağustos 2013 - Oracle ADF
 
Java EE7 Demystified
Java EE7 DemystifiedJava EE7 Demystified
Java EE7 Demystified
 
Ankara jug mayıs 2013 sunumu
Ankara jug mayıs 2013 sunumuAnkara jug mayıs 2013 sunumu
Ankara jug mayıs 2013 sunumu
 
AnkaraJUG Nisan 2013 - Java Persistance API
AnkaraJUG Nisan 2013 - Java Persistance APIAnkaraJUG Nisan 2013 - Java Persistance API
AnkaraJUG Nisan 2013 - Java Persistance API
 
HTML5 - Daha Flash bir web?
HTML5 - Daha Flash bir web?HTML5 - Daha Flash bir web?
HTML5 - Daha Flash bir web?
 
AnkaraJUG Aralık 2012 - Agile, Adaptasyon ve Dönüşüm
AnkaraJUG Aralık 2012 - Agile, Adaptasyon ve DönüşümAnkaraJUG Aralık 2012 - Agile, Adaptasyon ve Dönüşüm
AnkaraJUG Aralık 2012 - Agile, Adaptasyon ve Dönüşüm
 
Ankara jug 201211
Ankara jug 201211Ankara jug 201211
Ankara jug 201211
 

AnkaraJUG Kasım 2012 - PrimeFaces

  • 2. Çagatay Çivici JSF Expert Group Member (JSR-314, JSR-344) PrimeFaces Architect and Lead Developer Apache MyFaces PMC Speaker, Author, Reviewer Co-Founder of Prime Teknoloji Nickname: optimus.prime
  • 3. Prime Teknoloji Java EE, OSS, Agile, Mobile, E-Commerce Consulting Training Delivery Offices in Istanbul and Ankara 34 Employees (Nov 2012) www.prime.com.tr
  • 4.
  • 19. Hide Complexity CSS JS AJAX Keep Flexibility <p:tabView onTabChange=”handleTabChange()”> <p:ajax event=”change” listener=”#{bean.onTabChange}” update=”comp” /> //tabs </p:tabView> CSS JS Client Ajax Override API Callbacks Callbacks
  • 20. Anatomy of a Component JSF <p:schedule id=”sch” value=”#{bean.model}” editable=”true” /> Markup <div id=”sch”></div> <script type=”text/javascript”> Script scheduleWidget = new PrimeFaces.widget.Schedule(‘sch’, {editable:true}); </script> You get:
  • 22. HTML5 data-* canvas websockets forms media
  • 23. Ajax in PrimeFaces Server APIs: Standard JSF 2 Client APIs:
  • 24. Ajax Extensions p:ajax autoUpdate Callbacks Selectors AjaxStatus RequestContext partialSubmit
  • 25. p:ajax f:ajax oncomplete onevent onerror onerror onstart onsuccess async global
  • 26. AjaxStatus <p:ajaxStatus> <f:facet name=”start”> <p:graphicImage value=”fancyanimation.gif” /> </f:facet> Declarative <f:facet name=”complete”> <h:outputText value=”Request Completed” /> </f:facet> </p:ajaxStatus> Programmatic <p:ajaxStatus onstart=”dialog.show()” oncomplete=”dialog.hide()” /> Global <p:commandButton global=”true|false” />
  • 27. RequestContext - Params <p:commandButton value=”Submit” action=”#{bean.save}” JSF Page oncomplete=”handleComplete(xhr, status, args)” /> Bean public void save() { RequestContext rc = RequestContext.getCurrentInstance(); rc.addCallbackParam(“person”, person); } Callback <script type=”text/javascript”> function handleComplete(xhr, status, args) { alert(args.person.name); } </script>
  • 28. RequestContext - Scripts <p:commandButton value=”Submit” action=”#{bean.save}” /> JSF Page <p:dialog widgetVar=”dialogWidget” ... /> public void save() { Bean RequestContext rc = RequestContext.getCurrentInstance(); rc.execute(“dialogWidget.hide()”); }
  • 29. RequestContext - Update <p:commandButton value=”Submit” action=”#{bean.save}” /> JSF Page <h:outputText id=”val” value=”#{bean.property}” /> public void save() { Bean RequestContext rc = RequestContext.getCurrentInstance(); rc.addPartialUpdateTarget(“val”); } or <p:commandButton value=”Submit” action=”#{bean.save}” update=”val” /> <h:outputText id=”val” value=”#{bean.property}” />
  • 30. RequestContext - Scroll <p:commandButton value=”Submit” action=”#{bean.save}” /> Page <h:outputText id=”val” value=”#{bean.property}” /> public void save() { Bean RequestContext rc = RequestContext.getCurrentInstance(); rc.scrollTo(“val”); }
  • 31. AutoUpdate <p:growl id=”messages” /> <p:commandButton value=”Save” update=”messages” /> <p:commandButton value=”Update” update=”messages” /> <p:commandButton value=”Delete” update=”messages” /> <p:growl id=”messages” autoUpdate=”true”/> <p:commandButton value=”Save” /> <p:commandButton value=”Update” /> <p:commandButton value=”Delete” />
  • 32. PartialSubmit False True Post Post Data:javax.faces.partial.ajax=true&javax.faces.source=fo Data:javax.faces.partial.ajax=true&javax.faces.source=for rm%3Aj_idt18&javax.faces.partial.execute=form m%3Aj_idt18&javax.faces.partial.execute=form %3Aname&javax.faces.partial.render=form %3Aname&javax.faces.partial.render=form %3Adisplay&form%3Aj_idt18=form %3Adisplay&form%3Aj_idt18=form %3Aj_idt18&form=form&form%3Aname=&form %3Aj_idt18&form=form&form %3Aj_idt20=&form%3Aj_idt22=&form%3Aj_idt24=&form %3Aname=&javax.faces.ViewState=7916482521909421 %3Aj_idt26=&form%3Aj_idt28=&form%3Aj_idt30=&form 983%3A-2156051337299048496 %3Aj_idt32=&form%3Aj_idt34=&form%3Aj_idt36=&form %3Aj_idt38=&form%3Aj_idt40=&form%3Aj_idt42=&form %3Aj_idt44=&form%3Aj_idt46=&form%3Aj_idt48=&form %3Aj_idt50=&form%3Aj_idt52=&form%3Aj_idt66=&form %3Aj_idt68=&form%3Aj_idt70=&form%3Aj_idt72=&form %3Aj_idt74=&form%3Aj_idt76=&form%3Aj_idt78=&form %3Aj_idt80=&form%3Aj_idt82=&form%3Aj_idt84=&form %3Aj_idt86=&form%3Aj_idt88=&form%3Aj_idt90=&form %3Aj_idt92=&form%3Aj_idt94=&form%3Aj_idt96=&form %3Aj_idt98=&javax.faces.ViewState=79164825219094 21983%3A-2156051337299048496
  • 33. PrimeFaces Selectors (PFS) update=”@(form)” update=”@(form.first)” update=”@(.mystyle)” update=”@(.ui-datatable)” update=”@(:input:not(select))” update=”@(:input:disabled))”
  • 34. ResourceHandling On The Fly Optimizations and Loading Minify Merge Compress
  • 35. Demo
  • 38. Install a Theme Add primefaces-{themename}.jar Configure <context-param> <param-name>primefaces.THEME</param-name> <param-value>{themename}</param-value> </context-param>
  • 41. Demo
  • 43. PrimeFaces Mobile <pm:page title="TwitFaces">         <pm:view id="main" swatch="b">             <pm:header title="TwitFaces">             </pm:header>             <pm:content>                 <h:form id="twitForm">                     <h:outputText value="Account: " />                     <h:inputText value="#{twitterController.username}" />                     <p:separator />                     <p:commandButton value="Get Tweets" icon="refresh" update="tweetList"                                       actionListener="#{twitterController.loadTweets}" />                     <p:dataList id="tweetList" value="#{twitterController.tweets}" var="tweet">                         #{tweet}                     </p:dataList>                 </h:form>             </pm:content>         </pm:view>     </pm:page>
  • 44. PrimeFaces Mobile powered by
  • 45. Demo
  • 46. PrimeFaces Push Atmosphere
  • 47. Demo
  • 48. Javascript CSS Rest, Jax-RS, Php, Spring MVC ...
  • 49. Pure JavaScript <input id=”spinner” type=”text” /> $(‘#spinner’).puispinner(); <div id="default"> $(‘#default’).puitabview(); <ul> <li><a href="#tab1">Tab 1</a></li> <li><a href="#tab2">Tab 2</a></li> <li><a href="#tab3">Tab 3</a></li> </ul> <div> <div id="tab1"> $(‘#default’).puitabview({ content 1 orientation: ‘left’ </div> }); <div id="tab2"> content 2 </div> <div id="tab3"> content 3 </div> </div> </div>
  • 50. Demo
  • 51. Portlets via Sample: /svn/examples/trunk/prime-portlet
  • 52. On the Cloud http://primefaces-rocks.appspot.com http://primefaces-gae-kickstart.appspot.com http://blog.jelastic.com/2012/06/11/how-to-deploy-primefaces-applications-into-jelastic-cloud/
  • 53. Documentation 500+ Pages
  • 54.
  • 55. Community 3000 posts / month
  • 57. PrimeFaces PRO Support Training Consulting
  • 59. RoadMap Current 3.4.2 Next Major 3.5 Maintenance 3.4.x Mobile 1.0 PrimeUI JS Library PrimeFaces for ASP.NET
  • 60. Q/A contact@prime.com.tr @primefaces groups/primefaces http://blog.primefaces.org