SlideShare a Scribd company logo
1 of 28
Download to read offline
JBoss RichFaces
   Webinar Series
More Concepts and Features
       Webinar #2

        Max Katz
     Charley Cowens


        © Exadel
Upcoming Webinars:
May 19th, 2009 – Rich UI Components
   (rich:* tag library)
June 16th, 2009 - Skins
Who Is This Guy?
Senior Systems Engineer
RIA strategy, development, training
  http://mkblog.exadel.com
  http://twitter.com/maxkatz
Author of Practical RichFaces (Apress)
The Plan
Review and new stuff:
  1.Sending an AJAX request
  2.Partial view rendering
  3.Partial view processing
More tags and features:
  1.a4j:jsFunction, a4j:poll, a4j:repeat,
    a4j:queue
  2.JavaScript interactions
Questions
RichFaces
1. JSF-AJAX components (100+)
2. Skins
3. CDK (Component Development Kit)
What You Should Know
Runs in:
• Any servlet container, application server
• Portals: JBoss, WebLogic, Liferay
Works with:
• Any JSF implementation (1.1, 1.2, 2.0soon)
Works with:
• Seam, Spring
Works with any 3rd party components:
• Tomahawk, Trinidad, QuipuKit, etc.
JBoss Tools
Basic Concepts and More
1.Sending AJAX request
2.Partial view (page) rendering
3.Partial view processing
Sending AJAX Request
• a4j:support – add AJAX support to
  any parent component
• a4j:commandButton,
  a4j:commandLink
• a4j:poll – periodically send AJAX
  request
• a4j:jsFunction – AJAX request from
  any custom JavaScript function
• a4j:push – a ping-like request
Sending AJAX Request
Using a4j:support

<h:selectOneMenu value="#{bean.fruit}">
   <a4j:support event="onchange"
                action="#{bean.change}"
                reRender="info"/>
</<h:selectOneMenu>
<h:panelGrid id="info">
   ...
</h:panelGrid>

Using a4j:commandButton
<a4j:commandButton value="AJAX Submit"
     action="#{echoBean.count}"
     reRender="echo, count" />
<h:outputText id="echo"
              value="#{echoBean.text}"/>
Using a4j:support
                                           with rich components




<rich:listShuttle sourceValue="#{toolBar.freeItems}"
    targetValue="#{toolBar.items}" var="items"
    converter="listShuttleconverter">
  <rich:column width="18">
     <h:graphicImage value="#{items.iconURI}"/>
  </rich:column>
  <rich:column>
     <h:outputText value="#{items.label}"/>
  </rich:column>
  <a4j:support event="onlistchanged"
               reRender="toolBar" />
  <a4j:support event="onorderchanged"
               reRender="toolBar" />
</rich:listShuttle>
a4j:jsFunction – AJAX request from any
   custom JavaScript function

<h:form>
  <table>
   <tr>
    <td onmouseover="setdrink('Espresso')"
        onmouseout="setdrink('')">Espresso</td>
    <td onmouseover="setdrink('Cappuccino')"
        onmouseout="setdrink('')">Cappuccino</td>
    <td onmouseover="setdrink('Tea')"
        onmouseout="setdrink('')">Tea</td>
   </tr>
  </table>
   <h:outputText id="drink"
                 value="I like #{bean.drink}" />
   <a4j:jsFunction name="setdrink" reRender="drink" >
     <a4j:actionparam name="param1" assignTo="#{bean.drink}"/>
   </a4j:jsFunction>
</h:form>
a4j:poll – periodically sends AJAX
   request



<a4j:poll id="poll" interval="100"
         enabled="#{clockBean.enabled}"
         reRender="clock" />

<h:panelGrid columns="3">
   <a4j:commandButton value="Start Clock"
       action="#{clockBean.startClock}"
         reRender="poll" />
   <a4j:commandButton value="Stop Clock"
        action="#{clockBean.stopClock}"
       reRender="poll" />
   <h:outputText id="clock" value="#{clockBean.now}" />
</h:panelGrid>
Partial View Rendering
Point reRender to component id's to be
 rendered
Use a4j:outputPanel to include
 components always to be rendered
<a4j:commandLink reRender="id1,id2"/>
...
                                        Using
<h:outputText id="id1"/>
                                        reRender
<h:dataTable id="id2">
...
</h:dataTable>
<a4j:commandLink reRender="panel"/>
...                                     Using
<h:panelGrid id="panel">                reRender to
                                        point
   <h:outputText />                     to container
   <h:dataTable>..</h:dataTable>
</h:panelGrid>
<a4j:commandLink/>
                                        Using
...
                                        a4j:outputPanel
<a4j:outputPanel ajaxRendered="true">
   <h:outputText />
   <h:dataTable>..</h:dataTable>
<a4j:outputPanel>
Deciding what components to re-render in runtime:
(bind to Set, Collection, Array, comma-delimited String)

<a4j:commandLink reRender="#{bean.renderControls}">

<h:outputText id="id1"/>
<h:dataTable id="id2">
   ...
</h:dataTable>


Setting limitToList="true", limits rendering to components set only in
current reRender list

