This document provides an overview of JavaServer Faces (JSF) and the RichFaces framework for building enterprise applications with Ajax functionality. It discusses key features of JSF 2 such as Facelets, composite components, and the basic <f:ajax> tag. It then describes RichFaces 4 as a lightweight JSF framework that extends JSF 2 with rich UI components, an Ajax tag library (<a4j:>), and features like client-side validation, polling, and pushing. The document provides examples of how to use various RichFaces tags to send Ajax requests and control partial rendering.
25+ Reasons to use OmniFaces in JSF applicationsAnghel Leonard
OmniFaces is an utility library that can help you to improve your JSF development experience. This presentation reveals 25+ real cases in which OmniFaces can make JSF life easier.
Mastering OmniFaces - A Problem to Solution ApproachAnghel Leonard
OmniFaces is a utility library for JSF and a comprehensive compendium of programming techniques, design patterns and recipes for JSF developers. Mastering OmniFaces is targeted towards JSF page authors/developers that wish to use OmniFaces in their projects and JSF developers interested in going deep into the JSF API ʺbowelsʺ in order to become real JSF masters.
This presentation is a brief overview of the JSF custom validators provided by OmniFaces (e.g. cross-field validators). Some OmniFaces validators fixes a suite of gaps of the JSF standard validators, while others are totally new.
Using the Tooling API to Generate Apex SOAP Web Service ClientsSalesforce Developers
Join us as we review the capabilities of the existing WSDL-to-Apex code generation feature, and explain how we built a tool to provide expanded features using the Tooling API. The resulting tool has greater support for more WSDL features, generates test cases and the associated mocks to maximize code coverage, and optionally includes HttpRequest versions of the callouts.
25+ Reasons to use OmniFaces in JSF applicationsAnghel Leonard
OmniFaces is an utility library that can help you to improve your JSF development experience. This presentation reveals 25+ real cases in which OmniFaces can make JSF life easier.
Mastering OmniFaces - A Problem to Solution ApproachAnghel Leonard
OmniFaces is a utility library for JSF and a comprehensive compendium of programming techniques, design patterns and recipes for JSF developers. Mastering OmniFaces is targeted towards JSF page authors/developers that wish to use OmniFaces in their projects and JSF developers interested in going deep into the JSF API ʺbowelsʺ in order to become real JSF masters.
This presentation is a brief overview of the JSF custom validators provided by OmniFaces (e.g. cross-field validators). Some OmniFaces validators fixes a suite of gaps of the JSF standard validators, while others are totally new.
Using the Tooling API to Generate Apex SOAP Web Service ClientsSalesforce Developers
Join us as we review the capabilities of the existing WSDL-to-Apex code generation feature, and explain how we built a tool to provide expanded features using the Tooling API. The resulting tool has greater support for more WSDL features, generates test cases and the associated mocks to maximize code coverage, and optionally includes HttpRequest versions of the callouts.
A Peek At The Future: Going Beyond JavaServer Faces 2.0 With RichFaces 4balunasj
Jay Balunas and Alexander Smirnov give an overview of JSF2, and preview of the future for JSF through the RichFaces project. This presentation was given at the 2010 JavaOne conference.
Going Above JSF 2.0 with RichFaces and SeamLincoln III
In this session, Jay Balunas and Lincoln Baxter, III will provide in-depth coverage of several of the new JSF 2.0 features, focusing on the sufficiency and shortcomings of each feature. They will also review how RichFaces 4 and Seam 3 are enhancing JSF to solve these shortcomings by prototyping functionality for the future of JSF.
The JSF 2.0 specification (JSR-314) addresses a substantial number of long standing pain points that JSF users have come to accept as a hard-knock life. At last, JSF is a true contender amongst Web frameworks. However, JSF 2.0 is not the end of the story as, thankfully, the expert group has once again left the door open for projects like RichFaces and Seam to extend, prototype, and improve the specification. RichFaces leads the industry with Ajax support for JSF1.2, played a significant role in the development of JSF 2.0, and continues to lead and prototype the future of the JSF standard for the RIA ecosystem; Seam provides leading support for the Conversation Scope, Flash Scope, Internationalized Messages, Managed Transactions, and Conversion/Validation - including cross-field validation.
While this session effectively provides an overview of the JSF 2.0 specification, the underlying goal of this session is to serve as an outreach to identify outstanding recommendations for making the framework more pleasant and productive to use. In addition, this session will illustrate how members of the JSF community can get a sneak peek into the future by using the RichFaces and/or Seam projects. Whether you are a new JSF/RichFaces/Seam user who wants to find out more about the latest developments in the specification, or an old hat with an issue or two on your mind, this session has something to offer you . Attendees are encouraged to bring their own concerns and suggestions to this session.
PrimeFaces, JavaServer Faces icin gelistirllen ve dunya capinda populer olan zengin bir arayuz kutuphanesidir. Bu sunumda PrimeFaces Bilesenleri, Mobil, Ajax Push, Tema Destegi gibi modullerin yani sira PrimeFaces ekibinin gelistirdigi yeni jQuery javascript kutuphanesi PrimeUI'da tanitilmaktadir.
Session highlighting and demonstrating approaches to common challenges in modern portlet development. Topics include AJAX in JSR-168 and JSR-286 portlets, CSS and Javascript toolkits, security, and optimization of front-end resources. This session was presented at the Jasig Spring 2010 conference in San Diego, CA by Jennifer Bourey.
Similar to What You Need To Build Cool Enterprise Applications With JSF (20)
Wolters Kluwer Tech. Conference: Disrupting Mobile DevelopmentMax Katz
Most mobile apps today are built using traditional desktop tools. These tools are complex, need to be downloaded, installed, frameworks configured, and lack real-time collaboration. To build mobile apps fast, to stay ahead, and innovate in the enterprise, developers need new tools to create mobile apps. The new tools are running entirely in the cloud, offer real time collaboration, sharing, and connections to cloud APIs. In this live coding session attendees will learn about Appery.io platform, and how to build a mobile app connected cloud APIs. Creating re-usable API plug-ins will be shown as well. Attendees will be able to test the app on their phones as its being built.
Building Mobile Apps With jQuery For Any Device In The Cloud Max Katz
Slides from hands-on tutorial on building mobile apps with jQuery Mobile in the cloud using http://gotiggr.com . We built a Twitter Search mobile app. Want to build the same app? Go to http://help.gotiggr.com.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
The Metaverse and AI: how can decision-makers harness the Metaverse for their...Jen Stirrup
The Metaverse is popularized in science fiction, and now it is becoming closer to being a part of our daily lives through the use of social media and shopping companies. How can businesses survive in a world where Artificial Intelligence is becoming the present as well as the future of technology, and how does the Metaverse fit into business strategy when futurist ideas are developing into reality at accelerated rates? How do we do this when our data isn't up to scratch? How can we move towards success with our data so we are set up for the Metaverse when it arrives?
How can you help your company evolve, adapt, and succeed using Artificial Intelligence and the Metaverse to stay ahead of the competition? What are the potential issues, complications, and benefits that these technologies could bring to us and our organizations? In this session, Jen Stirrup will explain how to start thinking about these technologies as an organisation.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofsAlex Pruden
This paper presents Reef, a system for generating publicly verifiable succinct non-interactive zero-knowledge proofs that a committed document matches or does not match a regular expression. We describe applications such as proving the strength of passwords, the provenance of email despite redactions, the validity of oblivious DNS queries, and the existence of mutations in DNA. Reef supports the Perl Compatible Regular Expression syntax, including wildcards, alternation, ranges, capture groups, Kleene star, negations, and lookarounds. Reef introduces a new type of automata, Skipping Alternating Finite Automata (SAFA), that skips irrelevant parts of a document when producing proofs without undermining soundness, and instantiates SAFA with a lookup argument. Our experimental evaluation confirms that Reef can generate proofs for documents with 32M characters; the proofs are small and cheap to verify (under a second).
Paper: https://eprint.iacr.org/2023/1886
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
What You Need To Build Cool Enterprise Applications With JSF
1. What You Need for Building
Cool Enterprise Applications
with JSF
Max Katz
Exadel
Oct. 4, 2011
2. >max@exadel.com
Max Katz >@maxkatz
>mkblog.exadel.com
Senior Systems Engineer
JSF, RichFaces, Java EE consulting,
and training
Developer Relations for Tiggr Mobile
Apps Builder (http://gotiggr.com)
3. Exadel is a global software
engineering company
Founded in 1998, headquarters in
San Francisco Bay Area
7 Development offices in Europe
[Munich, Moscow, Ekaterinburg, Minsk, Homeyl, Kharkov, Donetsk]
400+ employees
4. The Plan Is Simple
1) Ajax features in JSF 2
2) The new RichFaces 4 – or
what you need to build cool
enterprise applications with
JSF
5. JavaServer Faces™ (JSF) is
the standard component-
based user interface (UI)
framework for the
Java EE (5 & 6) platform
JSF 1.2 Java EE 5
JSF 2 Java EE 6
6. JSF 2 is a major upgrade
over JSF 1.x
Many features, ideas taken
from projects such as Seam,
RichFaces, and others
7. JSF 2 new features
● Facelets ● New scopes
● Composite ◦ Flash, View,
components custom
● Implicit ● Configuration
navigation via annotations
● GET ● Bean Validation
support
support
◦ h:link, h:button
● Basic Ajax
● Resource loading
8. JSF 2 <f:ajax>
● Very basic Ajax functionality
● Greatly
inspired by RichFaces 3
<a4j:support> tag
● Ajax in JSF in 3 easy steps:
1. Sending an Ajax request
2.Partial view processing
3.Partial view rendering
11. Attribute Value
Important
Event on which to fire the
<f:ajax> event
Ajax request
attributes @all
@this (default)
@form
execute
@none
id's
EL
@all
@this
@form
render
@none (default)
id's
EL
12. That's good, but that's all you get.
Where do you get rich components
and more?
A rich component framework is
still(?) needed to build real-world
Ajax applications.
13. RichFaces 4 is a lightweight,
open source framework for
JSF 2
14. RichFaces 4 – rich JSF framework
UI components
a4j:* tag library (core)
rich:* tag library (UI)
Components' JavaScript API
Skins
Client-side validation (Bean Validation
based)
CDK – Component Development Kit
15. 100% built on top of JSF2,
just extends functionality in
JSF 2
17. RichFaces 4 is a lot faster, consistent,
and optimized
All components are reviewed for consistency,
usability
Redesigned following semantic HTML
principles
Server-side and client-side performance
optimization
Strict code clean-up and review
25. Easy to start. Zero-configuration,
just drop RichFaces into the
application
26. RichFaces versions
Version JSF 1.1 JSF 1.2 JSF 2
RichFaces 3.1.x •
RichFaces 3.3.3* • •
RichFaces 4 •
* Note: RichFaces 3.3.3 has basic JSF 2 support
27. RichFaces history
2005: started by Alexander Smirnov
2005-2007: Developed by Exadel
Ajax4jsf - open source, free
RichFaces - commercial
2007: JBoss takes over
Exadel team continues to develop
the framework, project is known as
RichFaces
28. Let's see what cool
components, and features
you get with RichFaces...
29. RichFaces <a4j:ajax>
● 100% based on standard <f:ajax>
● Just replace f: with a4j: and get
exactly the same functionality
● But, you get extra features...
<h:commandButton>
<h:commandButton>
<f:ajax execute="@form" render="output"/>
<f:ajax execute="@form" render="output"/>
</h:commandButton>
</h:commandButton>
<h:commandButton>
<h:commandButton>
<a4j:ajax execute="@form" render="output"/>
<a4j:ajax execute="@form" render="output"/>
</h:commandButton>
</h:commandButton>
30. <a4j:ajax> attributes
Feature/Attribute Description
JavaScript to execute before Ajax
onbegin
request
JavaScript to execute after response
onbeforedomupdate
comes back but before DOM update
oncomplete JavaScript to execute after DOM update
Allows to skip JSF phases when
bypassUpdates
validating
limitRender Turns off all auto-rendered panels
status Status to display during Ajax request
Ajax queue Advanced RichFaces client queue
32. <a4j:commandButton/Link> –
button and link with built-in Ajax
behavior
<a4j:commandButton value="Save"
<a4j:commandButton value="Save"
action="#{bean.action}"
action="#{bean.action}"
render="output" />
render="output" />
<a4j:commandLink value="Save"
<a4j:commandLink value="Save"
action="#{bean.action}"
action="#{bean.action}"
render="output" />
render="output" />
33. When using standard JSF button:
<h:form>
<h:form>
<h:inputText>
<h:inputText>
<h:selectOneMenu>
Need to set
<h:selectOneMenu>
<h:commandButton>
<h:commandButton> execute=”@form”
<f:ajax execute="@form"/>
<f:ajax execute="@form"/> (or execute=”id1 id2”)
</h:commandButton>
</h:commandButton>
<h:form>
<h:form>
When using RichFaces button:
<h:form>
<h:form> RichFaces default
<h:inputText>
<h:inputText>
<h:selectOneMenu>
value for
<h:selectOneMenu>
<a4j:commandButton/>
<a4j:commandButton/>
button/link
<h:form>
<h:form> execute=”@form”
35. If you had to pick just one Ajax
control, you would want
<a4j:jsFunction>
<h:commandButton action="#{bean.change}">
<h:commandButton action="#{bean.change}">
<a4j:ajax render="id"/>
<a4j:ajax render="id"/>
</h:commandButton>
</h:commandButton>
Is the same as:
<h:commandButton onclick="sendAjax();"/>
<h:commandButton onclick="sendAjax();"/>
<a4j:jsFunction name="sendAjax"
<a4j:jsFunction name="sendAjax"
action="#{bean.change}" render="id"/>
action="#{bean.change}" render="id"/>
37. <a4j:push>
● Server-side events are pushed to
client using Comet or WebSockets.
● Implemented using Atmosphere
● Providesexcellent integration with
EE containers, and advanced
messaging services
<a4j:push address="topic@chat"
<a4j:push address="topic@chat"
ondataavailable="alert(event.rf.data)" />
ondataavailable="alert(event.rf.data)" />
41. render=”#{bean.renderList}”
JSF RichFaces
1) Ajax request sent 1) Ajax request sent
2) Component id's to be 2) Component id's to
rendered resolved be rendered
3) Component id's are resolved
rendered into the page 3) Component id's
4) 2nd Ajax request is sent. are rendered
In this request the
components (resolved in
step 2 are sent with
request) will be rendered
45. Even more advanced features
and tags
● JavaScript callbacks
● Queue
● <a4j:status>
● <a4j:param>
● <a4j:log>
46. Easily use JavaScript callbacks
during Ajax request
<a4j:commandLink value="Link"
<a4j:commandLink value="Link"
onbegin="ajaxOnBegin()"
onbegin="ajaxOnBegin()"
onbeforedomupdate="ajaxOnBeforeDomUpdate()"
onbeforedomupdate="ajaxOnBeforeDomUpdate()"
oncomplete="ajaxOnComplete()">
oncomplete="ajaxOnComplete()">
</a4j:commandLink>
</a4j:commandLink>
47. JSF 2 queue
● JSF2 has very basic queue
functionality
● Events are queued and fired one at a
time
● Only one request is processed on the
server at a time
48. <a4j:queue> – “combining” events
from the same component
While a request is executing
on the server, all requests
from button A or button
B will be combined
(merged) if the last event in
the queue is of the same
type.
<a4j:queue />
<a4j:queue />
...
...
<a4j:commandButton id="buttonA" value="Button A"/>
<a4j:commandButton id="buttonA" value="Button A"/>
<a4j:commandButton id="buttonB" value="Button B"/>
<a4j:commandButton id="buttonB" value="Button B"/>
49. <a4j:queue> – “combining” events
from different components
While a request is executing
on the server, all requests
from button A or button
B will be combined
(merged).
<a4j:queue />
<a4j:queue />
<a4j:commandButton id="buttonA" value="Button A">
<a4j:commandButton id="buttonA" value="Button A">
<a4j:attachdQueue requestGroupingId="ajaxGroup"/>
<a4j:attachdQueue requestGroupingId="ajaxGroup"/>
</a4j:commandButton>
</a4j:commandButton>
<a4j:commandButton id="buttonB" value="Button B">
<a4j:commandButton id="buttonB" value="Button B">
<a4j:attachdQueue requestGroupingId="ajaxGroup"/>
<a4j:attachdQueue requestGroupingId="ajaxGroup"/>
</a4j:commandButton>
</a4j:commandButton>
50. <a4j:queue> – setting request delay
allows “waiting” for requests from
same component in order to merge
events
<a4j:queue requestDelay="1000"/>
<a4j:queue requestDelay="1000"/>
<a4j:commandButton id="buttonA" value="Button A">
<a4j:commandButton id="buttonA" value="Button A">
<a4j:attachdQueue requestDelay="2000"/>
<a4j:attachdQueue requestDelay="2000"/>
</a4j:commandButton>
</a4j:commandButton>
<a4j:commandButton id="buttonB" value="Button B"/>
<a4j:commandButton id="buttonB" value="Button B"/>
53. <a4j:param> - like <f:param>, but
simpler as it also assigns the value to
a bean property automatically
<a4j:commandButton value="Save">
<a4j:commandButton value="Save">
<a4j:param value="1009" assignTo="#{bean.product}"/>
<a4j:param value="1009" assignTo="#{bean.product}"/>
</a4j:commandButton>
</a4j:commandButton>
public class Bean {
public class Bean {
private String product;
private String product;
public void setProduct (String product) {...}
public void setProduct (String product) {...}
}}
54. Another great feature is that
<a4j:param> value can contain any
JavaScript expression or JavaScript
function, when noEscape="true"
<a4j:param name="width"
<a4j:param name="width"
value="(jQuery(window).width()/2)"
value="(jQuery(window).width()/2)"
assignTo="#{bean.screenWidth}"
assignTo="#{bean.screenWidth}"
noEscape="true" />
noEscape="true" />
59. <rich:popupPanel> can be modal and
non-modal
<rich:popupPanel modal="false">
<f:facet name="header">
Edit User
</f:facet>
...
...
</rich:popupPanel>
64. RichFaces data iteration components
support partial updates
render="@column"
render="@header"
render="@body"
render="@footer"
render="cellId"
To render from outside the table:
render="tableId@header"
render="tableId@body"
render="tableId@footer"
65. Deciding what rows/cell to update in
run-time
render="tableId:rows(bean.rowsSet)"
render="tableId:rows(bean.rowsSet):cellId"
72. Many RichFaces components
provide client-side JavaScript API
<rich:popupPanel> JavaScript API
Method name Description
Return the top co-ordinate for the position of
getTop()
the pop-up panel.
Return the left co-ordinate for the position of
getLeft()
the pop-up panel.
Move the pop-up panel to the co-ordinates
moveTo(top,left)
specified with the top and left parameters.
Resize the pop-up panel to the size specified
resize(width,height)
with the width and height parameters.
show() Show the pop-up panel.
hide() Hide the pop-up panel.
77. RichFaces client functions
Function Description
rich:client(id) Returns component client id
rich:element(id) Returns DOM element
Returns RichFaces client component
rich:component(id)
instance to call JS API method
rich:isUserInRole(role) Returns if the user has specified role
Returns component instance for given
rich:findComponent(id)
short id
78. Standard Java EE security with
#{rich:isUserInRole(role)} function
<rich:panel header="Admin panel"
<rich:panel header="Admin panel"
rendered="#{rich:isUserInRole('admin')}">
rendered="#{rich:isUserInRole('admin')}">
Very sensitive information
Very sensitive information
</rich:panel>
</rich:panel>
<rich:panel header="User panel">
<rich:panel header="User panel">
General information
General information
</rich:panel>
</rich:panel>
● Calls facesContext.getExternalContext.getUserInRole(role)
● What's good is that security roles can be defined anywhere
80. Bean Validation (JSR 303)
JSF 2 has support for Bean Validation
(validation done on server)
Bean:
public class Bean {
public class Bean {
@Pattern(regexp="...")
@Pattern(regexp="...")
private String email;
private String email;
}}
JSF page:
<h:inputText id="email" value="#{bean.email}">
<h:inputText id="email" value="#{bean.email}">
<a4j:ajax event="blur"/>
<a4j:ajax event="blur"/>
</h:inputText>
</h:inputText>
<rich:message for="email"/>
<rich:message for="email"/>
81. Client-Validation Based on Bean
Validation
Validation is performed on the client. If no client
implementation available, validation automatically falls
back to standard, server validation
Bean:
public class Bean {
public class Bean {
@Pattern(regexp="...")
@Pattern(regexp="...")
private String email;
private String email;
}}
JSF page:
<h:inputText id="email" value="#{bean.email}">
<h:inputText id="email" value="#{bean.email}">
<rich:validator />
<rich:validator />
</h:inputText>
</h:inputText>
<rich:message for="email"/>
<rich:message for="email"/>
91. Skins
● Lightweight extension on top of CSS
● Change
look and feel of all rich
component with a few minor changes
● Can
be applied to standard JSF and
HTML tags as well
97. Skinning standard JSF tags and
HTML tags
Apply to each control:
<h:button style="background-color:
<h:button style="background-color:
'#{richSkin.tableBackgroundColor}'"/>
'#{richSkin.tableBackgroundColor}'"/>
98. Skinning standard JSF tags and
HTML tags automatically
Apply to all standard controls (JSF and HTML):
<context-param>
<context-param>
<param-name>
<param-name>
org.richfaces.enableControlSkinning
org.richfaces.enableControlSkinning
</param-name>
</param-name>
<param-value>true</param-value>
<param-value>true</param-value>
</context-param>
</context-param>
99. Skinning standard JSF tags and
HTML tags only when special CSS
class is applied to parent container
<context-param>
<context-param>
<param-name>
<param-name>
org.richfaces.enableControlSkinningClasses
org.richfaces.enableControlSkinningClasses
</param-name>
</param-name>
<param-value>true</param-value>
<param-value>true</param-value>
</context-param>
</context-param>
<div class="rfs-ctn">
<div class="rfs-ctn">
<h:outputText />
<h:outputText />
<h:inputText />
<h:inputText />
<h:commandButton />
<h:commandButton />
</div>
</div>
100. Where can I try the new
RichFaces 4?
http://richfaces.org/showcase
101. RichFaces 4.1 (Late 2011)
Mobile support
New components:
Pick list
Ordering list
Rich text editor
102. How can we help with RichFaces
● Web development
with RichFaces
Training Days
● Version 3 to 4 migration JSF 1.2, 2 1-2
● Performance tune-up RichFaces 3, 4 1-2
JSF and RichFaces 2-3
● Custom component RichFaces 3 to 4 1-2
development
● On-site training