SlideShare a Scribd company logo
JSF Component Behaviors Andy Schwartz | Oracle Corporation
Agenda History Behavior API: Basics A Simple Sample Behavior Behavior API: Advanced Topics Auto Suggest Sample Behavior Future
History
First First, there was Ajax. And it was good. But it required JavaScript code.

Recommended for you

Jsf2.0 -4
Jsf2.0 -4Jsf2.0 -4
Jsf2.0 -4

The document discusses JavaServer Faces (JSF), an MVC framework for building web interfaces. It provides: - An overview of JSF concepts like managed beans, expression language, navigation rules, and components. - Examples of using JSF for static and dynamic navigation between pages, including declaring beans and navigation rules in faces-config.xml. - How JSF handles form submission and uses managed beans to represent request parameters and output data to results pages.

Introduction to jsf 2
Introduction to jsf 2Introduction to jsf 2
Introduction to jsf 2

JSF 2 life cycle consists of 6 phases: restore view, apply request values, process validations, update model values, invoke application, and render response. Managed beans are JavaBeans that can be accessed from JSF pages and are used to store data. Facelets is the templating language used by JSF 2 that replaced JSP. Navigation between pages can be done through configuration, implicit navigation based on action outcomes, or redirection. New features in JSF 2.2 include faces flows for page flows, HTML5 support, and a file upload component.

jsf2jsf 2java server faces
Spring MVC 3.0 Framework
Spring MVC 3.0 FrameworkSpring MVC 3.0 Framework
Spring MVC 3.0 Framework

Spring MVC 3.0 Framework Objective: 1. Introduce Spring MVC Module 2. Learn about Spring MVC Components (Dispatcher, Handler mapping, Controller, View Resolver, View) Slides: 1. What Is Spring? 2. Why use Spring? 3. By the way, just what is MVC? 4. MVC Architecture 5. Spring MVC Architecture 7. Spring MVC Components 8. DispatcherServlet 9. DispatcherServlet Architecture......... .........................................................

spring frameworkspring mvc
Sample: Ajax JavaScript API <h:outputScript name=&quot;jsf.js&quot; library=&quot;javax.faces&quot;/> <h:commandButton value=&quot;Do something Ajaxy&quot; onclick=&quot;jsf.ajax.request(this, event,  {render: 'out'}); return false;&quot;/> <h:outputText id=”out” value=”Update me!”/>
Ajax JavaScript API The Good Standard Flexible The Bad Verbose Error-prone
Time for a declarative Ajax API
Declarative Ajax, Take 1 New Components?

Recommended for you

Spring Portlet MVC
Spring Portlet MVCSpring Portlet MVC
Spring Portlet MVC

This session will provide a complete tour of using the Spring MVC framework to build Java Portlets. It will include an in-depth review of a sample portlet application developed using the latest features of Spring MVC, including Annotation-based Controllers. If you are writing Portlets and using Spring, this session is for you. We'll begin by discussing the unique differences and challenges when developing Portlets instead of traditional Servlet webapps. Then we'll talk about the unique approach that Spring MVC takes towards Portlets that fully leverages the Portlet lifecycle, instead of masking it like many other frameworks. We'll take an extensive tour of a sample application so we can see all the unique pieces of the framework in action. Finally we'll conclude with discussion of the upcoming support for the Portlet 2.0 (JSR 286) specification that will be part of Spring 3.0.

javaspringjsr168
JSF basics
JSF basicsJSF basics
JSF basics

This document provides an overview of JavaServer Faces (JSF), including its architecture, components, lifecycle, and usage. JSF is a component-based user interface framework for building web applications using reusable UI components and a component-oriented approach. The key aspects covered include the MVC architecture of JSF with models, views, and controllers; the main JSF components and their roles; the request processing lifecycle; and best practices for code implementation.

jsfjava eeservlet
Spring 3.x - Spring MVC - Advanced topics
Spring 3.x - Spring MVC - Advanced topicsSpring 3.x - Spring MVC - Advanced topics
Spring 3.x - Spring MVC - Advanced topics

The document discusses advanced topics in Spring MVC, including annotation driven controllers, arguments and return types, and validation. It provides details on annotations like @Controller, @RequestMapping, @PathVariable, @ModelAttribute, @CookieValue, @HeaderValue, @DateTimeFormat, @RequestBody, and @ResponseBody and how they can be used to configure controller methods. It also describes what types of arguments controller methods can accept and what return types are allowed.

validationspringjsr-303
Sample: New Components? <h:commandButton value=“Not Ajax”/> <a:commandButton value=“Ajax!”/>
New Components? The Good Simple Familiar The Bad Component explosion Next feature: more components?
Declarative Ajax, Take 2 New Attributes?
Sample: New Attributes? <h:commandButton ajax=“true”/>

Recommended for you

Introduction to JSF
Introduction toJSFIntroduction toJSF
Introduction to JSF

JSF is a Java specification and framework for building component-based user interfaces for web applications. It uses the MVC design pattern with reusable UI components, and handles tasks like data conversion, validation, event handling and navigation. The JSF architecture includes a component tree, request processing lifecycle and rendering model. New features in JSF 2 include Facelets as the default view declaration language, annotation-based configuration, standardized Ajax support, and improved error handling. Developing with JSF involves creating managed bean models, registering them, building pages with UI components, defining navigation, and configuring the web application in web.xml.

javajsf
SpringMVC
SpringMVCSpringMVC
SpringMVC
java
Spring MVC
Spring MVCSpring MVC
Spring MVC

The document describes the Spring MVC request lifecycle and how requests are handled in Spring MVC. It discusses how the DispatcherServlet receives requests and uses handler mappings to determine which controller should handle each request. It then describes how controllers process requests, returning a ModelAndView which is used to render the view. It also provides details on configuring controllers, view resolvers, and handler mappings, as well as examples of different types of controllers like command, form, and multi-action controllers.

emprovisespringmvc
New Attributes? The Good Simple No new components The Bad Attribute explosion Next feature: more attributes?
Declarative Ajax, Take 3 Attached Objects? Remember those?
What Are Attached Objects? Attached objects enhance components with functionality not anticipated by the original component author.
Some Existing Attached Objects Converters f:convertNumber f:convertDateTime Validators f:validateLength f:validateBean f:validateRegex

Recommended for you

Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5

The document provides an introduction to the Spring MVC framework. It describes key concepts such as MVC architecture, dependency injection, configuration of the DispatcherServlet, mapping requests to controllers, and defining views. It also discusses configuring ORM/JPA with Hibernate, sending emails, security, exceptions handling, and accessing REST services with RestTemplate. The document aims to give developers an overview of building web applications with Spring MVC.

#udemycourse#springmvcspring
Java Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC FrameworkJava Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC Framework

This document discusses the architecture of a Java Server Faces application integrated with the Spring MVC framework. It describes the presentation and business tiers, including the front controller, UI components, backing beans, views, service beans, and configuration files like web.xml, faces-config.xml, and applicationContext.xml. It also includes class diagrams and details the page flow and configuration of the demo application.

springjsf
Sun JSF Presentation
Sun JSF PresentationSun JSF Presentation
Sun JSF Presentation

This document provides an overview of JavaServer Faces (JSF), including: 1. JSF is a server-side user interface framework that provides reusable UI components, event handling, validation and integration with backend data for Java web applications. 2. The document outlines key JSF concepts like UI components, events, validators, converters and renderers. It also describes the request processing lifecycle and developer roles. 3. Advanced topics like navigation, internationalization and custom components are listed for discussion in a later session.