<a4j:commandLink reRender="id1" limitToList="true">
<h:panelGrid id="id1">
   <h:outputText />
</h:panelGrid>
<a4j:outputPanel ajaxRendered="true">
   <h:dataTable>...</h:dataTable>
<a4j:outputPanel>
Partial View Processing
Use ajaxSingle attribute
Use <a4j:region>...</a4j:region>
Partial View Processing
Using ajaxSingle
<h:selectOneMenu value="#{bean.fruit}">
   <a4j:support event="onchange"
                ajaxSingle="true">
</<h:selectOneMenu>



Using a4j:region
<a4j:region>
  <h:inputText/>
  <a4j:commandButton />
</a4j:region>
<h:inputText/>
<h:inputText/>
a4j:region lets you define a concrete area in the tree to process
 renderRegionOnly limits re-rendering to this region only
 selfRendered – renders directly from JSF component tree, instead of
                synchronizing the tree with the Facelet

bypassUpdates is useful when validating a form, it skips Update
Model and Invoke Application phase



<h:outputText value="Name:"/>
<h:panelGroup>
  <a4j:region renderRegionOnly="true"
              selfRendered="true">
    <h:inputText id="name" value="#{validationBean.name}"
              required="true" label="Name">
       <f:validateLength minimum="4" />
       <a4j:support event="onblur" bypassUpdates="true" />
    </h:inputText>
    <rich:message for="name" />
  </a4j:region>
</h:panelGroup>
More Tags and Concepts
1.a4j:repeat
2.a4j:queue
3.JavaScript interactions
a4j:repeat works just like ui:repeat but also allows
specific row update via AJAX
<table>
   <a4j:repeat value="#{bean.numbers}" var="num" rowKeyVar="rowIndex">
      <tr>
         <td width="20px">
            <h:outputText id="num" value="#{num.number}" />
         </td>
         <td>
            <a4j:commandLink value="-" reRender="num"
                  action="#{bean.decrease}">
                  <a4j:actionparam name="rowIndex"
                                   value="#{rowIndex}"
                       assignTo="#{repeatBean.updatedRow}" />
            </a4j:commandLink> /
             <a4j:commandLink value="+" reRender="num"
                  action="#{bean.increase}">
                   <a4j:actionparam name="rowIndex"
                                    value="#{rowIndex}"
                       assignTo="#{bean.updatedRow}" />
            </a4j:commandLink></td>
      </tr>
   </a4j:repeat>
</table>
a4j:queue – controls traffic between
   client and server
     – Wait for request to return before
       sending new one
     – Set request delay
     – “Replaces” requests from the same
       logical components
     – Define queue size
         • Define queue behavior when size is
           exceeded (fire/drop new, fire/drop first)
<a4j:queue name="ajaxQueue" requestDelay="1000"/>
...
<a4j:commandButton value="Delete" similarityGroupingId="actionGroup"
                   eventsQeueu="ajaxQueue"/>
<a4j:commandButton value="Save" similarityGroupingId="actionGroup"
                   eventsQeueu="ajaxQueue"/>
JavaScript interactions – call custom JavaScript function during different
phases of the AJAX request

<h:selectOneMenu value="#{bean.drink}">
  <f:selectItem itemValue="Espresso"/>
    <a4j:support event="onchange" reRender="drink"
      onsubmit="alert('Getting new drink...')"
      onbeforedomupdate="alert('About to update browser DOM...')"
      oncomplete="alert('Browser DOM updated.')"/>
</h:selectOneMenu>
What We Covered
More tags and features in
  1.Sending an AJAX request
  2.Partial view rendering
  3.Partial view processing
New tags and features
  1.a4j:repeat
  2.a4j:queue
  3.JavaScript interactions
Upcoming Webinars:
May 19th, 2009 – Rich UI Components
   (rich:* tag library)
June 16th, 2009 - Skins
JSF/RichFaces Training
On-site 1-3 days
More info: http://mkblog.exadel.com
RichFaces Demo
http://livedemo.exadel.com/richfaces-demo
Thank You.
Questions?
mkatz@exadel.com
http://mkblog.exadel.com

More Related Content

What's hot

Oracle APEX Performance
Oracle APEX PerformanceOracle APEX Performance
Oracle APEX PerformanceScott Wesley
 
Introduction to Zend Framework web services
Introduction to Zend Framework web servicesIntroduction to Zend Framework web services
Introduction to Zend Framework web servicesMichelangelo van Dam
 
And the Greatest of These Is ... Rack Support
And the Greatest of These Is ... Rack SupportAnd the Greatest of These Is ... Rack Support
And the Greatest of These Is ... Rack SupportBen Scofield
 
Ôn tập KTTMDT
Ôn tập KTTMDTÔn tập KTTMDT
Ôn tập KTTMDTmrcoffee282
 
Modern JavaScript Engine Performance
Modern JavaScript Engine PerformanceModern JavaScript Engine Performance
Modern JavaScript Engine PerformanceCatalin Dumitru
 
My Top 5 APEX JavaScript API's
My Top 5 APEX JavaScript API'sMy Top 5 APEX JavaScript API's
My Top 5 APEX JavaScript API'sRoel Hartman
 
