Let’s demonstrate some KRAD Action Components Kuali University: Apply Now Lab 3: Actions Lab Objectives Understand how to setup an action that invokes.

Slides:



Advertisements
Similar presentations
JQuery MessageBoard. Lets use jQuery and AJAX in combination with a database to update and retrieve information without refreshing the page. Here we will.
Advertisements

WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
23-Aug-14 HTML/XHTML Forms. 2 What are forms? is just another kind of XHTML/HTML tag Forms are used to create (rather primitive) GUIs on Web pages Usually.
Dynamic Forms Designing Forms – Forms Basics
24-Aug-14 HTML Forms. 2 What are forms? is just another kind of HTML tag HTML forms are used to create (rather primitive) GUIs on Web pages Usually the.
© Anselm SpoerriInfo + Web Tech Course Information Technologies Info + Web Tech Course Anselm Spoerri PhD (MIT) Rutgers University
DT211/3 Internet Application Development JSP: Processing User input.
 Search properties for Buy /Rent  Search using property ID  Search property for Sale  Search property for rent  Special Offers  Other services 
New Offline Password After initial login to the system, the offline version in located by clicking on the red Emergency button.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
Lesson 8 Creating Forms with JavaScript
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
JavaScript Form Validation
PHP : Hypertext Preprocessor
Reading Data in Web Pages tMyn1 Reading Data in Web Pages A very common application of PHP is to have an HTML form gather information from a website's.
Lesson 13: Building Web Forms Introduction to Adobe Dreamweaver CS6 Adobe Certified Associate: Web Communication using Adobe Dreamweaver CS6.
Department of Information Technology e-Michigan Web Development 0 HTML Form Creation in the Vignette Content Management Application.
SUNY Polytechnic Institute CS 490 – Web Design, AJAX, jQueryAngularJS AngularJS is a client-side JavaScript Framework for adding interactivity to HTML.
JavaScript & jQuery the missing manual Chapter 11
PRIOS ARA Limited Agent User Instructions PRIOS ARA Limited Agent User Instructions Professional Repossessors Interactive Operating System.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
Chapter 6: Forms JavaScript - Introductory. Previewing the Product Registration Form.
Goal: Ensure you have a working environment for the project 1 Lab 0: Confirm Working Training Instance Instructions 1) Install a copy of virtualbox (
Server-side Scripting Powering the webs favourite services.
KRAD makes it easy to handle HTML events in your webpage. Kuali University: Apply Now Lab 6: Fun with HTML Events Lab Objectives HTML Events – what are.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Creating Effective School and PTA Websites Sam Farnsworth Utah PTA Technology Specialist
Linking Images to Other Areas within a Blackboard Course Darek Sady.
Making things appear and disappear like a magician Kuali University: Apply Now Lab 4: Progressive Disclosure Lab Objectives  We’ll cover Progressive Disclosures.
® IBM Software Group © 2006 IBM Corporation Programmatically Rendering and Hiding JSF Controls This section describes how to hide and show JSF controls.
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
Multi-Part Requests/ Parent & Child Service Items.
We will complete another date search by entering 2008 to 2010 in the Specify date range option and clicking on Search.
Family Resource Centers in ePlan August 2015 Adding a Budget in ePlan.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
JavaScript, Fourth Edition Chapter 5 Validating Form Data with JavaScript.
CO1552 Web Application Development HTML Forms, Events and an introduction to JavaScript.
Basic Instructions on how to use One Drive and share files. ONE Drive Your LogoYour own footer.
Starting with our inputs, we will add some constraints to enable client-side validation Kuali University: Apply Now Lab 2: Validation and Constraints Lab.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
ITCS373: Internet Technology Lecture 5: More HTML.
JavaScript - A Web Script Language Fred Durao
Why would you want to embed video & audio into the Discussion forum on a wiki?
Java server pages. A JSP file basically contains HTML, but with embedded JSP tags with snippets of Java code inside them. A JSP file basically contains.
Introduction to JavaScript CS101 Introduction to Computing.
Forms Collecting Data CSS Class 5. Forms Create a form Add text box Add labels Add check boxes and radio buttons Build a drop-down list Group drop-down.
Usability changes for Invitations & Campaigns Beyond URAL the usability changes for Invitations and Campaigns are detailed here.
Updated on: September 4, 2010 CIS67 Foundations for Creating Web Pages Professor Al Fichera.
Class 2 Remote Instruction Review of Working with Buttons EDU 556 Programming for Instruction Dr. Steve Broskoske This is an audio PowerCast. Make sure.
Copyright © Texas Education Agency, All rights reserved.1 Web Technologies Website Forms / Data Acquisition.
Looking at various Rich Message options in KRAD Kuali University: Apply Now Lab : Rich Messages Lab Objectives Understand what Rich Messages are and how.
Unit 10 – JavaScript Validation Instructor: Brent Presley.
Looking at various Rich Message options in KRAD Kuali University: Apply Now Lab : Rich Messages Lab Objectives Understand what Rich Messages are and how.
HTML Forms.
External Study Credit Granting with SurveyGizmo Shepherd University Department of Psychology.
Chapter 12© copyright Janson Industries Java Server Faces ▮ Explain the JSF framework ▮ SDO (service data objects) ▮ Facelets ▮ Pagecode classes.
Logical Operators.  Quiz  Let's look at the schedule  Logical Operators 2.
11 User Controls Beginning ASP.NET in C# and VB Chapter 8.
VB.NET and Databases. ADO.NET VB.Net allows you many ways to connect to a database. The technology used to interact with a database or data source is.
Learning Aim C.  In this section we will look at how text, tables, forms and frames can be used in web pages.
FORMS Explained By: Jasdeep Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
A little PHP. Enter the simple HTML code seen below.
A little PHP.
Weebly Elements, Continued
* Lecture # 7 Instructor: Rida Noor Department of Computer Science
Cookies BIS1523 – Lecture 23.
More Selections BIS1523 – Lecture 9.
Together Let’s Design an Online Quiz
GDSS – Digital Signature
Creating Forms on a Web Page
Presentation transcript:

Let’s demonstrate some KRAD Action Components Kuali University: Apply Now Lab 3: Actions Lab Objectives Understand how to setup an action that invokes a method on the server in our Controller Setup an action that calls a simple js function Learn about different action options

Lab 3 Actions Now that we have the page setup with some controls and validation lets set up some buttons Due to time constraints this lab will not save to a db, invoke any service, or submit to workflow on the controller, as you would normally do in a real scenario However, we will be manipulating the form on the server and sending it back KRAD Actions can be A server call to the method on your controller A call to a javascript function A mixture of both – js before server call, the server call, and js after the server call 2

Instructions 1) Open up the file view definition file TrainingApplicationView-Lab3.xml 2) Find the commented out “footer” property in the Page Training-CollegeApplicationPage (these are items of the Page’s footer – this is where we will be placing our actions, but Action components can be placed in ANY group). Uncomment out the footer. 3) You’ll notice we have two items here a “Uif-PrimaryActionButton” and a “Uif-ActionLink” – these are both Action components; we are going to add some properties to them. For the button we want to make a call to a method on the server, give it an appropriate label, and turn on client-side validation for this button. Set the following properties: p:methodToCall=“submit” - we will be calling the “submit” method on the controller p:actionLabel=“Submit” – the name of the button p:performClientSideValidation="true“ - this will perform client-side validation on all fields we are submitting to catch validation issues before anything is sent to the server (sidenote: expression means only show this component when the view is not readOnly) 3 Lab 3 Actions