Ajax Attached Object?  <h:inputText> <f:convertNumber/> </h:inputText>  <h:commandButton> <f:ajax/> </h:commandButton>
Ajax Attached Object Yes!
Ajax Attached Object The Good Easy to use Familiar pattern No attribute explosion No component explosion Some precedent exists Think a4j:support as attached object instead of component The Bad More verbose than component/attribute alternatives Somebody needs to design the API!
Behavior API: Basics

Recommended for you

JSF 2 and beyond: Keeping progress coming
JSF 2 and beyond: Keeping progress comingJSF 2 and beyond: Keeping progress coming
JSF 2 and beyond: Keeping progress coming

Covers new features in JSF 2, community involvement in JSF and a look towards the future of this framework. Presented by Dan Allen, Pete Muir and Andy Schwartz at Devoxx 2009. http://www.devoxx.com/display/DV09/JSF+2+and+beyond

devoxxjsfjsf2
Component Framework Primer for JSF Users
Component Framework Primer for JSF UsersComponent Framework Primer for JSF Users
Component Framework Primer for JSF Users

JSF Summit 2009 presentation covering three component-centric web frameworks: JSF, Wicket and Tapestry.

wickettapestryjsf
Struts Introduction Course
Struts Introduction CourseStruts Introduction Course
Struts Introduction Course

This document provides an overview of the Struts framework and its key components. It covers the model-view-controller design pattern used in Struts, the model components including JavaBeans and ActionForm beans, view components like JSP tags and internationalization, controller components like Action classes and the configuration file, and finally the tag libraries used in Struts. The document is part of a training course on Struts and introduces each major concept across 9 units.

strutsapachejakarta
API Requirements Loose Coupling Surprise?
Loose Coupling Components should not contain Ajax-specific code Objects contribute scripts to component markup Components know where to insert attached scripts Objects may be attached to arbitrary components Objects may implement arbitrary behaviors Not limited to Ajax
Two New Contracts ClientBehavior ClientBehaviorHolder
ClientBehavior Contract String getScript(ClientBehaviorContext)

Recommended for you

Spring MVC 3.0 Framework (sesson_2)
Spring MVC 3.0 Framework (sesson_2)Spring MVC 3.0 Framework (sesson_2)
Spring MVC 3.0 Framework (sesson_2)

This document provides an overview and code examples for handling forms, page redirection, static pages, and exceptions in Spring MVC. It demonstrates creating Spring MVC applications with controllers and JSP views to submit a form, redirect pages, and serve static content. It also includes code for a basic exception handling controller and configuration files needed to set up Spring MVC.

Spring mvc
Spring mvcSpring mvc
Spring mvc

The Spring Framework provides a comprehensive Java platform for developing applications. It simplifies development by allowing developers to avoid dealing directly with complex APIs. Spring uses Inversion of Control and Dependency Injection to decouple classes and increase maintainability. The core Spring modules include beans, context, AOP, and aspects. Spring MVC implements the MVC pattern to build web applications, separating the model, view, and controller aspects.

spring mvcspring iocspring javaconfig
ASP.NET MVC
ASP.NET MVCASP.NET MVC
ASP.NET MVC

This document provides an overview of the ASP.NET MVC pipeline. It begins with an introduction to ASP.NET MVC and the basic MVC pattern of controller, model, and view. It then details each stage of the ASP.NET MVC request pipeline including controller factories, routing, action invokers, model binders, action filters, action results, and view engines. For each component, it provides a brief description and relevant interfaces. The document aims to explain the underlying process and components that handle requests in ASP.NET MVC.

aspnet mvc
ClientBehavior Scripts What can a ClientBehavior script do?
Say Hello // Some people *always* start with “Hello, World!” public String getScript(ClientBehaviorContext c) { return “alert(‘Hello, World!’)”; }
Ajax // Slightly more interesting public String getScript(ClientBehaviorContext c) { return “jsf.ajax.request(this, event)”; }
What Else? Client-side validation DOM manipulation Tooltips, hover content Disclosures Logging Confirmation Key handling Auto-suggest

Recommended for you

JSF 2.0 (JavaEE Webinar)
JSF 2.0 (JavaEE Webinar)JSF 2.0 (JavaEE Webinar)
JSF 2.0 (JavaEE Webinar)

The document provides an overview of new features in JavaServer Faces (JSF) 2.0, including foundational changes, improved system events, resource handling, state saving, GET request support, and a more powerful component model with composite components and behaviors. Key additions are support for Ajax, easier component development through templating with Facelets, and performance improvements through partial state saving.

Jsf Ajax
Jsf AjaxJsf Ajax
Jsf Ajax

This document discusses the history and future of JSF and Ajax. It begins with an overview of JSF and how it works. It then discusses early approaches to adding Ajax functionality to JSF such as Shale Remoting and Dynamic Faces. Next, it covers component libraries that integrated Ajax more fully like Ajax4JSF, Apache Trinidad, and ICEFaces. It concludes by looking ahead to further improvements in JSF 2.0.

ajaxworld-2008ajaxworld-2008ajaxworld-2008
Devoxx 09 (Belgium)
Devoxx 09 (Belgium)Devoxx 09 (Belgium)
Devoxx 09 (Belgium)

The document discusses enhancing JSF 2.0 components. It explores the JSF 2.0 component model and how Facelets is optimized for component development. It describes how to create composite components and enhance them with JSF 2.0 features like Ajax and behaviors. The demo shows how to add interactivity to components using these new JSF 2.0 capabilities.

Who Calls getScript()? Components/Renderers call getScript() during rendering and insert scripts into the generated markup.
Standard ClientBehaviors Just one for now Java API: AjaxBehavior Tag API: <f:ajax>
Attaching ClientBehaviors Remember EditableValueHolder?
ClientBehaviorHolder Contract void addClientBehavior( String eventName,  ClientBehavior behavior)

Recommended for you

2 Asp Dot Net Ajax Extensions
2 Asp Dot Net Ajax Extensions2 Asp Dot Net Ajax Extensions
2 Asp Dot Net Ajax Extensions

The document discusses the architecture and components of ASP.NET AJAX extensions. It describes the ScriptManager control as the starting point for ASP.NET AJAX pages. It also covers UpdatePanel for partial page updates, triggers, and UpdateProgress for displaying update status. Web services using ASMX are also discussed as endpoints for asynchronous callbacks from client-side scripts.

aspnet
Vb.Net Web Forms
Vb.Net  Web FormsVb.Net  Web Forms
Vb.Net Web Forms

This document provides an overview of ASP.NET web forms and server controls. It discusses how to create a simple ASP.NET web form with code behind pages, introduces common server controls like labels and textboxes, and how to hook up event handling. It also covers using validation controls to validate user input on web forms.

Rich faces
Rich facesRich faces
Rich faces

The document provides an overview of the RichFaces framework including: - What RichFaces is and its history - Installing and configuring RichFaces - Ajax action components like a4j:support, a4j:commandButton, a4j:poll - UI components like menus, calendar, trees - Examples of using various RichFaces components