Angular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.xAngular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.xEyal Vardi
 
Client-side Rendering with AngularJS
Client-side Rendering with AngularJSClient-side Rendering with AngularJS
Client-side Rendering with AngularJSDavid Lapsley
 
Manipulating Magento - Meet Magento Netherlands 2018
Manipulating Magento - Meet Magento Netherlands 2018Manipulating Magento - Meet Magento Netherlands 2018
Manipulating Magento - Meet Magento Netherlands 2018Joke Puts
 
20141001 delapsley-oc-openstack-final
20141001 delapsley-oc-openstack-final20141001 delapsley-oc-openstack-final
20141001 delapsley-oc-openstack-finalDavid Lapsley
 
Anko試食会
Anko試食会Anko試食会
Anko試食会susan335
 
Angular 2 Architecture
Angular 2 ArchitectureAngular 2 Architecture
Angular 2 ArchitectureEyal Vardi
 
Cloud Entwicklung mit Apex
Cloud Entwicklung mit ApexCloud Entwicklung mit Apex
Cloud Entwicklung mit ApexAptly GmbH
 
Http Communication in Angular 2.0
Http Communication in Angular 2.0Http Communication in Angular 2.0
Http Communication in Angular 2.0Eyal Vardi
 
JavaScript Testing for Rubyists
JavaScript Testing for RubyistsJavaScript Testing for Rubyists
JavaScript Testing for RubyistsJamie Dyer
 
Template syntax in Angular 2.0
Template syntax in Angular 2.0Template syntax in Angular 2.0
Template syntax in Angular 2.0Eyal Vardi
 
iOS Reactive Cocoa Pipeline
iOS Reactive Cocoa PipelineiOS Reactive Cocoa Pipeline
iOS Reactive Cocoa PipelineIvan Trifonov
 

What's hot (20)

Oracle APEX Performance
Oracle APEX PerformanceOracle APEX Performance
Oracle APEX Performance
 
Introduction to Zend Framework web services
Introduction to Zend Framework web servicesIntroduction to Zend Framework web services
Introduction to Zend Framework web services
 
And the Greatest of These Is ... Rack Support
And the Greatest of These Is ... Rack SupportAnd the Greatest of These Is ... Rack Support
And the Greatest of These Is ... Rack Support
 
Ôn tập KTTMDT
Ôn tập KTTMDTÔn tập KTTMDT
Ôn tập KTTMDT
 
Modern JavaScript Engine Performance
Modern JavaScript Engine PerformanceModern JavaScript Engine Performance
Modern JavaScript Engine Performance
 
My Top 5 APEX JavaScript API's
My Top 5 APEX JavaScript API'sMy Top 5 APEX JavaScript API's
My Top 5 APEX JavaScript API's
 
Angular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.xAngular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.x
 
Client-side Rendering with AngularJS
Client-side Rendering with AngularJSClient-side Rendering with AngularJS
Client-side Rendering with AngularJS
 
Manipulating Magento - Meet Magento Netherlands 2018
Manipulating Magento - Meet Magento Netherlands 2018Manipulating Magento - Meet Magento Netherlands 2018
Manipulating Magento - Meet Magento Netherlands 2018
 
20141001 delapsley-oc-openstack-final
20141001 delapsley-oc-openstack-final20141001 delapsley-oc-openstack-final
20141001 delapsley-oc-openstack-final
 
Anko試食会
Anko試食会Anko試食会
Anko試食会
 
Reporting solutions for ADF Applications
Reporting solutions for ADF ApplicationsReporting solutions for ADF Applications
Reporting solutions for ADF Applications
 
Angular 2 Architecture
Angular 2 ArchitectureAngular 2 Architecture
Angular 2 Architecture
 
Vaadin+Scala
Vaadin+ScalaVaadin+Scala
Vaadin+Scala
 
Cloud Entwicklung mit Apex
Cloud Entwicklung mit ApexCloud Entwicklung mit Apex
Cloud Entwicklung mit Apex
 
Http Communication in Angular 2.0
Http Communication in Angular 2.0Http Communication in Angular 2.0
Http Communication in Angular 2.0
 
JavaScript Testing for Rubyists
JavaScript Testing for RubyistsJavaScript Testing for Rubyists
JavaScript Testing for Rubyists
 
Template syntax in Angular 2.0
Template syntax in Angular 2.0Template syntax in Angular 2.0
Template syntax in Angular 2.0
 
iOS Reactive Cocoa Pipeline
iOS Reactive Cocoa PipelineiOS Reactive Cocoa Pipeline
iOS Reactive Cocoa Pipeline
 
Magento Indexes
Magento IndexesMagento Indexes
Magento Indexes
 

Viewers also liked

RichFaces skins
RichFaces skinsRichFaces skins
RichFaces skinsMax Katz
 
RichFaces 4 Webinar - New and Advanced Features
RichFaces 4 Webinar - New and Advanced FeaturesRichFaces 4 Webinar - New and Advanced Features
RichFaces 4 Webinar - New and Advanced FeaturesMax Katz
 
