Entries tagged as java server faces
Friday, April 14. 2006
"The JavaServer Faces (JSF) technology provides standard APIs and tag libraries needed by Java developers that build
web-based user interfaces. Craig McClanahan, the author of the Apache Struts framework, co-leads the JSF project at Sun.
This will ensure an easy migration from the popular Apache project to the JSF standard. Like the Struts framework, JSF
defines a set of JSP tags that generate HTML form elements that can be bound to JavaBean properties. From the
application developer's perspective, the two frameworks are similar, but JSF will probably get more support from tool
developers, because it is a Java standard. In the future, all J2EE application servers might actually be required to
support JavaServer Faces. Sun has recently released its Java Web Services Developer Pack 1.2, which includes a
reference implementation (Early Access 4 -- EA4) of the JSF Specification (Version 1.0, Public Review Draft 2). The EA4
version implements new features such as actions, managed beans, and navigation rules. This article focuses on these new
features and shows how to take advantage of JSF in order to build forms, validate user input, and bind user interface
components to JavaBean properties. This article contains a web application made of four main components. A JavaBean
class (PBean.java) acts as a data model, holding some text and its attributes: font, size, color, alignment, etc. A
JSF-based form (edit.jsp) allows users to provide values for the properties of the JavaBean. Another Java class
(PBuilder.java) generates an HTML paragraph with the given text and attributes. Finally, a JSP page (view.jsp) shows the
generated paragraph." ONJava.com -- Using JSFONJava.com -- Using JSF
"Web browsers provide an easy way for sending files to web applications, but the current versions of the Java web
standards (servlets, JSP, and JSF) do not offer any help. Fortunately, there are third-party frameworks, such as Apache
Commons File Upload, Apache MyFaces, and Oracle ADF Faces, that implement this feature, exposing simple APIs and custom
tags. The first half of this article explains how file uploading works, walking you through the source code of MyFaces
and Commons File Upload (the former uses the latter internally). It is helpful to know what happens inside of these open
source frameworks in order to use them efficiently, and to be able to modify them if you have to. In the second half of
the article, you'll find a sample application that lets users upload files using their web browsers." ONJava.com: Upload Files with JSF
and MyFacesONJava.com: Upload
Files with JSF and MyFaces
"When the user clicks a button or a link, chances are good that backend code should be asked to do something, like
adding a report entry to the current report when the Add button is clicked in the sample application. Occasionally,
though, an event affects only the user interface. For instance, clicking a button or changing the value of an input
control may expose additional options or display more information. As an example of user interface changes
triggered either by a button click or a value change, let's add a feature to the sample application, namely an
extendable expense types list. Initially, only the most common expense types are listed, but the user can extend the
list with more uncommon choices." ONJava.com -- Handling Events in JavaServer Faces, Part 2ONJava.com -- Handling Events in JavaServer
Faces, Part 2
"When the user clicks a button or link, changes a value in a field, or makes a selection in a list, the application may
need to react. JSF user interface components signal user actions by firing an event handled by application code that has
registered itself to be notified of the event. It's a model borrowed from traditional GUI frameworks, making it easy to
develop and maintain the code for each specific user action in a separate code module. You can even use multiple event
handling modules for different aspects of the processing, such as one that logs the action and another that acts on
it. On the surface, the JSF model looks the same as the event model used for standalone applications, but there's a
twist: with JSF, the user actions take place in a client (e.g., a browser) that has no permanent connection to the
server, so the delivery of some types of event is delayed until a new connection is established (e.g., when the user
submits a form). To deal with this difference, JSF defines a strict request processing lifecycle, where events are
generated and handled in different phases. In this chapter, we first look at the event model and how it relates to
the request processing lifecycle to understand what's going on. We then implement event handling for parts of the sample
application." ONJava.com -- Handling Events in JavaServer Faces, Part 1ONJava.com -- Handling Events in JavaServer
Faces, Part 1
"JavaServer Faces (JSF) has been dubbed the next big thing in Java web programming. With JSF, you use web components on
your web pages and capture events caused by user actions. In the near future, Java tools will support this technology.
Developing web applications will be similar to the way we write Swing applications today: dragging and dropping controls
and writing event listeners. This article is an introduction to JSF. It highlights the most important aspect of JSF: JSF
applications are event-driven. Also, it offers a sample JSF application that illustrates the event-driven-ness of JSF.
To understand this article, you need to be familiar with servlets, JSP, JavaBeans, and custom tag libraries." ONJava.com -- Introducing
JavaServer FacesONJava.com --
Introducing JavaServer Faces
Thursday, April 13. 2006
"Wie der erste Teil des JSF-Tutorials gezeigt hat, lassen sich mit Java Server Faces gut strukturierte Webanwendungen
erstellen. Konzepte wie der Request-Lebenszyklus, Managed Beans, deklaratives Hinterlegen einer Navigation oder das
Verwenden von Method Bindings und Value Bindings innerhalb der JSF-Seiten erleichtern dem Entwickler von Web-Anwendungen
alltägliche Aufgaben. Der Vorteil liegt klar auf der Hand: Er kann sich auf das Wesentliche - die
Geschäftslogik - konzentrieren. Dieser Teil des Tutorials untersucht, ob dies auch für umfangreichere
Anwendungen und die damit verbundenen komplexeren Anforderungen gilt. Thematisch im Mittelpunkt stehen
Internationalisierung, Validierung und Konvertierung. Außerdem soll ein Blick über den Tellerrand hinaus
zeigen, inwieweit JSF sich mit Spring und Struts - zwei im Java-Umfeld etablierten Welten - integrieren lässt. " iX 5/2006, S. 154: JSF Tutorial IIiX 5/2006, S. 154: JSF Tutorial II
Saturday, April 8. 2006
"Java-basierte Web-Frameworks gibt es seit der Einführung der Servlet- und JSP-APIs wie Sand am Meer. Doch haben
alle eins gemeinsam: Es sind proprietäre Lösungen. Mit der durch Sun im Jahre 2004 als Final Release
veröffentlichten Spezifikation der Java Server Faces existiert zum ersten Mal ein herstellerübergreifender
Standard, den dieses dreiteilige Tutorial vorstellt. [...] Vom Generellen zum Besonderen Das dreiteilige Tutorial vermittelt dem Leser, wie man mit Hilfe der JSF-Technik elegant komponentenbasierte
Webanwendungen entwickelt, diese in den J2EE-Kontext integriert und, durch strikte Trennung von Seitenbeschreibung und
Layout, den Schritt hin zur HTML-freien Seite schafft." iX 4/2006, S. 136: JSF Tutorial IiX 4/2006, S. 136: JSF Tutorial I
Saturday, March 11. 2006
"http://www.jsf-forum.de ist eine Community sowie ein Themenportal zu Java Server Faces (JSF). Verantwortlich
f JSF-forum.deJSF-forum.de
|
Kommentare