faceletsjavarichfaces
What Events? Components define available events/attach points Behavior events can correspond to DOM events Events can also be “logical” (component-level) Some obvious events: h:commandButton: click h:inputText: change Some less obvious events h:commandButton: focus, blur h:inputText: keyup, keydown, keypress h:panelGroup: mouseover, mouseout foo: bar
ClientBehaviorHolder Contract Collection<String> getEventNames();
Usage <h:commandButton> <f:ajax event=“focus”/> </h:commandButton> <h:inputText> <f:ajax event=“keypress”/> </h:inputText> <h:panelGroup> <foo:showHoverContent event=“mouseover”/> </h:panelGroup>
Logical Events Some components expose logical events Command: action (not DOM click) Input: valueChange (not DOM change) Client-side event abstraction over DOM Hides arbitrary DOM implementations Matches server-side abstraction Helpful in wrapping scenarios

Recommended for you

Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC

The document introduces ASP.NET MVC, which is a framework from Microsoft that builds on the standard ASP.NET engine. It follows the model-view-controller (MVC) pattern to separate application behavior, user interface, and data access. The goals of ASP.NET MVC include testability, friendly URLs, leveraging existing ASP.NET features, and full control of HTML. It also discusses how ASP.NET MVC works, including routing, controllers, actions, and views. Demos are provided for basic routing and controllers as well as models, HTML helpers, forms, and validation.

aspnetmvcaspnet mvc
jQuery and AJAX with Rails
jQuery and AJAX with RailsjQuery and AJAX with Rails
jQuery and AJAX with Rails

This document discusses several tools and techniques for using jQuery and AJAX with Ruby on Rails applications. It covers manually adding jQuery, using the jQuery Rails adapter gem, unobtrusive JavaScript, AJAX concepts, and the $.ajax method. Examples are provided for debugging with HttpFox and Visual Event, installing jQuery Rails, and making AJAX calls.

railsjquery
Being a pimp without silverlight
Being a pimp without silverlightBeing a pimp without silverlight
Being a pimp without silverlight

The document discusses a presentation by Maarten Balliauw and Kris van der Mast on ASP.NET MVC and jQuery. It provides an overview of ASP.NET MVC and its advantages over WebForms such as testability and control over HTML. It also discusses the basics of jQuery including selectors, events and AJAX functionality. It encourages attendees to learn more about these technologies from resources on their websites and blogs.

aspnet mvcjquery
Logical Events  <f:ajax event=&quot;click&quot;> <h:panelGroup> <h:commandButton/> <h:inputText/> <h:commandButton/> </h:panelGroup> </f:ajax>
Logical Events  <f:ajax event=&quot;action&quot;> <h:panelGroup> <h:commandButton/> <h:inputText/> <h:commandButton/> </h:panelGroup> </f:ajax>
Default Events What happens if you do not specify an event?
ClientBehaviorHolder Contract String getDefaultEventName();

Recommended for you

GWT
GWTGWT
GWT

This document provides an overview of Google Web Toolkit (GWT), an open source JavaScript compiler that allows developers to write client-side applications in Java and deploy them as JavaScript. The document discusses GWT's mission, features, history, status, architecture, performance advantages, and how it enables building AJAX applications with Java-based components, validation, internationalization, and more. Code samples demonstrate using GWT to create user interfaces, handle events, manage page flow, retrieve and display data, and call remote services.

javaalphacspgwt
Asp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentAsp.Net Ajax Component Development
Asp.Net Ajax Component Development

The document discusses developing custom ASP.NET AJAX client components and server controls. It covers the key steps which are: 1) Developing the reusable client component code using the ASP.NET AJAX prototype model. 2) Creating an associated server control that emits the required JavaScript to register and initialize the client component. 3) Wiring up the server control to load and instantiate the client component code.

Being a pimp without silverlight - ASP.NET MVC 2 and jQuery
Being a pimp without silverlight - ASP.NET MVC 2 and jQueryBeing a pimp without silverlight - ASP.NET MVC 2 and jQuery
Being a pimp without silverlight - ASP.NET MVC 2 and jQuery

The document discusses ASP.NET MVC and jQuery. It introduces ASP.NET MVC as an alternative to WebForms that allows for better testability and control over HTML. jQuery is presented as a JavaScript library that simplifies DOM manipulation and event handling. The presenters then demonstrate features of MVC like model-view-controller separation and jQuery techniques like DOM selection and event binding. Resources for further learning are also provided.

aspnetmvcjquery
Default Event Usage <h:commandButton>  <f:ajax/> </h:commandButton> <h:inputText>  <f:ajax/> </h:inputText> <h:panelGroup>  <f:ajax/> </h:panelGroup>
More Event Fun: Chaining <h:commandButton> <foo:confirm/> <f:ajax/> </h:commandButton>
More Event Fun: Multiple Events <h:commandButton> <f:ajax/> <foo:showHoverContent event=“mouseover”/> <foo:hideHoverContent event=“mouseout”/> </h:commandButton>
Standard ClientBehaviorHolders All standard components implement ClientBehaviorHolder.

Recommended for you

Being a pimp without silverlight
Being a pimp without silverlightBeing a pimp without silverlight
Being a pimp without silverlight

The document discusses ASP.NET MVC and jQuery. It introduces ASP.NET MVC as an alternative to WebForms that allows for better testability and control over HTML. jQuery is presented as a JavaScript library that simplifies DOM manipulation and event handling. The document then demonstrates some basic concepts of both technologies like MVC patterns, jQuery selectors and events. It concludes by providing additional resources to learn more.

Google Web Toolkits
Google Web ToolkitsGoogle Web Toolkits
Google Web Toolkits

This document provides an overview of Google Web Toolkit (GWT), including its architecture, key features, and how to implement common tasks. GWT is a development toolkit that allows web applications to be written in Java and compiled into JavaScript for better cross-browser compatibility. It discusses topics like building user interfaces with widgets, event handling, styling with CSS, making remote procedure calls, and accessing native JavaScript methods. Examples and demos are provided to illustrate concepts like creating custom widgets, handling events, and making asynchronous server calls. Resources for learning more about GWT are also listed.

CiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForceCiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForce

This document introduces the Database.com SDK for building Java applications that interact with Salesforce data. It discusses the key components of the SDK including the JPA provider, API connector, and OAuth authentication. It also provides an overview of how to deploy Java applications to Heroku, including using Git for deployment, configuring dynos, and other Heroku features.

#ciklum#java
A Simple Sample Behavior
Our Simple Sample Behavior Confirm Behavior
Step 1: Implement the Behavior Extend ClientBehaviorBase Implement getScript()
ConfirmBehavior public class ConfirmBehavior extends ClientBehaviorBase { @Override public String getScript( ClientBehaviorContext behaviorContext)  { return &quot;return confirm('Are you sure?')&quot;; } }

Recommended for you

Java Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXJava Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAX

This document provides an overview of JavaServer Faces (JSF) and Asynchronous JavaScript and XML (AJAX). It describes JSF as a server-side user interface framework that uses components like UIForm and UIInput to build web applications. It also explains how AJAX allows for asynchronous client-server communication using XMLHttpRequest to update parts of a page without reloading. The key technologies discussed are JSF tags, configuration files, components and validators as well as the steps involved in an AJAX request like creating an XMLHttpRequest object and processing the response.

javajava web programming
Esposito Ajax Remote
Esposito Ajax RemoteEsposito Ajax Remote
Esposito Ajax Remote

ASP.NET AJAX allows developers to call remote services from client-side code by exposing server-side code as RESTful services or SOAP web services. It uses JSON serialization to exchange data between the client and server and allows defining callbacks for asynchronous method calls. Page methods provide another way to expose server logic by decorating methods in code-behind classes with the WebMethod attribute.