Ajax Applications with JSF2 and New RichFaces 4 at JAX 2011
Ajax Applications with JSF2 and New RichFaces 4 at JAX 2011Ajax Applications with JSF2 and New RichFaces 4 at JAX 2011
Ajax Applications with JSF2 and New RichFaces 4 at JAX 2011Max Katz
 
Introduction to RichFaces
Introduction to RichFacesIntroduction to RichFaces
Introduction to RichFacesMax Katz
 
Learn How to Build Mobile Apps Using Cloud Services
Learn How to Build Mobile Apps Using Cloud ServicesLearn How to Build Mobile Apps Using Cloud Services
Learn How to Build Mobile Apps Using Cloud ServicesMax Katz
 
RichFaces 4 webinar #2: RichFaces 3 toRichFaces 4
RichFaces 4 webinar #2: RichFaces 3 toRichFaces 4RichFaces 4 webinar #2: RichFaces 3 toRichFaces 4
RichFaces 4 webinar #2: RichFaces 3 toRichFaces 4Max Katz
 
Ajax Applications with JSF 2 and New RichFaces 4 - TSSJS
Ajax Applications with JSF 2 and New RichFaces 4 - TSSJSAjax Applications with JSF 2 and New RichFaces 4 - TSSJS
Ajax Applications with JSF 2 and New RichFaces 4 - TSSJSMax Katz
 

Viewers also liked (7)

RichFaces skins
RichFaces skinsRichFaces skins
RichFaces skins
 
RichFaces 4 Webinar - New and Advanced Features
RichFaces 4 Webinar - New and Advanced FeaturesRichFaces 4 Webinar - New and Advanced Features
RichFaces 4 Webinar - New and Advanced Features
 
Ajax Applications with JSF2 and New RichFaces 4 at JAX 2011
Ajax Applications with JSF2 and New RichFaces 4 at JAX 2011Ajax Applications with JSF2 and New RichFaces 4 at JAX 2011
Ajax Applications with JSF2 and New RichFaces 4 at JAX 2011
 
Introduction to RichFaces
Introduction to RichFacesIntroduction to RichFaces
Introduction to RichFaces
 
Learn How to Build Mobile Apps Using Cloud Services
Learn How to Build Mobile Apps Using Cloud ServicesLearn How to Build Mobile Apps Using Cloud Services
Learn How to Build Mobile Apps Using Cloud Services
 
RichFaces 4 webinar #2: RichFaces 3 toRichFaces 4
RichFaces 4 webinar #2: RichFaces 3 toRichFaces 4RichFaces 4 webinar #2: RichFaces 3 toRichFaces 4
RichFaces 4 webinar #2: RichFaces 3 toRichFaces 4
 
Ajax Applications with JSF 2 and New RichFaces 4 - TSSJS
Ajax Applications with JSF 2 and New RichFaces 4 - TSSJSAjax Applications with JSF 2 and New RichFaces 4 - TSSJS
Ajax Applications with JSF 2 and New RichFaces 4 - TSSJS
 

Similar to RichFaces: more concepts and features

RichFaces: rich:* component library
RichFaces: rich:* component libraryRichFaces: rich:* component library
RichFaces: rich:* component libraryMax Katz
 
Primefaces Confess 2012
Primefaces Confess 2012Primefaces Confess 2012
Primefaces Confess 2012cagataycivici
 
What You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSFWhat You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSFMax Katz
 
PrimeTime JSF with PrimeFaces - Dec 2014
PrimeTime JSF with PrimeFaces - Dec 2014PrimeTime JSF with PrimeFaces - Dec 2014
PrimeTime JSF with PrimeFaces - Dec 2014cagataycivici
 
Primefaces Nextgen Lju
Primefaces Nextgen LjuPrimefaces Nextgen Lju
Primefaces Nextgen LjuSkills Matter
 
Primefaces Nextgen Lju
Primefaces Nextgen LjuPrimefaces Nextgen Lju
Primefaces Nextgen LjuSkills Matter
 
ASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin LauASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin LauSpiffy
 
Working with Javascript in Rails
Working with Javascript in RailsWorking with Javascript in Rails
Working with Javascript in RailsSeungkyun Nam
 
VPN Access Runbook
VPN Access RunbookVPN Access Runbook
VPN Access RunbookTaha Shakeel
 
Bonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node jsBonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node jsFrancois Zaninotto
 
Rails 3 overview
Rails 3 overviewRails 3 overview
Rails 3 overviewYehuda Katz
 
Rich Portlet Development in uPortal
Rich Portlet Development in uPortalRich Portlet Development in uPortal
Rich Portlet Development in uPortalJennifer Bourey
 
Spring data iii
Spring data iiiSpring data iii
Spring data iii명철 강
 
React table tutorial project setup, use table, and usefilter
React table tutorial project setup, use table, and usefilterReact table tutorial project setup, use table, and usefilter
React table tutorial project setup, use table, and usefilterKaty Slemon
 
Overview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web FrameworkOverview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web FrameworkIndicThreads
 
Scala based Lift Framework
Scala based Lift FrameworkScala based Lift Framework
Scala based Lift Frameworkvhazrati
 

Similar to RichFaces: more concepts and features (20)