Instructions 4) For the actionLink lets add: p:actionLabel=“Clear All” p:actionScript=“clearAll()” – this will be a method defined in our javascript file 5) Now find the additonalScriptFiles property and uncomment it. This property is pointing to an additional javascript file that we want the view to use. This javascript file will contain our clearAll function. 6) Open up the script file and find the clearAll() function. Uncomment the code inside the function – this code is a js call that uses jQuery to select the form’s fields and clears them. 7) Now lets open of the Controller class “TrainingApplicationController.java”. In here there is a method called submit, uncomment this method. The method does the following: changes the View to readOnly and adds a message to the messageMap (this will display this message on the screen). Now add the following tag directly above the = RequestMethod.POST, params = "methodToCall=submit") This tag is important! This method expects data to come from a post, and its methodToCall name to be submit. When this methodToCall name is a match this is the method that will be called on the controller. Note that the method to call name is the same as the Java method signature name. 8) Start your server and click on your new action components – the button should invoke the method on the server and the link should clear all your form data. 4 Lab 3 Actions

Solution:

Partial Solution - Your code should look approximately like this: 6 Lab 3 Actions <bean parent="Uif-PrimaryActionButton" p:actionLabel="Submit" p:methodToCall="submit" p:performClientSideValidation="true"/> <bean parent="Uif-ActionLink" p:actionLabel="Clear all" p:actionScript="clearAll()"/>

Advanced Features:

8 Lab 3 Extra Info and Exercises You can add a pre and post callback scripts to the action. This allows you to put any javascript functionality before or after a call to the server (or both – as seen below). Extra Exercise 1: 1) Let’s add a preSubmitCall our “submit” button. Add the preSubmitCall property with the value “function(){return confirm(‘Submit?’);}”. preSubmitCall expects a return that returns true to continue proceeding with the action, and false if you need to halt processing. 2) Let’s add a successCallback with the value “alert(‘Submit Successful!’)” 3) Start the app and see what happens when you click the submit button with the new property options set

Lab 3 Extra Info and Exercises KRAD supplies a few different looks for actions by using the following parent beans: Uif-PrimaryActionButton Uif-SecondaryActionButton Uif-PrimaryActionButton-Small Uif-SecondaryActionButton-Small Uif-ActionLink Actions can even have images in them by setting the actionImage property (url) and actionImagePlacement property (string - TOP, BOTTOM, LEFT, RIGHT, or IMAGE_ONLY) to place the image in relation to your actionLabel. Extra Exercise 2: 1) Using what you have learned about actions create your own Action component of your choosing that does anything! 2) Start the app and see what happens when you click your new action 9