Ajax3
Ajax3Ajax3
Ajax3

The document discusses Ajax technology. It defines Ajax as an asynchronous JavaScript and XML approach to exchanging data with a web server and updating parts of a web page without reloading the entire page. It describes the key technologies that enable Ajax like XMLHttpRequest, and libraries that simplify Ajax like jQuery. It also covers common uses of Ajax and issues to consider around back/forward buttons, duplicate code, and cross-domain requests.

Step 2: Register the Behavior Two ways to do this Old School: faces-config.xml New School: annotations Both call Application.addBehavior(String, Class) Associates Behavior class with a behavior id. Enables Application.createBehavior(String)
Register Behavior: Old School <faces-config> <behavior> <behavior-id>jsf2foo.behavior.Confirm</behavior-id> <behavior-class> org.jsf2foo.behavior.confirm.ConfirmBehavior </behavior-class> </behavior> </faces-config>
Register Behavior: New School @FacesBehavior(&quot;jsf2foo.behavior.Confirm”) public class ConfirmBehavior …
Step 3: Define the Tag Registering Behavior enables Application.createBehavior(String) Still need a tag to expose to page authors Facelets tags are defined in taglib.xml file taglib.xml files live in WEB-INF or META-INF

Recommended for you

Direct Web Remoting : DWR
Direct Web Remoting : DWRDirect Web Remoting : DWR
Direct Web Remoting : DWR

This document provides an overview of Direct Web Remoting (DWR), including: 1) DWR allows Java code to be executed from JavaScript and JavaScript code to be executed from Java, enabling bidirectional communication between the two languages. 2) A tutorial is given demonstrating how to build a simple calculator application using DWR with steps to set up the project, write the business logic, and create the front-end. 3) Advantages of DWR are that it allows Java functions to be called from JavaScript like RMI or SOAP, automatically generates Java versions of JS functions, and exposes business methods through JavaScript.

riadwrajaxria
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf

As a popular open-source library for analytics engineering, dbt is often used in combination with Airflow. Orchestrating and executing dbt models as DAGs ensures an additional layer of control over tasks, observability, and provides a reliable, scalable environment to run dbt models. This webinar will cover a step-by-step guide to Cosmos, an open source package from Astronomer that helps you easily run your dbt Core projects as Airflow DAGs and Task Groups, all with just a few lines of code. We’ll walk through: - Standard ways of running dbt (and when to utilize other methods) - How Cosmos can be used to run and visualize your dbt projects in Airflow - Common challenges and how to address them, including performance, dependency conflicts, and more - How running dbt projects in Airflow helps with cost optimization Webinar given on 9 July 2024

apache airflowdbtdbt-core
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf

Kief Morris rethinks the infrastructure code delivery lifecycle, advocating for a shift towards composable infrastructure systems. We should shift to designing around deployable components rather than code modules, use more useful levels of abstraction, and drive design and deployment from applications rather than bottom-up, monolithic architecture and delivery.

infrastructure as codeclouddevops
Jsf2foo.taglib.xml <facelet-taglib> <namespace>http://jsf2foo.org/behavior</namespace> <tag> <tag-name>confirm</tag-name> <behavior> <behavior-id>jsf2foo.behavior.Confirm</behavior-id> </behavior> </tag> </facelet-taglib>
Step 4: Ready To Go The Behavior is now available for use under namespace specified in the taglib.xml file
ConfirmBehavior Usage <html … xmlns:j2f=&quot;http://jsf2foo.org/behavior&quot;> … <h:commandButton value=&quot;Submit&quot;> <j2f:confirm/> </h:commandButton>
What Gets Rendered? <input type=&quot;submit&quot;  value=&quot;Submit&quot;  onclick=&quot;return confirm('Are you sure?')&quot; />

Recommended for you

RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx

Your comprehensive guide to RPA in healthcare for 2024. Explore the benefits, use cases, and emerging trends of robotic process automation. Understand the challenges and prepare for the future of healthcare automation

rpa in healthcarerpa in healthcare usarpa in healthcare industry
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL

Blockchain technology is transforming industries and reshaping the way we conduct business, manage data, and secure transactions. Whether you're new to blockchain or looking to deepen your knowledge, our guidebook, "Blockchain for Dummies", is your ultimate resource.

blockchainweb3blockchain technology
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx

How do we build an IoT product, and make it profitable? Talk from the IoT meetup in March 2024. https://www.meetup.com/iot-sweden/events/299487375/

iot
Behavior API: Advanced Topics
ClientBehaviorContext Provides context for getScript() FacesContext Component Event name Parameters Source id
ClientBehaviorHints Enum returned by ClientBehavior.getHints() Provides hints to component/renderer Currently only one hint: SUBMITTING
ClientBehavior Decoding ClientBehaviors also participate in decoding ClientBehavior.decode() Allows scripts to communicate back to server What can ClientBehaviors do in decode? Queue an event Send a response

Recommended for you

Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides

If you’ve ever had to analyze a map or GPS data, chances are you’ve encountered and even worked with coordinate systems. As historical data continually updates through GPS, understanding coordinate systems is increasingly crucial. However, not everyone knows why they exist or how to effectively use them for data-driven insights. During this webinar, you’ll learn exactly what coordinate systems are and how you can use FME to maintain and transform your data’s coordinate systems in an easy-to-digest way, accurately representing the geographical space that it exists within. During this webinar, you will have the chance to: - Enhance Your Understanding: Gain a clear overview of what coordinate systems are and their value - Learn Practical Applications: Why we need datams and projections, plus units between coordinate systems - Maximize with FME: Understand how FME handles coordinate systems, including a brief summary of the 3 main reprojectors - Custom Coordinate Systems: Learn how to work with FME and coordinate systems beyond what is natively supported - Look Ahead: Gain insights into where FME is headed with coordinate systems in the future Don’t miss the opportunity to improve the value you receive from your coordinate system data, ultimately allowing you to streamline your data analysis and maximize your time. See you there!

Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems

Stream processing is a crucial component of modern data infrastructure, but constructing an efficient and scalable stream processing system can be challenging. Decoupling compute and storage architecture has emerged as an effective solution to these challenges, but it can introduce high latency issues, especially when dealing with complex continuous queries that necessitate managing extra-large internal states. In this talk, we focus on addressing the high latency issues associated with S3 storage in stream processing systems that employ a decoupled compute and storage architecture. We delve into the root causes of latency in this context and explore various techniques to minimize the impact of S3 latency on stream processing performance. Our proposed approach is to implement a tiered storage mechanism that leverages a blend of high-performance and low-cost storage tiers to reduce data movement between the compute and storage layers while maintaining efficient processing. Throughout the talk, we will present experimental results that demonstrate the effectiveness of our approach in mitigating the impact of S3 latency on stream processing. By the end of the talk, attendees will have gained insights into how to optimize their stream processing systems for reduced latency and improved cost-efficiency.

Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure

Recent advancements in the NIST-JARVIS infrastructure: JARVIS-Overview, JARVIS-DFT, AtomGPT, ALIGNN, JARVIS-Leaderboard