RichFaces: rich:* component library
RichFaces: rich:* component libraryRichFaces: rich:* component library
RichFaces: rich:* component library
 
Primefaces Confess 2012
Primefaces Confess 2012Primefaces Confess 2012
Primefaces Confess 2012
 
What You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSFWhat You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSF
 
PrimeTime JSF with PrimeFaces - Dec 2014
PrimeTime JSF with PrimeFaces - Dec 2014PrimeTime JSF with PrimeFaces - Dec 2014
PrimeTime JSF with PrimeFaces - Dec 2014
 
Primefaces Nextgen Lju
Primefaces Nextgen LjuPrimefaces Nextgen Lju
Primefaces Nextgen Lju
 
Primefaces Nextgen Lju
Primefaces Nextgen LjuPrimefaces Nextgen Lju
Primefaces Nextgen Lju
 
ASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin LauASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin Lau
 
Working with Javascript in Rails
Working with Javascript in RailsWorking with Javascript in Rails
Working with Javascript in Rails
 
VPN Access Runbook
VPN Access RunbookVPN Access Runbook
VPN Access Runbook
 
Bonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node jsBonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node js
 
Rails 3 overview
Rails 3 overviewRails 3 overview
Rails 3 overview
 
Rich Portlet Development in uPortal
Rich Portlet Development in uPortalRich Portlet Development in uPortal
Rich Portlet Development in uPortal
 
JS-05-Handlebars.ppt
JS-05-Handlebars.pptJS-05-Handlebars.ppt
JS-05-Handlebars.ppt
 
Spring data iii
Spring data iiiSpring data iii
Spring data iii
 
Rails is not just Ruby
Rails is not just RubyRails is not just Ruby
Rails is not just Ruby
 
React 101
React 101React 101
React 101
 
React table tutorial project setup, use table, and usefilter
React table tutorial project setup, use table, and usefilterReact table tutorial project setup, use table, and usefilter
React table tutorial project setup, use table, and usefilter
 
Overview Of Lift Framework
Overview Of Lift FrameworkOverview Of Lift Framework
Overview Of Lift Framework
 
Overview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web FrameworkOverview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web Framework
 
Scala based Lift Framework
Scala based Lift FrameworkScala based Lift Framework
Scala based Lift Framework
 

More from Max Katz

Using cloud tools to build enterprise mobile apps with APIs fast
Using cloud tools to build enterprise mobile apps with APIs fast Using cloud tools to build enterprise mobile apps with APIs fast
Using cloud tools to build enterprise mobile apps with APIs fast Max Katz
 
Wolters Kluwer Tech. Conference: Disrupting Mobile Development
Wolters Kluwer Tech. Conference: Disrupting Mobile DevelopmentWolters Kluwer Tech. Conference: Disrupting Mobile Development
Wolters Kluwer Tech. Conference: Disrupting Mobile DevelopmentMax Katz
 
Tiggzi at DC jQuery Meetup
Tiggzi at DC jQuery MeetupTiggzi at DC jQuery Meetup
Tiggzi at DC jQuery MeetupMax Katz
 
Tiggr Mobile Apps Builder at Silicon Valley HTML5 Group Meetup
Tiggr Mobile Apps Builder at Silicon Valley HTML5 Group MeetupTiggr Mobile Apps Builder at Silicon Valley HTML5 Group Meetup
Tiggr Mobile Apps Builder at Silicon Valley HTML5 Group MeetupMax Katz
 
Tiggr - Web-based IDE for Mobile Web And Native Apps
Tiggr - Web-based IDE for Mobile Web And Native AppsTiggr - Web-based IDE for Mobile Web And Native Apps
Tiggr - Web-based IDE for Mobile Web And Native AppsMax Katz
 
RichFaces 4: Rich Ajax Components For Your JSF Applications
RichFaces 4: Rich Ajax Components For Your JSF ApplicationsRichFaces 4: Rich Ajax Components For Your JSF Applications
RichFaces 4: Rich Ajax Components For Your JSF ApplicationsMax Katz
 
Building Mobile Apps With jQuery For Any Device In The Cloud
Building Mobile Apps With jQuery For Any Device In The Cloud Building Mobile Apps With jQuery For Any Device In The Cloud
Building Mobile Apps With jQuery For Any Device In The Cloud Max Katz
 
Ajax Applications with JSF 2 and New RichFaces 4 - JAX/JSF Summit
Ajax Applications with JSF 2 and New RichFaces 4 - JAX/JSF SummitAjax Applications with JSF 2 and New RichFaces 4 - JAX/JSF Summit
Ajax Applications with JSF 2 and New RichFaces 4 - JAX/JSF SummitMax Katz
 
Mobile Development Choices: Native Apps vs. Web Apps at JAX 2011
Mobile Development Choices: Native Apps vs. Web Apps at JAX 2011Mobile Development Choices: Native Apps vs. Web Apps at JAX 2011
Mobile Development Choices: Native Apps vs. Web Apps at JAX 2011Max Katz
 
RichFaces 4 webinar #1: Everything You Need To Know
RichFaces 4 webinar #1: Everything You Need To KnowRichFaces 4 webinar #1: Everything You Need To Know
RichFaces 4 webinar #1: Everything You Need To KnowMax Katz
 
