CSE446 S OFTWARE Q UALITY M ANAGEMENT Spring 2014 Yazılım ve Uyguluma Geliştirme Yöneticisi Orhan Başar Evren.

Slides:



Advertisements
Similar presentations
JavaScript and AJAX Jonathan Foss University of Warwick
Advertisements

JavaScript and the DOM Les Carr COMP3001 Les Carr COMP3001.
@mnriem#DV14 #MVC MVC 1.0 in JavaEE 8 A long time coming, or like some would say “finally!” Why are we doing it now? Survey input Customer input JavaEE.
JavaScript Forms Form Validation Cookies. What JavaScript can do  Control document appearance and content  Control the browser  Interact with user.
Web applications using JavaServer Faces (JSF) A brief introduction 1JavaServer Faces (JSF)
JBoss Seam: Contextual Components Jason Bechtel
Internet Technologies 1 Master of Information System Management Java Server Faces Model/View/Controller Design Pattern for Web Development Slides.
JavaScript Forms Form Validation Cookies CGI Programs.
UNIT-V The MVC architecture and Struts Framework.
CSE446 S OFTWARE Q UALITY M ANAGEMENT Spring 2014 Yazılım ve Uyguluma Geliştirme Yöneticisi Orhan Başar Evren.
JavaServer Faces: The Fundamentals Compiled from Sun TechDays workshops (JSF Basics, Web-Tier Codecamp: JavaServer Faces, Java Studio Creator; IBM RAD)
11. Java-Based Web: JSP, JSF. 2 Motto: Rule 1: Our client is always right Rule 2: If you think our client is wrong, see Rule 1. - Anonymous.
Java Server Faces Çağatay Çivici Apache MyFaces Team Member
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript forms.
CNIT 133 Interactive Web Pags – JavaScript and AJAX Event and Event Handling.
Pittsburgh Java User Group– Dec Java PureFaces: A JSF Framework Extension.
JDeveloper 10g and JavaServer Faces: High-Performance UIs on the Web Avrom Roy-Faderman Senior Programmer May, 2006.
Copyright ©2005  Department of Computer & Information Science Introducing DHTML & DOM: JavaScript & Forms.
Fluency with Information Technology INFO100 and CSE100 Katherine Deibel Katherine Deibel, Fluency in Information Technology1.
JavaServer Faces Jeff Schmitt October 5, Introduction to JSF Presents a standard framework for building presentation tiers for web applications.
1 Lecture 24 George Koutsogiannakis Spring 2011 CS441 CURRENT TOPICS IN PROGRAMMING LANGUAGES.
JSF road map (NI) Clientside validation Show problems
CSCI 6962: Server-side Design and Programming Introduction to Java Server Faces.
Chapter 8 Script-free pages. Problem with scripting in JSP When you use scripting (declaration, scriplet, expressions) in your JSP, you actually put Java.
Web applications using JavaServer Faces (JSF) A brief introduction 1JavaServer Faces (JSF)
JSF 2.2 Deep Dive Kito D. Mann Principal Consultant.
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License RSF Wiki Introduction to Reasonable Server Faces Aaron Zeckoski
CO1552 Web Application Development HTML Forms, Events and an introduction to JavaScript.
Java Web Development with NetBeans IDE -- Kai Qian Chapter 5 JavaServer Faces (JSF) Technology.
JavaScript - A Web Script Language Fred Durao
JAVA SERVER FACES ADITI RAJORIYA UNI – ar2630. POINTS TO BE DISSCUSED WHAT IS JSF? WHY JSF? ARCHITECTURE JSF VERSIONS UI COMPONENTS JSF STRUCTURE AND.
JSF Framework Java Server Faces Presented by Songkran Totiya (6/10/2014)
Lecture 10 JavaScript: DOM and Dynamic HTML Boriana Koleva Room: C54
Event JavaScript's interaction with HTML is handled through events that occur when the user or browser manipulates a page. When the page loads, that is.
Chính phủ điện tử TS. Phạm Văn Tính Khoa CNTT, ĐH Nông Lâm TP.HCM
Fluency with Information Technology INFO100 and CSE100 Katherine Deibel Katherine Deibel, Fluency in Information Technology1.
Chapter 19 Creating and Processing HTML Forms. How HTML Forms Transmit Data name1=value1&name2=value2...&nameN =valueN GET or POST GET, an HTTP GET request,
Introduction To JavaScript. Putting it Together (page 11) All javascript must go in-between the script tags. All javascript must go in-between the script.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Spring MVC Essentials Getting started.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Event Handling. Objectives Using event handlers Simulating events Using event-related methods.
Preface IIntroduction Objectives I-2 Course Overview I-3 1Oracle Application Development Framework Objectives 1-2 J2EE Platform 1-3 Benefits of the J2EE.
COS 125 DAY 20. Agenda Assignment 8 not corrected yet Assignment 9 posted  Due April 16 New course time line Discussion on Scripts 
HTML FORMS The TEXT Object Presented By: Ankit Gupta.
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Introduction to Reasonable Server Faces Aaron Zeckoski
7. JavaScript Events. 2 Motto: Do you think I can listen all day to such stuff? –Lewis Carroll.
Chapter 12© copyright Janson Industries Java Server Faces ▮ Explain the JSF framework ▮ SDO (service data objects) ▮ Facelets ▮ Pagecode classes.
JavaServer Faces framework Craig McClanahan is presented that created Struts web framework and based on experience gathered designed JavaServer.
Document Object Model Nasrullah. DOM When a page is loaded,browser creates a Document Object Model of the Page.
JavaScript Events.
JavaScript Event Handlers. Introduction An event handler executes a segment of a code based on certain events occurring within the application, such as.
LESSON : EVENTS AND FORM VALIDATION -JAVASCRIPT. EVENTS CLICK.
CIS 228 The Internet 12/6/11 Forms and Validation.
SDJ INFOSOFT PVT. LTD. 2 BROWSERBROWSER JSP JavaBean DB Req Res Application Layer Enterprise server/Data Sources.
CS320 Web and Internet Programming Web Application and MVC Chengyu Sun California State University, Los Angeles.
Interstage BPM v11.2 1Copyright © 2010 FUJITSU LIMITED FORMS.
Struts 2 Development. Topics  Roles in Struts Development  Control Flow  Actions  Struts 2 Views and Target  Struts 2 Custom Tags  Validation 
Managed Beans Mimi Opkins CECS 493 Fall Separation of Presentation and Logic  A central theme of web application design is the separation of presentation.
Introduction to Java Server Faces (covered topics) ● Reasons to use „Java Server Faces“ ● JSF application structure ● JSF component model ● JSF managed.
Intro to JavaServer Faces Mimi Opkins CECS 493 Fall 2016.
JSF – A Simple Example Mimi Opkins CECS 493 Fall 2016.
Event Handling Mimi Opkins CECS 493 Fall 2016.
Structure of a web application
Internationalization
Chapter 44 JavaServer Face
Chapter 39 JavaServer Face
JavaServer Faces: The Fundamentals
JavaServer Faces: It is a server side component based user interface framework. It is used to develop web applications. It provides a well-defined programming.
Presentation transcript:

CSE446 S OFTWARE Q UALITY M ANAGEMENT Spring 2014 Yazılım ve Uyguluma Geliştirme Yöneticisi Orhan Başar Evren

Today’s Overview – Quick Review of HTTP and Servlets – JSF – (Part 2) Managed Beans Navigation Resource Bundles Common tags UIComponents CSE446 Software Quality Management Spring 2014 – Orhan Başar Evren - Netaş

JSF – Managed Beans – Managed bean is a regular java bean managed by JSF framework – It is the “Model” of user interface component – JSF 1.2 : Registered using xml file, such as faces-config.xml – JSF 2.0 registered easily annotation – JSF 2.2 allows to be registered by CDI annotation CSE446 Software Quality Management Spring 2014 – Orhan Başar Evren - Netaş

JSF – Managed annotation has two optional attributes : name : reference name of the bean. Default value: the name of the class eager : flag to specify if the application scoped bean will be initialized on startup or on first request Default value: eager=true) CSE446 Software Quality Management Spring 2014 – Orhan Başar Evren - Netaş

JSF – Managed Beans - Scopes : Bean lives as long as the HTTP request-response lives. (default) : Bean lives as long as user is interacting with the same JSF view : Bean lives as long as the HTTP session lives. : Bean lives as long as the web application lives. CSE446 Software Quality Management Spring 2014 – Orhan Başar Evren - Netaş