jarvisjarvis-dftalignn
Server-Side Events ClientBehaviors can queue events Events are queued on parent component Leverage existing FacesEvent lifecycle BehaviorEvent extends FacesEvent BehaviorListener extends FacesListener
AjaxBehavior Event Sample  <h:commandButton actionListener=&quot;#{foo.doIt}&quot;> <f:ajax/> </h:commandButton>  <h:panelGroup> <foo:showHoverContent event=“mouseover” listener=&quot;#{foo.hover}&quot;/> </h:panelGroup>
Behavior API So far we've been focusing on ClientBehavior API There is more to the story: Behavior API ClientBehavior extends Behavior Base class for other possible non-client Behaviors Phased behavior Behavior defines event handling contract broadcast(BehaviorEvent)
ClientBehaviorRenderer ClientBehaviors can delegate to RenderKit-specific ClientBehaviorRenderers Similar to UIComponent/Renderer split Allows RenderKit-specific script generation and decoding Allows frameworks to plug in framework-specific functionality without replacing ClientBehavior implementations.

Recommended for you

Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...

Have you noticed the OpenSSF Scorecard badges on the official Dart and Flutter repos? It's Google's way of showing that they care about security. Practices such as pinning dependencies, branch protection, required reviews, continuous integration tests etc. are measured to provide a score and accompanying badge. You can do the same for your projects, and this presentation will show you how, with an emphasis on the unique challenges that come up when working with Dart and Flutter. The session will provide a walkthrough of the steps involved in securing a first repository, and then what it takes to repeat that process across an organization with multiple repos. It will also look at the ongoing maintenance involved once scorecards have been implemented, and how aspects of that maintenance can be better automated to minimize toil.

dartflutteropenssf
Observability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetryObservability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetry

Are you interested in dipping your toes in the cloud native observability waters, but as an engineer you are not sure where to get started with tracing problems through your microservices and application landscapes on Kubernetes? Then this is the session for you, where we take you on your first steps in an active open-source project that offers a buffet of languages, challenges, and opportunities for getting started with telemetry data. The project is called openTelemetry, but before diving into the specifics, we’ll start with de-mystifying key concepts and terms such as observability, telemetry, instrumentation, cardinality, percentile to lay a foundation. After understanding the nuts and bolts of observability and distributed traces, we’ll explore the openTelemetry community; its Special Interest Groups (SIGs), repositories, and how to become not only an end-user, but possibly a contributor.We will wrap up with an overview of the components in this project, such as the Collector, the OpenTelemetry protocol (OTLP), its APIs, and its SDKs. Attendees will leave with an understanding of key observability concepts, become grounded in distributed tracing terminology, be aware of the components of openTelemetry, and know how to take their first steps to an open-source contribution! Key Takeaways: Open source, vendor neutral instrumentation is an exciting new reality as the industry standardizes on openTelemetry for observability. OpenTelemetry is on a mission to enable effective observability by making high-quality, portable telemetry ubiquitous. The world of observability and monitoring today has a steep learning curve and in order to achieve ubiquity, the project would benefit from growing our contributor community.

cloudcloud native observabilitycloud native
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...

This presentation explores the practical application of image description techniques. Familiar guidelines will be demonstrated in practice, and descriptions will be developed “live”! If you have learned a lot about the theory of image description techniques but want to feel more confident putting them into practice, this is the presentation for you. There will be useful, actionable information for everyone, whether you are working with authors, colleagues, alone, or leveraging AI as a collaborator. Link to presentation recording and slides: https://bnctechforum.ca/sessions/details-of-description-part-ii-describing-images-in-practice/ Presented by BookNet Canada on June 25, 2024, with support from the Department of Canadian Heritage.

a11yaccessibilityalt text
Auto Suggest Behavior
Goals/Assumptions Provide Google Auto Suggest-like functionality Behavior attached to arbitrary input components Assumption: Access to specific client events Assumption: DOM input element
Contract We need an API for retrieving suggestions.
Contract: Suggester public interface Suggester { public Collection<String> suggest(String prefix); }

Recommended for you

20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024

Everything that I found interesting last month about the irresponsible use of machine intelligence

quantumfaxmachine
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx

This is a slide deck that showcases the updates in Microsoft Copilot for May 2024

microsoftmicrosoft copilot
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation

Java Servlet programs

Contract We need a tag API.
Contract: Tag  <h:inputText id=&quot;search&quot;> <j2f:suggest suggester=&quot;#{suggester}&quot;/> </h:inputText>  <tr:inputText id=&quot;search&quot;> <j2f:suggest suggester=&quot;#{suggester}&quot;/> </tr:inputText>
Event Handling Behavior Key events: Retrieve suggestions, show list Up/down arrow: Navigate suggestions list Enter: Accept suggestion Escape: Hide suggestions list Blur: Hide suggestions list
Handler Implementation Typically the default BehaviorHandler is sufficient We have special requirements Single Behavior instance, multiple events Solution: Need a custom BehaviorHandler

Recommended for you

Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf

Sustainability requires ingenuity and stewardship. Did you know Pigging Solutions pigging systems help you achieve your sustainable manufacturing goals AND provide rapid return on investment. How? Our systems recover over 99% of product in transfer piping. Recovering trapped product from transfer lines that would otherwise become flush-waste, means you can increase batch yields and eliminate flush waste. From raw materials to finished product, if you can pump it, we can pig it.

pigging solutionsprocess piggingproduct transfers
Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024

This presentation explores the practical application of image description techniques. Familiar guidelines will be demonstrated in practice, and descriptions will be developed “live”! If you have learned a lot about the theory of image description techniques but want to feel more confident putting them into practice, this is the presentation for you. There will be useful, actionable information for everyone, whether you are working with authors, colleagues, alone, or leveraging AI as a collaborator. Link to presentation recording and transcript: https://bnctechforum.ca/sessions/details-of-description-part-ii-describing-images-in-practice/ Presented by BookNet Canada on June 25, 2024, with support from the Department of Canadian Heritage.

a11yaccessibilityalt text
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy

Not so much to say

SuggestBehavior: getScript()  Typically ClientBehaviors generate a single script We have special requirements SuggestBehavior generates event-specific scripts Solution: ClientBehaviorContext.getEventName()
Requesting Suggestions Key up activity triggers suggestions list Suggestions retrieved from server Target the SuggestBehavior instance Solution: Use jsf.ajax.request to implement fetch
Requesting Suggestions Key up activity triggers suggestions list Suggestions retrieved from server Target the SuggestBehavior instance Solution: Use jsf.ajax.request to implement fetch
Selecting a Suggestion Handle key up for arrow key navigation Enter key accepts current selection However, enter key also submits form Solution: cancel default enter key behavior

Recommended for you

The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing

Invited Remote Lecture to SC21 The International Conference for High Performance Computing, Networking, Storage, and Analysis St. Louis, Missouri November 18, 2021

distributed supercomputerdistributed machine learning
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024

Everything that I found interesting about machines behaving intelligently during June 2024

quantumfaxmachine
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...

Today’s digitally connected world presents a wide range of security challenges for enterprises. Insider security threats are particularly noteworthy because they have the potential to cause significant harm. Unlike external threats, insider risks originate from within the company, making them more subtle and challenging to identify. This blog aims to provide a comprehensive understanding of insider security threats, including their types, examples, effects, and mitigation techniques.