Ajax Applications with JSF 2 and New RichFaces 4 - CONFESS 2011
Ajax Applications with JSF 2 and New RichFaces 4 - CONFESS 2011Ajax Applications with JSF 2 and New RichFaces 4 - CONFESS 2011
Ajax Applications with JSF 2 and New RichFaces 4 - CONFESS 2011Max Katz
 
Devoxx2010 - Mobile Development Choices: Native Apps vs Web Apps
Devoxx2010 - Mobile Development Choices: Native Apps vs Web AppsDevoxx2010 - Mobile Development Choices: Native Apps vs Web Apps
Devoxx2010 - Mobile Development Choices: Native Apps vs Web AppsMax Katz
 
Hands On With Rich Faces 4 - JavaOne 2010
Hands On With Rich Faces 4 - JavaOne 2010Hands On With Rich Faces 4 - JavaOne 2010
Hands On With Rich Faces 4 - JavaOne 2010Max Katz
 
Ajax Applications with JSF 2 and new RichFaces 4 - Herbstcampus
Ajax Applications with JSF 2 and new RichFaces 4 - HerbstcampusAjax Applications with JSF 2 and new RichFaces 4 - Herbstcampus
Ajax Applications with JSF 2 and new RichFaces 4 - HerbstcampusMax Katz
 
Rich Enterprise Applications with JavaFX
Rich Enterprise Applications with JavaFXRich Enterprise Applications with JavaFX
Rich Enterprise Applications with JavaFXMax Katz
 
Ajax Applications with RichFaces and JSF 2
Ajax Applications with RichFaces and JSF 2Ajax Applications with RichFaces and JSF 2
Ajax Applications with RichFaces and JSF 2Max Katz
 
Building RIA Applications with JavaFX
Building RIA Applications with JavaFXBuilding RIA Applications with JavaFX
Building RIA Applications with JavaFXMax Katz
 
Building RIA Applications with RichFaces
Building RIA Applications with RichFacesBuilding RIA Applications with RichFaces
Building RIA Applications with RichFacesMax Katz
 

More from Max Katz (18)

Using cloud tools to build enterprise mobile apps with APIs fast
Using cloud tools to build enterprise mobile apps with APIs fast Using cloud tools to build enterprise mobile apps with APIs fast
Using cloud tools to build enterprise mobile apps with APIs fast
 
Wolters Kluwer Tech. Conference: Disrupting Mobile Development
Wolters Kluwer Tech. Conference: Disrupting Mobile DevelopmentWolters Kluwer Tech. Conference: Disrupting Mobile Development
Wolters Kluwer Tech. Conference: Disrupting Mobile Development
 
Tiggzi at DC jQuery Meetup
Tiggzi at DC jQuery MeetupTiggzi at DC jQuery Meetup
Tiggzi at DC jQuery Meetup
 
Tiggr Mobile Apps Builder at Silicon Valley HTML5 Group Meetup
Tiggr Mobile Apps Builder at Silicon Valley HTML5 Group MeetupTiggr Mobile Apps Builder at Silicon Valley HTML5 Group Meetup
Tiggr Mobile Apps Builder at Silicon Valley HTML5 Group Meetup
 
Tiggr - Web-based IDE for Mobile Web And Native Apps
Tiggr - Web-based IDE for Mobile Web And Native AppsTiggr - Web-based IDE for Mobile Web And Native Apps
Tiggr - Web-based IDE for Mobile Web And Native Apps
 
RichFaces 4: Rich Ajax Components For Your JSF Applications
RichFaces 4: Rich Ajax Components For Your JSF ApplicationsRichFaces 4: Rich Ajax Components For Your JSF Applications
RichFaces 4: Rich Ajax Components For Your JSF Applications
 
Building Mobile Apps With jQuery For Any Device In The Cloud
Building Mobile Apps With jQuery For Any Device In The Cloud Building Mobile Apps With jQuery For Any Device In The Cloud
Building Mobile Apps With jQuery For Any Device In The Cloud
 
Ajax Applications with JSF 2 and New RichFaces 4 - JAX/JSF Summit
Ajax Applications with JSF 2 and New RichFaces 4 - JAX/JSF SummitAjax Applications with JSF 2 and New RichFaces 4 - JAX/JSF Summit
Ajax Applications with JSF 2 and New RichFaces 4 - JAX/JSF Summit
 
Mobile Development Choices: Native Apps vs. Web Apps at JAX 2011
Mobile Development Choices: Native Apps vs. Web Apps at JAX 2011Mobile Development Choices: Native Apps vs. Web Apps at JAX 2011
Mobile Development Choices: Native Apps vs. Web Apps at JAX 2011
 
RichFaces 4 webinar #1: Everything You Need To Know
RichFaces 4 webinar #1: Everything You Need To KnowRichFaces 4 webinar #1: Everything You Need To Know
RichFaces 4 webinar #1: Everything You Need To Know
 