JSF – Managed annotation is used to inject other managed beans or resources from JSF public class HelloBean private OtherBean other; // need getters and setters etc… } CSE446 Software Quality Management Spring 2014 – Orhan Başar Evren - Netaş

JSF – Page Navigation – Implicit Navigation : Navigate to pages from directly JSF pages or from managed beans – Conditional Navigation Rule: Define the navigation rules with faces-config.xml file. Form based rules If – else rules Redirect (and Forward) CSE446 Software Quality Management Spring 2014 – Orhan Başar Evren - Netaş

JSF – Implicit Navigation OR public String gotoToPage2() { return "page2"; } CSE446 Software Quality Management Spring 2014 – Orhan Başar Evren - Netaş

JSF – Conditional Navigation Rule hello.xhtml #{helloBean.doGreeting} success greeting.xhtml OR #{helloBean.somevalue eq 1} greeting.xhtml CSE446 Software Quality Management Spring 2014 – Orhan Başar Evren - Netaş

JSF – Resource Bundles Resource bundles are used for text manipulation and Internationalization For better maintainability it is always recommended to put all text and messages into properties files. CSE446 Software Quality Management Spring 2014 – Orhan Başar Evren - Netaş

JSF – Resource Bundles Define in faces-config.xml file as following: en tr resources.messages msg CSE446 Software Quality Management Spring 2014 – Orhan Başar Evren - Netaş

JSF – Resource Bundles message_tr.properties text file : greeting = Merhaba greetuser = Merhaba {0} example.with.dot = nokta kullanımına örnek From xhtml page: xmlns:f=" CSE446 Software Quality Management Spring 2014 – Orhan Başar Evren - Netaş

JSF – Resource Bundles Or from managed bean when private ResourceBundle bundle;... String greetmsg = bundle.getString(”greeting”); … CSE446 Software Quality Management Spring 2014 – Orhan Başar Evren - Netaş

JSF – Common Tags Facelet Tags xmlns:ui=" Used for templates: CSE446 Software Quality Management Spring 2014 – Orhan Başar Evren - Netaş

JSF – Common Tags HTML Tags xmlns:h=" Used for HTML output: CSE446 Software Quality Management Spring 2014 – Orhan Başar Evren - Netaş

JSF – Common Tags Core Tags xmlns:f=" Core JSF functionality: CSE446 Software Quality Management Spring 2014 – Orhan Başar Evren - Netaş

JSF – Common Tag Attributes Id : identifier for a component binding: reference to component instance rendered: flag to set rendering styleClass: css class name value: value of the component converter: converter class name required: flag to set requirement CSE446 Software Quality Management Spring 2014 – Orhan Başar Evren - Netaş

JSF – DHTML Event Attributes Allows to make JavaScript calls on specific events onblur: element loses focus onchange : element’s value changes onclick: mouse clicked over the element onfocus : element receives focus onkeypress: key is pressed onsubmit : form is submitted CSE446 Software Quality Management Spring 2014 – Orhan Başar Evren - Netaş

JSF – Tag Examples - ui:composition dialog.xhtml: dialog.taglib.xml: dialog com/components/dialog.xhtml web.xml: javax.faces.FACELETS_LIBRARIES /WEB-INF/dialog.taglib.xml CSE446 Software Quality Management Spring 2014 – Orhan Başar Evren - Netaş

JSF – Tag Examples - ui:composition page.xhtml: <html xmlns=" xmlns:h=" xmlns:ytu=" Output: CSE446 Software Quality Management Spring 2014 – Orhan Başar Evren - Netaş

JSF – UIComponent UIComponent is base class for all user interfaces components in JSF. UIComponent instances are organized into a component tree under a UIViewRoot Can be accessed from FacesContext instance CSE446 Software Quality Management Spring 2014 – Orhan Başar Evren - Netaş

JSF – UIComponent UIComponent is base class for all user interfaces components in JSF. UIComponent instances are organized into a component tree under a UIViewRoot Can be accessed from FacesContext instance UIInput, UICommand, HtmlInputText, and many other… List componenets = FacesContext.getCurrentInstance().getViewRoot().getChildren(); CSE446 Software Quality Management Spring 2014 – Orhan Başar Evren - Netaş