insider securitycybersecurity threatsenterprise security
Resource Dependencies SuggestBehavior requires JavaScript, CSS Dependencies should be transparent to application Solution: Use new ResourceHandler mechanism
What's Left? State saving Error handling Request collapsing Autocomplete
Future
Ideas Targeted postback paylaods Ajax over GET Out of band Ajax Improved Ajax queueing/event collapsing Pre-execute behavior processing Alternate behavior contracts Fallback behavior Attached object value expression support Attached object state saving Initialization/DOM modifiers

Recommended for you

More Related Content

What's hot

Spring Web MVC
Spring Web MVCSpring Web MVC
Spring Web MVC
zeeshanhanif
 
Java server faces
Java server facesJava server faces
Java server faces
Fábio Santos
 
Spring MVC Basics
Spring MVC BasicsSpring MVC Basics
Spring MVC Basics
Bozhidar Bozhanov
 
Jsf2.0 -4
Jsf2.0 -4Jsf2.0 -4
Jsf2.0 -4
Vinay Kumar
 
Introduction to jsf 2
Introduction to jsf 2Introduction to jsf 2
Introduction to jsf 2
yousry ibrahim
 
Spring MVC 3.0 Framework
Spring MVC 3.0 FrameworkSpring MVC 3.0 Framework
Spring Portlet MVC
Spring Portlet MVCSpring Portlet MVC
Spring Portlet MVC
John Lewis
 
JSF basics
JSF basicsJSF basics
JSF basics
airbo
 
Spring 3.x - Spring MVC - Advanced topics
Spring 3.x - Spring MVC - Advanced topicsSpring 3.x - Spring MVC - Advanced topics
Spring 3.x - Spring MVC - Advanced topics
Guy Nir
 
Introduction to JSF
Introduction toJSFIntroduction toJSF
Introduction to JSF
SoftServe
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
Emprovise
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5
Tuna Tore
 
Java Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC FrameworkJava Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC Framework
Guo Albert
 
Sun JSF Presentation
Sun JSF PresentationSun JSF Presentation
Sun JSF Presentation
Gaurav Dighe
 
JSF 2 and beyond: Keeping progress coming
JSF 2 and beyond: Keeping progress comingJSF 2 and beyond: Keeping progress coming
JSF 2 and beyond: Keeping progress coming
Andy Schwartz
 
Component Framework Primer for JSF Users
Component Framework Primer for JSF UsersComponent Framework Primer for JSF Users
Component Framework Primer for JSF Users
Andy Schwartz
 
Struts Introduction Course
Struts Introduction CourseStruts Introduction Course
Struts Introduction Course
guest764934
 
Spring MVC 3.0 Framework (sesson_2)
Spring MVC 3.0 Framework (sesson_2)Spring MVC 3.0 Framework (sesson_2)
Spring MVC 3.0 Framework (sesson_2)
Ravi Kant Soni (ravikantsoni03@gmail.com)
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
Hamid Ghorbani
 

What's hot (20)

Spring Web MVC
Spring Web MVCSpring Web MVC
Spring Web MVC
 
Java server faces
Java server facesJava server faces
Java server faces
 
Spring MVC Basics
Spring MVC BasicsSpring MVC Basics
Spring MVC Basics
 
Jsf2.0 -4
Jsf2.0 -4Jsf2.0 -4
Jsf2.0 -4
 
Introduction to jsf 2
Introduction to jsf 2Introduction to jsf 2
Introduction to jsf 2
 
Spring MVC 3.0 Framework
Spring MVC 3.0 FrameworkSpring MVC 3.0 Framework
Spring MVC 3.0 Framework
 
Spring Portlet MVC
Spring Portlet MVCSpring Portlet MVC
Spring Portlet MVC
 
JSF basics
JSF basicsJSF basics
JSF basics
 
Spring 3.x - Spring MVC - Advanced topics
Spring 3.x - Spring MVC - Advanced topicsSpring 3.x - Spring MVC - Advanced topics
Spring 3.x - Spring MVC - Advanced topics
 
Introduction to JSF
Introduction toJSFIntroduction toJSF
Introduction to JSF
 
SpringMVC
SpringMVCSpringMVC
SpringMVC
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5
 
Java Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC FrameworkJava Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC Framework
 
Sun JSF Presentation
Sun JSF PresentationSun JSF Presentation
Sun JSF Presentation
 
JSF 2 and beyond: Keeping progress coming
JSF 2 and beyond: Keeping progress comingJSF 2 and beyond: Keeping progress coming
JSF 2 and beyond: Keeping progress coming
 
Component Framework Primer for JSF Users
Component Framework Primer for JSF UsersComponent Framework Primer for JSF Users
Component Framework Primer for JSF Users
 
Struts Introduction Course
Struts Introduction CourseStruts Introduction Course
Struts Introduction Course
 
Spring MVC 3.0 Framework (sesson_2)
Spring MVC 3.0 Framework (sesson_2)Spring MVC 3.0 Framework (sesson_2)
Spring MVC 3.0 Framework (sesson_2)
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
 

Similar to JSF Component Behaviors

ASP.NET MVC
ASP.NET MVCASP.NET MVC
ASP.NET MVC
Paul Stovell
 
JSF 2.0 (JavaEE Webinar)
JSF 2.0 (JavaEE Webinar)JSF 2.0 (JavaEE Webinar)
JSF 2.0 (JavaEE Webinar)
Roger Kitain
 
Jsf Ajax
Jsf AjaxJsf Ajax
Jsf Ajax
rajivmordani
 
Devoxx 09 (Belgium)
Devoxx 09 (Belgium)Devoxx 09 (Belgium)
Devoxx 09 (Belgium)
Roger Kitain
 
2 Asp Dot Net Ajax Extensions
2 Asp Dot Net Ajax Extensions2 Asp Dot Net Ajax Extensions
2 Asp Dot Net Ajax Extensions
Abhishek Bhatnagar
 
Vb.Net Web Forms
Vb.Net  Web FormsVb.Net  Web Forms
Vb.Net Web Forms
Dutch Dasanaike {LION}
 
Rich faces
Rich facesRich faces
Rich faces
BG Java EE Course
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
Sunpawet Somsin
 
jQuery and AJAX with Rails
jQuery and AJAX with RailsjQuery and AJAX with Rails
jQuery and AJAX with Rails
Alan Hecht
 
Being a pimp without silverlight
Being a pimp without silverlightBeing a pimp without silverlight
Being a pimp without silverlight
Maarten Balliauw
 
GWT
GWTGWT
GWT
yuvalb
 
Asp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentAsp.Net Ajax Component Development
Asp.Net Ajax Component Development
Chui-Wen Chiu
 
Being a pimp without silverlight - ASP.NET MVC 2 and jQuery
Being a pimp without silverlight - ASP.NET MVC 2 and jQueryBeing a pimp without silverlight - ASP.NET MVC 2 and jQuery
Being a pimp without silverlight - ASP.NET MVC 2 and jQuery
Kris van der Mast
 
Being a pimp without silverlight
Being a pimp without silverlightBeing a pimp without silverlight
Being a pimp without silverlight
Kris van der Mast
 
Google Web Toolkits
Google Web ToolkitsGoogle Web Toolkits
Google Web Toolkits
Yiguang Hu
 
CiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForceCiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForce
Ciklum Ukraine
 
Java Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXJava Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAX
IMC Institute
 
Esposito Ajax Remote
Esposito Ajax RemoteEsposito Ajax Remote
Esposito Ajax Remote
ask bills
 
Ajax3
Ajax3Ajax3
Direct Web Remoting : DWR
Direct Web Remoting : DWRDirect Web Remoting : DWR
Direct Web Remoting : DWR
hussulinux
 