Ajax Applications with JSF 2 and New RichFaces 4 - CONFESS 2011
Ajax Applications with JSF 2 and New RichFaces 4 - CONFESS 2011Ajax Applications with JSF 2 and New RichFaces 4 - CONFESS 2011
Ajax Applications with JSF 2 and New RichFaces 4 - CONFESS 2011
 
Devoxx2010 - Mobile Development Choices: Native Apps vs Web Apps
Devoxx2010 - Mobile Development Choices: Native Apps vs Web AppsDevoxx2010 - Mobile Development Choices: Native Apps vs Web Apps
Devoxx2010 - Mobile Development Choices: Native Apps vs Web Apps
 
Hands On With Rich Faces 4 - JavaOne 2010
Hands On With Rich Faces 4 - JavaOne 2010Hands On With Rich Faces 4 - JavaOne 2010
Hands On With Rich Faces 4 - JavaOne 2010
 
Ajax Applications with JSF 2 and new RichFaces 4 - Herbstcampus
Ajax Applications with JSF 2 and new RichFaces 4 - HerbstcampusAjax Applications with JSF 2 and new RichFaces 4 - Herbstcampus
Ajax Applications with JSF 2 and new RichFaces 4 - Herbstcampus
 
Rich Enterprise Applications with JavaFX
Rich Enterprise Applications with JavaFXRich Enterprise Applications with JavaFX
Rich Enterprise Applications with JavaFX
 
Ajax Applications with RichFaces and JSF 2
Ajax Applications with RichFaces and JSF 2Ajax Applications with RichFaces and JSF 2
Ajax Applications with RichFaces and JSF 2
 
Building RIA Applications with JavaFX
Building RIA Applications with JavaFXBuilding RIA Applications with JavaFX
Building RIA Applications with JavaFX
 
Building RIA Applications with RichFaces
Building RIA Applications with RichFacesBuilding RIA Applications with RichFaces
Building RIA Applications with RichFaces
 

Recently uploaded

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Recently uploaded (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

RichFaces: more concepts and features

  • 1. JBoss RichFaces Webinar Series More Concepts and Features Webinar #2 Max Katz Charley Cowens © Exadel
  • 2. Upcoming Webinars: May 19th, 2009 – Rich UI Components (rich:* tag library) June 16th, 2009 - Skins
  • 3. Who Is This Guy? Senior Systems Engineer RIA strategy, development, training http://mkblog.exadel.com http://twitter.com/maxkatz Author of Practical RichFaces (Apress)
  • 4. The Plan Review and new stuff: 1.Sending an AJAX request 2.Partial view rendering 3.Partial view processing More tags and features: 1.a4j:jsFunction, a4j:poll, a4j:repeat, a4j:queue 2.JavaScript interactions Questions
  • 5. RichFaces 1. JSF-AJAX components (100+) 2. Skins 3. CDK (Component Development Kit)
  • 6. What You Should Know Runs in: • Any servlet container, application server • Portals: JBoss, WebLogic, Liferay Works with: • Any JSF implementation (1.1, 1.2, 2.0soon) Works with: • Seam, Spring Works with any 3rd party components: • Tomahawk, Trinidad, QuipuKit, etc.
  • 8. Basic Concepts and More 1.Sending AJAX request 2.Partial view (page) rendering 3.Partial view processing
  • 9. Sending AJAX Request • a4j:support – add AJAX support to any parent component • a4j:commandButton, a4j:commandLink • a4j:poll – periodically send AJAX request • a4j:jsFunction – AJAX request from any custom JavaScript function • a4j:push – a ping-like request
  • 10. Sending AJAX Request Using a4j:support <h:selectOneMenu value="#{bean.fruit}"> <a4j:support event="onchange" action="#{bean.change}" reRender="info"/> </<h:selectOneMenu> <h:panelGrid id="info"> ... </h:panelGrid> Using a4j:commandButton <a4j:commandButton value="AJAX Submit" action="#{echoBean.count}" reRender="echo, count" /> <h:outputText id="echo" value="#{echoBean.text}"/>
  • 11. Using a4j:support with rich components <rich:listShuttle sourceValue="#{toolBar.freeItems}" targetValue="#{toolBar.items}" var="items" converter="listShuttleconverter"> <rich:column width="18"> <h:graphicImage value="#{items.iconURI}"/> </rich:column> <rich:column> <h:outputText value="#{items.label}"/> </rich:column> <a4j:support event="onlistchanged" reRender="toolBar" /> <a4j:support event="onorderchanged" reRender="toolBar" /> </rich:listShuttle>
  • 12. a4j:jsFunction – AJAX request from any custom JavaScript function <h:form> <table> <tr> <td onmouseover="setdrink('Espresso')" onmouseout="setdrink('')">Espresso</td> <td onmouseover="setdrink('Cappuccino')" onmouseout="setdrink('')">Cappuccino</td> <td onmouseover="setdrink('Tea')" onmouseout="setdrink('')">Tea</td> </tr> </table> <h:outputText id="drink" value="I like #{bean.drink}" /> <a4j:jsFunction name="setdrink" reRender="drink" > <a4j:actionparam name="param1" assignTo="#{bean.drink}"/> </a4j:jsFunction> </h:form>
  • 13. a4j:poll – periodically sends AJAX request <a4j:poll id="poll" interval="100" enabled="#{clockBean.enabled}" reRender="clock" /> <h:panelGrid columns="3"> <a4j:commandButton value="Start Clock" action="#{clockBean.startClock}" reRender="poll" /> <a4j:commandButton value="Stop Clock" action="#{clockBean.stopClock}" reRender="poll" /> <h:outputText id="clock" value="#{clockBean.now}" /> </h:panelGrid>
  • 14. Partial View Rendering Point reRender to component id's to be rendered Use a4j:outputPanel to include components always to be rendered
  • 15. <a4j:commandLink reRender="id1,id2"/> ... Using <h:outputText id="id1"/> reRender <h:dataTable id="id2"> ... </h:dataTable> <a4j:commandLink reRender="panel"/> ... Using <h:panelGrid id="panel"> reRender to point <h:outputText /> to container <h:dataTable>..</h:dataTable> </h:panelGrid> <a4j:commandLink/> Using ... a4j:outputPanel <a4j:outputPanel ajaxRendered="true"> <h:outputText /> <h:dataTable>..</h:dataTable> <a4j:outputPanel>
  • 16. Deciding what components to re-render in runtime: (bind to Set, Collection, Array, comma-delimited String) <a4j:commandLink reRender="#{bean.renderControls}"> <h:outputText id="id1"/> <h:dataTable id="id2"> ... </h:dataTable> Setting limitToList="true", limits rendering to components set only in current reRender list <a4j:commandLink reRender="id1" limitToList="true"> <h:panelGrid id="id1"> <h:outputText /> </h:panelGrid> <a4j:outputPanel ajaxRendered="true"> <h:dataTable>...</h:dataTable> <a4j:outputPanel>
  • 17. Partial View Processing Use ajaxSingle attribute Use <a4j:region>...</a4j:region>
  • 18. Partial View Processing Using ajaxSingle <h:selectOneMenu value="#{bean.fruit}"> <a4j:support event="onchange" ajaxSingle="true"> </<h:selectOneMenu> Using a4j:region <a4j:region> <h:inputText/> <a4j:commandButton /> </a4j:region> <h:inputText/> <h:inputText/>
  • 19. a4j:region lets you define a concrete area in the tree to process renderRegionOnly limits re-rendering to this region only selfRendered – renders directly from JSF component tree, instead of synchronizing the tree with the Facelet bypassUpdates is useful when validating a form, it skips Update Model and Invoke Application phase <h:outputText value="Name:"/> <h:panelGroup> <a4j:region renderRegionOnly="true" selfRendered="true"> <h:inputText id="name" value="#{validationBean.name}" required="true" label="Name"> <f:validateLength minimum="4" /> <a4j:support event="onblur" bypassUpdates="true" /> </h:inputText> <rich:message for="name" /> </a4j:region> </h:panelGroup>
  • 20. More Tags and Concepts 1.a4j:repeat 2.a4j:queue 3.JavaScript interactions
  • 21. a4j:repeat works just like ui:repeat but also allows specific row update via AJAX <table> <a4j:repeat value="#{bean.numbers}" var="num" rowKeyVar="rowIndex"> <tr> <td width="20px"> <h:outputText id="num" value="#{num.number}" /> </td> <td> <a4j:commandLink value="-" reRender="num" action="#{bean.decrease}"> <a4j:actionparam name="rowIndex" value="#{rowIndex}" assignTo="#{repeatBean.updatedRow}" /> </a4j:commandLink> / <a4j:commandLink value="+" reRender="num" action="#{bean.increase}"> <a4j:actionparam name="rowIndex" value="#{rowIndex}" assignTo="#{bean.updatedRow}" /> </a4j:commandLink></td> </tr> </a4j:repeat> </table>
  • 22. a4j:queue – controls traffic between client and server – Wait for request to return before sending new one – Set request delay – “Replaces” requests from the same logical components – Define queue size • Define queue behavior when size is exceeded (fire/drop new, fire/drop first) <a4j:queue name="ajaxQueue" requestDelay="1000"/> ... <a4j:commandButton value="Delete" similarityGroupingId="actionGroup" eventsQeueu="ajaxQueue"/> <a4j:commandButton value="Save" similarityGroupingId="actionGroup" eventsQeueu="ajaxQueue"/>
  • 23. JavaScript interactions – call custom JavaScript function during different phases of the AJAX request <h:selectOneMenu value="#{bean.drink}"> <f:selectItem itemValue="Espresso"/> <a4j:support event="onchange" reRender="drink" onsubmit="alert('Getting new drink...')" onbeforedomupdate="alert('About to update browser DOM...')" oncomplete="alert('Browser DOM updated.')"/> </h:selectOneMenu>
  • 24. What We Covered More tags and features in 1.Sending an AJAX request 2.Partial view rendering 3.Partial view processing New tags and features 1.a4j:repeat 2.a4j:queue 3.JavaScript interactions
  • 25. Upcoming Webinars: May 19th, 2009 – Rich UI Components (rich:* tag library) June 16th, 2009 - Skins
  • 26. JSF/RichFaces Training On-site 1-3 days More info: http://mkblog.exadel.com