Similar to JSF Component Behaviors (20)

ASP.NET MVC
ASP.NET MVCASP.NET MVC
ASP.NET MVC
 
JSF 2.0 (JavaEE Webinar)
JSF 2.0 (JavaEE Webinar)JSF 2.0 (JavaEE Webinar)
JSF 2.0 (JavaEE Webinar)
 
Jsf Ajax
Jsf AjaxJsf Ajax
Jsf Ajax
 
Devoxx 09 (Belgium)
Devoxx 09 (Belgium)Devoxx 09 (Belgium)
Devoxx 09 (Belgium)
 
2 Asp Dot Net Ajax Extensions
2 Asp Dot Net Ajax Extensions2 Asp Dot Net Ajax Extensions
2 Asp Dot Net Ajax Extensions
 
Vb.Net Web Forms
Vb.Net  Web FormsVb.Net  Web Forms
Vb.Net Web Forms
 
Rich faces
Rich facesRich faces
Rich faces
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
jQuery and AJAX with Rails
jQuery and AJAX with RailsjQuery and AJAX with Rails
jQuery and AJAX with Rails
 
Being a pimp without silverlight
Being a pimp without silverlightBeing a pimp without silverlight
Being a pimp without silverlight
 
GWT
GWTGWT
GWT
 
Asp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentAsp.Net Ajax Component Development
Asp.Net Ajax Component Development
 
Being a pimp without silverlight - ASP.NET MVC 2 and jQuery
Being a pimp without silverlight - ASP.NET MVC 2 and jQueryBeing a pimp without silverlight - ASP.NET MVC 2 and jQuery
Being a pimp without silverlight - ASP.NET MVC 2 and jQuery
 
Being a pimp without silverlight
Being a pimp without silverlightBeing a pimp without silverlight
Being a pimp without silverlight
 
Google Web Toolkits
Google Web ToolkitsGoogle Web Toolkits
Google Web Toolkits
 
CiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForceCiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForce
 
Java Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXJava Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAX
 
Esposito Ajax Remote
Esposito Ajax RemoteEsposito Ajax Remote
Esposito Ajax Remote
 
Ajax3
Ajax3Ajax3
Ajax3
 
Direct Web Remoting : DWR
Direct Web Remoting : DWRDirect Web Remoting : DWR
Direct Web Remoting : DWR
 

Recently uploaded

Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
Tatiana Al-Chueyr
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
Kief Morris
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
SynapseIndia
 
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
Liveplex
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
Adam Dunkels
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
Safe Software
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
ScyllaDB
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
KAMAL CHOUDHARY
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Chris Swan
 
Observability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetryObservability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetry
Eric D. Schabell
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
BookNet Canada
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
Matthew Sinclair
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
Stephanie Beckett
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
shanthidl1
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions
 
Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
BookNet Canada
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
RaminGhanbari2
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
Larry Smarr
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
Matthew Sinclair
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Bert Blevins
 

Recently uploaded (20)

Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
 
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
 
Observability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetryObservability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetry
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
 
Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
 

JSF Component Behaviors

  • 1. JSF Component Behaviors Andy Schwartz | Oracle Corporation
  • 2. Agenda History Behavior API: Basics A Simple Sample Behavior Behavior API: Advanced Topics Auto Suggest Sample Behavior Future
  • 4. First First, there was Ajax. And it was good. But it required JavaScript code.
  • 5. Sample: Ajax JavaScript API <h:outputScript name=&quot;jsf.js&quot; library=&quot;javax.faces&quot;/> <h:commandButton value=&quot;Do something Ajaxy&quot; onclick=&quot;jsf.ajax.request(this, event, {render: 'out'}); return false;&quot;/> <h:outputText id=”out” value=”Update me!”/>
  • 6. Ajax JavaScript API The Good Standard Flexible The Bad Verbose Error-prone
  • 7. Time for a declarative Ajax API
  • 8. Declarative Ajax, Take 1 New Components?
  • 9. Sample: New Components? <h:commandButton value=“Not Ajax”/> <a:commandButton value=“Ajax!”/>
  • 10. New Components? The Good Simple Familiar The Bad Component explosion Next feature: more components?
  • 11. Declarative Ajax, Take 2 New Attributes?
  • 12. Sample: New Attributes? <h:commandButton ajax=“true”/>
  • 13. New Attributes? The Good Simple No new components The Bad Attribute explosion Next feature: more attributes?
  • 14. Declarative Ajax, Take 3 Attached Objects? Remember those?
  • 15. What Are Attached Objects? Attached objects enhance components with functionality not anticipated by the original component author.
  • 16. Some Existing Attached Objects Converters f:convertNumber f:convertDateTime Validators f:validateLength f:validateBean f:validateRegex
  • 17. Ajax Attached Object? <!-- We already do this…--> <h:inputText> <f:convertNumber/> </h:inputText> <!-- Why not this? --> <h:commandButton> <f:ajax/> </h:commandButton>
  • 19. Ajax Attached Object The Good Easy to use Familiar pattern No attribute explosion No component explosion Some precedent exists Think a4j:support as attached object instead of component The Bad More verbose than component/attribute alternatives Somebody needs to design the API!
  • 21. API Requirements Loose Coupling Surprise?
  • 22. Loose Coupling Components should not contain Ajax-specific code Objects contribute scripts to component markup Components know where to insert attached scripts Objects may be attached to arbitrary components Objects may implement arbitrary behaviors Not limited to Ajax
  • 23. Two New Contracts ClientBehavior ClientBehaviorHolder
  • 24. ClientBehavior Contract String getScript(ClientBehaviorContext)
  • 25. ClientBehavior Scripts What can a ClientBehavior script do?
  • 26. Say Hello // Some people *always* start with “Hello, World!” public String getScript(ClientBehaviorContext c) { return “alert(‘Hello, World!’)”; }
  • 27. Ajax // Slightly more interesting public String getScript(ClientBehaviorContext c) { return “jsf.ajax.request(this, event)”; }
  • 28. What Else? Client-side validation DOM manipulation Tooltips, hover content Disclosures Logging Confirmation Key handling Auto-suggest
  • 29. Who Calls getScript()? Components/Renderers call getScript() during rendering and insert scripts into the generated markup.
  • 30. Standard ClientBehaviors Just one for now Java API: AjaxBehavior Tag API: <f:ajax>
  • 31. Attaching ClientBehaviors Remember EditableValueHolder?
  • 32. ClientBehaviorHolder Contract void addClientBehavior( String eventName, ClientBehavior behavior)
  • 33. What Events? Components define available events/attach points Behavior events can correspond to DOM events Events can also be “logical” (component-level) Some obvious events: h:commandButton: click h:inputText: change Some less obvious events h:commandButton: focus, blur h:inputText: keyup, keydown, keypress h:panelGroup: mouseover, mouseout foo: bar
  • 35. Usage <h:commandButton> <f:ajax event=“focus”/> </h:commandButton> <h:inputText> <f:ajax event=“keypress”/> </h:inputText> <h:panelGroup> <foo:showHoverContent event=“mouseover”/> </h:panelGroup>
  • 36. Logical Events Some components expose logical events Command: action (not DOM click) Input: valueChange (not DOM change) Client-side event abstraction over DOM Hides arbitrary DOM implementations Matches server-side abstraction Helpful in wrapping scenarios
  • 37. Logical Events <!-- &quot;click&quot; event doesn't work if we want to target command components exclusively. --> <f:ajax event=&quot;click&quot;> <h:panelGroup> <h:commandButton/> <h:inputText/> <h:commandButton/> </h:panelGroup> </f:ajax>
  • 38. Logical Events <!-- Use logical &quot;action&quot; event instead. --> <f:ajax event=&quot;action&quot;> <h:panelGroup> <h:commandButton/> <h:inputText/> <h:commandButton/> </h:panelGroup> </f:ajax>
  • 39. Default Events What happens if you do not specify an event?
  • 40. ClientBehaviorHolder Contract String getDefaultEventName();
  • 41. Default Event Usage <h:commandButton> <!-- Default event: action --> <f:ajax/> </h:commandButton> <h:inputText> <!-- Default event: value change --> <f:ajax/> </h:inputText> <h:panelGroup> <!-- No default event defined: Boom! --> <f:ajax/> </h:panelGroup>
  • 42. More Event Fun: Chaining <h:commandButton> <foo:confirm/> <f:ajax/> </h:commandButton>
  • 43. More Event Fun: Multiple Events <h:commandButton> <f:ajax/> <foo:showHoverContent event=“mouseover”/> <foo:hideHoverContent event=“mouseout”/> </h:commandButton>
  • 44. Standard ClientBehaviorHolders All standard components implement ClientBehaviorHolder.
  • 45. A Simple Sample Behavior
  • 46. Our Simple Sample Behavior Confirm Behavior
  • 47. Step 1: Implement the Behavior Extend ClientBehaviorBase Implement getScript()
  • 48. ConfirmBehavior public class ConfirmBehavior extends ClientBehaviorBase { @Override public String getScript( ClientBehaviorContext behaviorContext) { return &quot;return confirm('Are you sure?')&quot;; } }
  • 49. Step 2: Register the Behavior Two ways to do this Old School: faces-config.xml New School: annotations Both call Application.addBehavior(String, Class) Associates Behavior class with a behavior id. Enables Application.createBehavior(String)
  • 50. Register Behavior: Old School <faces-config> <behavior> <behavior-id>jsf2foo.behavior.Confirm</behavior-id> <behavior-class> org.jsf2foo.behavior.confirm.ConfirmBehavior </behavior-class> </behavior> </faces-config>
  • 51. Register Behavior: New School @FacesBehavior(&quot;jsf2foo.behavior.Confirm”) public class ConfirmBehavior …
  • 52. Step 3: Define the Tag Registering Behavior enables Application.createBehavior(String) Still need a tag to expose to page authors Facelets tags are defined in taglib.xml file taglib.xml files live in WEB-INF or META-INF
  • 53. Jsf2foo.taglib.xml <facelet-taglib> <namespace>http://jsf2foo.org/behavior</namespace> <tag> <tag-name>confirm</tag-name> <behavior> <behavior-id>jsf2foo.behavior.Confirm</behavior-id> </behavior> </tag> </facelet-taglib>
  • 54. Step 4: Ready To Go The Behavior is now available for use under namespace specified in the taglib.xml file
  • 55. ConfirmBehavior Usage <html … xmlns:j2f=&quot;http://jsf2foo.org/behavior&quot;> … <h:commandButton value=&quot;Submit&quot;> <j2f:confirm/> </h:commandButton>
  • 56. What Gets Rendered? <input type=&quot;submit&quot; value=&quot;Submit&quot; onclick=&quot;return confirm('Are you sure?')&quot; />
  • 58. ClientBehaviorContext Provides context for getScript() FacesContext Component Event name Parameters Source id
  • 59. ClientBehaviorHints Enum returned by ClientBehavior.getHints() Provides hints to component/renderer Currently only one hint: SUBMITTING
  • 60. ClientBehavior Decoding ClientBehaviors also participate in decoding ClientBehavior.decode() Allows scripts to communicate back to server What can ClientBehaviors do in decode? Queue an event Send a response
  • 61. Server-Side Events ClientBehaviors can queue events Events are queued on parent component Leverage existing FacesEvent lifecycle BehaviorEvent extends FacesEvent BehaviorListener extends FacesListener
  • 62. AjaxBehavior Event Sample <!-- Don't need a special event here --> <h:commandButton actionListener=&quot;#{foo.doIt}&quot;> <f:ajax/> </h:commandButton> <!-- But comes in handy here --> <h:panelGroup> <foo:showHoverContent event=“mouseover” listener=&quot;#{foo.hover}&quot;/> </h:panelGroup>
  • 63. Behavior API So far we've been focusing on ClientBehavior API There is more to the story: Behavior API ClientBehavior extends Behavior Base class for other possible non-client Behaviors Phased behavior Behavior defines event handling contract broadcast(BehaviorEvent)
  • 64. ClientBehaviorRenderer ClientBehaviors can delegate to RenderKit-specific ClientBehaviorRenderers Similar to UIComponent/Renderer split Allows RenderKit-specific script generation and decoding Allows frameworks to plug in framework-specific functionality without replacing ClientBehavior implementations.
  • 66. Goals/Assumptions Provide Google Auto Suggest-like functionality Behavior attached to arbitrary input components Assumption: Access to specific client events Assumption: DOM input element
  • 67. Contract We need an API for retrieving suggestions.
  • 68. Contract: Suggester public interface Suggester { public Collection<String> suggest(String prefix); }
  • 69. Contract We need a tag API.
  • 70. Contract: Tag <!-- Attach to standard inputText --> <h:inputText id=&quot;search&quot;> <j2f:suggest suggester=&quot;#{suggester}&quot;/> </h:inputText> <!-- Attach to Trinidad inputText too --> <tr:inputText id=&quot;search&quot;> <j2f:suggest suggester=&quot;#{suggester}&quot;/> </tr:inputText>
  • 71. Event Handling Behavior Key events: Retrieve suggestions, show list Up/down arrow: Navigate suggestions list Enter: Accept suggestion Escape: Hide suggestions list Blur: Hide suggestions list
  • 72. Handler Implementation Typically the default BehaviorHandler is sufficient We have special requirements Single Behavior instance, multiple events Solution: Need a custom BehaviorHandler
  • 73. SuggestBehavior: getScript() Typically ClientBehaviors generate a single script We have special requirements SuggestBehavior generates event-specific scripts Solution: ClientBehaviorContext.getEventName()
  • 74. Requesting Suggestions Key up activity triggers suggestions list Suggestions retrieved from server Target the SuggestBehavior instance Solution: Use jsf.ajax.request to implement fetch
  • 75. Requesting Suggestions Key up activity triggers suggestions list Suggestions retrieved from server Target the SuggestBehavior instance Solution: Use jsf.ajax.request to implement fetch
  • 76. Selecting a Suggestion Handle key up for arrow key navigation Enter key accepts current selection However, enter key also submits form Solution: cancel default enter key behavior
  • 77. Resource Dependencies SuggestBehavior requires JavaScript, CSS Dependencies should be transparent to application Solution: Use new ResourceHandler mechanism
  • 78. What's Left? State saving Error handling Request collapsing Autocomplete
  • 80. Ideas Targeted postback paylaods Ajax over GET Out of band Ajax Improved Ajax queueing/event collapsing Pre-execute behavior processing Alternate behavior contracts Fallback behavior Attached object value expression support Attached object state saving Initialization/DOM modifiers