Common-Controls Quickstart

Similar documents
Common-Controls Guided Tour TreeControl

Common-Controls Guided Tour TabSetControl

Common-Controls Guided Tour ListControl

Common-Controls Guided Tour TreeListControl

Auftrag. Common-Controls Guided Tour FormTag s

Configuring Tomcat for a Web Application

The Struts MVC Design. Sample Content

web.xml Deployment Descriptor Elements

Jakarta Struts. Pocket Reference. Chuck Cavaness and Brian Keeton. Beijing Boston Farnham Sebastopol Tokyo

Servlets by Example. Joe Howse 7 June 2011

1. What is This Guide about / Goals The Project JGuard Configuration... 11

Building Web Applications With The Struts Framework

servlets and Java JSP murach s (Chapter 2) TRAINING & REFERENCE Mike Murach & Associates Andrea Steelman Joel Murach

Introduction to Java Server Faces(JSF)

Structure of a webapplication

Sun Sun Certified Web Component Developer for J2EE 5 Version 4.0

Dynamic Struts Configuration Dipl.-Inf. Manfred Wolff January 2004

Writing Servlets and JSPs p. 1 Writing a Servlet p. 1 Writing a JSP p. 7 Compiling a Servlet p. 10 Packaging Servlets and JSPs p.

Implementing a Notification Server

JSF & Struts 1, 4, 7, 2, 5, 6, 3 2, 4, 3, 1, 6, 5, 7 1, 4, 2, 5, 6, 3, 7 1, 2, 4, 5, 6, 3, 7

04/29/2004. Step by Step Guide for Building a simple JSF Application (Guess a Number) - V1.0

Oracle 1z Java Enterprise Edition 5 Web Component Developer Certified Professional Exam. Practice Test. Version:

Tapestry. Code less, deliver more. Rayland Jeans

[INTEGARTION OF DISPLAY TAG WITH WEBSPHERE COMMERCE]

Module 5 Developing with JavaServer Pages Technology

UIMA Simple Server User Guide

PRODUCT DOCUMENTATION. Installing and Implementing Enterprise Contact Center Chat RELEASE 5.1

Contents. 1. JSF overview. 2. JSF example

Building Componentized Web Interfaces with Clay Instead of Tiles

S imilar to JavaBeans, custom tags provide a way for

Jakarta Struts: An MVC Framework

J2EE Development. Course Detail: Audience. Duration. Course Abstract. Course Objectives. Course Topics. Class Format.

Jaffa Reference Guide Jaffa Components

SAS Web Infrastructure Kit 1.0. Developer s Guide

SAS Web Infrastructure Kit 1.0. Overview

The DataNucleus REST API provides a RESTful interface to persist JSON objects to the datastore. All entities are accessed, queried and stored as

1 CUSTOM TAG FUNDAMENTALS PREFACE... xiii. ACKNOWLEDGMENTS... xix. Using Custom Tags The JSP File 5. Defining Custom Tags The TLD 6

What's New in the Servlet and JSP Specifications

Developing Portlets for SAS Information Delivery Portal 4.4

Advanced Action Classes

Web Application Architecture (based J2EE 1.4 Tutorial)

Java Programming Language

5.1 Registration and Configuration

Crystal Reports XI Release 2

SECTION II: JAVA SERVLETS

Session 8. Reading and Reference. en.wikipedia.org/wiki/list_of_http_headers. en.wikipedia.org/wiki/http_status_codes

Customizing ArcIMS Using the Java Connector and Python

Introduction to XML. An Example XML Document. The following is a very simple XML document.

SAS Web Infrastructure Kit 1.0. Overview, Second Edition

White Paper. Fabasoft Folio Portlet. Fabasoft Folio 2017 R1 Update Rollup 1

JSF - Facelets Tags JSF - template tags

Module 3 Web Component

FINALTERM EXAMINATION Spring 2009 CS506- Web Design and Development Solved by Tahseen Anwar

JSF Page Navigation. The first example we ll look at is available as jsf_ex2a.zip on your notes page.

BEA WebLogic. Server. Assembling and Configuring Web Applications

VirtualViewer Documentum D2 Integration Deployment Guide

CS506 Web Design & Development Final Term Solved MCQs with Reference

Java Finite State Machine Framework

SAS Web Infrastructure Kit 1.0. Developer s Guide, Fifth Edition

CodeCharge Studio Java Deployment Guide Table of contents

Advanced Web Technologies 8) Facelets in JSF

MVC, 2. MVC

Rational Application Developer 7 Bootcamp

Developing Spring based WebSphere Portal application using IBM Rational Application Developer

Creating a New Project with Struts 2

CHAPTER 6. Organizing Your Development Project. All right, guys! It s time to clean up this town!

JDBC [Java DataBase Connectivity]

Introduction to JSP and Servlets Training 5-days

Oracle EXAM - 1Z Java Enterprise Edition 5 Web Component Developer Certified Professional Exam. Buy Full Product

SAS AppDev Studio TM 3.4 Eclipse Plug-ins. Migration Guide

SAP NetWeaver Identity Management Identity Center. Implementation guide. Version 7.2 Rev 4. - Extension Framework

Standards and the Portals Project

ArcIMS 9. Customizing ArcIMS Using the Java Connector. GIS by ESRI

JSF: Introduction, Installation, and Setup

One application has servlet context(s).

Configuring Weblogic Server Oracle FLEXCUBE Universal Banking Release [September] [2013] Part No. E

Session 9. Introduction to Servlets. Lecture Objectives

sessionx Desarrollo de Aplicaciones en Red EL (2) EL (1) Implicit objects in EL Literals José Rafael Rojano Cáceres

Author: Sascha Wolski Sebastian Hennebrueder Tutorials for Struts, EJB, xdoclet and eclipse.

STRUTS 2 - HELLO WORLD EXAMPLE

SESM Components and Techniques

PHP Development for ClearPath. Session 3028, Tuesday, May 15, 2012, 10:30AM Ron Neubauer, Principal Engineer, Unisys Corporation

Getting Started Guide. Version 1.7

Struts interview questions

A Guide to Porting Applications

MyLEAD Release V1.3 Installation Guide

Unit 5 JSP (Java Server Pages)

Welcome To PhillyJUG. 6:30-7:00 pm - Network, eat, find a seat 7:00-7:15 pm - Brief announcements 7:15-8:30 pm - Tom Janofsky's presentation

Apcoordinator User's Guide J2X ENZ2(00)

JUnit Recipes. Practical Methods for Programmer Testing. J. B. Rainsberger. with contributions by Scott Stirling MANNING

Directory structure and development environment set up

directive attribute1= value1 attribute2= value2... attributen= valuen %>

Session 9. Deployment Descriptor Http. Reading and Reference. en.wikipedia.org/wiki/http. en.wikipedia.org/wiki/list_of_http_headers

JSP. Common patterns

Google Web Toolkit Creating/using external JAR files

CM WebClient. Manual v 1.8.2

SAP Enterprise Portal 6.0 -Sample Screenshots- 31/03/2003

Using SailFin and Eclipse to build SIP-based and RESTful applications

HYPERION SYSTEM 9 BI+ GETTING STARTED GUIDE APPLICATION BUILDER J2EE RELEASE 9.2

This tutorial will teach you how to use Java Servlets to develop your web based applications in simple and easy steps.

Transcription:

Common-Controls Quickstart Version 1.1.0 - Stand: 20. November 2003

Published by: SCC Informationssysteme GmbH 64367 Mühltal Tel: +49 (0) 6151 / 13 6 31 0 Internet www.scc-gmbh.com Product Site http://www.common-controls.com Copyright 2000-2003 SCC Informationssysteme GmbH. All rights reserved. Published 2003 No part of this publication may be stored in a retrieval system, transmitted, or reproduced in any way without the prior agreement and written permission of SCC Informationssysteme GmbH. Sun, Sun Mircosystems, the Sun Logo, Java, JavaServer Pages are registered trademarks of Sun Microsystems Inc in the U.S.A. and other Countries. Microsoft, Microsoft Windows or other Microsoft Produkte are a registered trademark of Microsoft Corporation in the U.S.A. and other Countries. Netscape, Netscape Navigator is a registered trademark of Netscape Communications Corp in the U.S.A. and other Countries. All other product names, marks, logos, and symbols may be trademarks or registered trademarks of their respective owners. Quickstart ii

Table of contents 1 Quickstart...1 1.1 Setting up the projekt...1 1.2 Declaration of the TagLibrarys...2 1.3 Incorporation of the Tag libraries in the Deployment Descriptor...3 1.4 Registration of the Resource-Servlet (optional)...3 1.5 Deriving an ActionServlet and Registration of the Painterfactory...4 1.6 Structure of the JSP-Page...5 1.7 Examples...5 2 Appendix: Example web.xml...6 3 Support...8 4 Index of Abbreviations...9 Quickstart iii

1 Quickstart This document describes the basic steps for using the Common-Controls. The Common-Controls support application developers in generating dynamic HTML user interfaces. In doing so, a strict separation is maintained between the presentation layer and the business logic. 1.1 Setting up the projekt For using the Common-Controls, the following JAR-files must be incorporated in the lib-directory of the project: common-controls-1.x.x.jar commons-beanutils.jar commons-collections.jar commons-dbcp.jar commons-digester.jar commons-fileupload.jar commons-lang.jar commons-logging.jar commons-pool.jar commons-resources.jar commons-validator.jar ecs-1.4.2.jar jakarta-oro.jar jakarta-regexp-1.2.jar jarkata-struts-1.1.jar log4j-1.2.7.jar Furthermore, for depicting the user interface, some Images and StyleSheets are required, which are supplied with the Common-Controls. For this purpose, the fw-directory is copied in the web-directory of your own project. Furthermore, the following tlds should be incorporated in the project: cc-base.tld cc-controls.tld cc-forms.tld cc-menu.tld cc-security.tld cc-svg.tld cc-template.tld cc-utility.tld In the following chapter, it is being assumed that the tld s are saved in the subdirectory /WEB-INF/tlds/. If another directory is selected, the following path specifications must be suitably amended. Quickstart 1

1.2 Declaration of the TagLibrarys In order to use the Common-Control Tags on a JSP page, the corresponding Tag Library must be declared at the start of the page. This is done in the following form: <%@ taglib uri="/web-inf/tlds/cc-controls.tld" prefix="ctrl" %> Subsequently, the Common-Controls can be referenced with the prefix <ctrl:tagname />. The prefix can be freely selected. Example: <%@ taglib uri="/web-inf/tlds/cc-controls.tld" prefix="ctrl" %> <%@ taglib uri="/web-inf/tlds/cc-utility.tld" prefix="util" %> <html> <head> <%-- Framework includes --%> <util:jsp directive="includes"/> </head> <body leftmargin="0" topmargin="0" onload="init();"> <ctrl:tree id="prod1" name="products" action="sample201/producttreebrowse" root="true" linesatroot="true" labelproperty="name" imageproperty="type" expandmode="multiple" groupselect="true" checkboxes="true"/> <%-- Framework cleanup processing --%> <util:jsp directive="endofpage"/> </body> </html> Depending on which functionalities are used, additional Tag Libraries may have to be specified. Which Tags are available in which TagLibrary, is described in the documentation of the Common Controls TagLibrary. <%@ taglib uri="/web-inf/tlds/cc-base.tld" prefix="base" %> <%@ taglib uri="/web-inf/tlds/cc-controls.tld" prefix="ctrl" %> <%@ taglib uri="/web-inf/tlds/cc-forms.tld" prefix="forms" %> <%@ taglib uri="/web-inf/tlds/cc-menu.tld" prefix="menu" %> <%@ taglib uri="/web-inf/tlds/cc-security.tld" prefix="sec" %> <%@ taglib uri="/web-inf/tlds/cc-svg.tld" prefix="svg" %> <%@ taglib uri="/web-inf/tlds/cc-template.tld" prefix="template" %> <%@ taglib uri="/web-inf/tlds/cc-utility.tld" prefix="util" %> Quickstart 2

1.3 Incorporation of the Tag libraries in the Deployment Descriptor For incorporating the Tag libraries in the WEB-INF/web.xml file, the following paragraph must be copied: <taglib-uri>/web-inf/tlds/cc-base.tld</taglib-uri> <taglib-location>/web-inf/tlds/cc-base.tld</taglib-location> <taglib-uri>/web-inf/tlds/cc-controls.tld</taglib-uri> <taglib-location>/web-inf/tlds/cc-controls.tld</taglib-location> <taglib-uri>/web-inf/tlds/cc-forms.tld</taglib-uri> <taglib-location>/web-inf/tlds/cc-forms.tld</taglib-location> <taglib-uri>/web-inf/tlds/cc-menu.tld</taglib-uri> <taglib-location>/web-inf/tlds/cc-menu.tld</taglib-location> <taglib-uri>/web-inf/tlds/cc-security.tld</taglib-uri> <taglib-location>/web-inf/tlds/cc-security.tld</taglib-location> <taglib-uri>/web-inf/tlds/cc-svg.tld</taglib-uri> <taglib-location>/web-inf/tlds/cc-svg.tld</taglib-location> <taglib-uri>/web-inf/tlds/cc-template.tld</taglib-uri> <taglib-location>/web-inf/tlds/cc-template.tld</taglib-location> <taglib-uri>/web-inf/tlds/cc-utility.tld</taglib-uri> <taglib-location>/web-inf/tlds/cc-utility.tld</taglib-location> 1.4 Registration of the Resource-Servlet (optional) The Resource-Servlet offers caching functionality and makes it possible to access resources (Gif s, SVGgraphics), which are registered in the ResourceManager. When an HTML page is refreshed, performance advantages can be exploited by using the cache. The Ressource-Servlet is registered as follows in the Web.xml (Deployment-Descriptor). <servlet> <servlet-name>res</servlet-name> <display-name>ressource Servlet</display-name> <description>provides access to cached Ressources</description> <servlet-class>com.cc.framework.resource.resourceservlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>res</servlet-name> <url-pattern>*.res</url-pattern> </servlet-mapping> Quickstart 3

1.5 Deriving an ActionServlet and Registration of the Painterfactory The Common-Controls provide the programmer with a basic idea for designing the user interface, which can be extended according to your own requirements. 1 The design of the application is determined by means of the so-called Painterfactories. Here, a Painter is responsible for generating an interface design. By using different Painters, different layouts can be used in parallel. The registration of the Painterfactory can e.g. be carried out application-wide in the init()-method of the Frontcontroler-Servlet. import javax.servlet.servletexception import org.apache.struts.action.actionservlet; import com.cc.framework.ui.painter.painterfactory import com.cc.framework.ui.painter.def.defpainterfactory; import com.cc.framework.ui.painter.html.htmlpainterfactory; public class MyFrontController extends ActionServlet { public void init() throws ServletException { super.init(); } } // Register all Painter Factories with the preferred GUI-Design // In this case we use the Default-Design. PainterFactory.registerApplicationPainter ( getservletcontext (), DefPainterFactory.instance()); PainterFactory.registerApplicationPainter ( getservletcontext (), HtmlPainterFactory.instance()); The Actionservlet must then also be registered in the web.xml-file. This completes the basic steps for using the Common-Controls. The handling of the individual control elements is described in the corresponding individual documents (Guided Tours). 1 Additional ones will be delivered with the next versions of Common-Controls or you can develop them yourself. Quickstart 4

1.6 Structure of the JSP-Page When building the JSP-Page, the Tags specified in the figure below must be incorporated at the beginning and at the end. The Framework thus has the facility to carry out its own initializations. With the first Tag, all the necessary HTML-include directives for the presentation framework are inserted. The StyleSheets und JavaScript files required by the Painters are included. The effect of the directive endofpage is that all the necessary tidying up work is carried out at the end of the JSP-page. This includes e.g. the emptying of the error collection. To use hover efffects for buttons, the JavaScript handler init() must be specified in the HTML Body Element. <%@ taglib uri="/web-inf/tlds/cc-utility.tld" prefix="util" %> <html> <head> <%-- Framework includes --%> <util:jsp directive="includes"/> </head> <body leftmargin="0" topmargin="0" onload="init();"> <!-- Content --> <%-- Framework cleanup processing --%> <util:jsp directive="endofpage"/> </body> </html> 1.7 Examples Code examples are contained in the Demo Application, which is available for downloading on our homepage. There, you will also find configuration examples for the control elements, which demonstrate the various usage possibilities. Quickstart 5

2 Appendix: Example web.xml <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app id="webapp"> <display-name>ccsamples</display-name> <description>sample Application Common-Controls</description> <servlet> <servlet-name>action</servlet-name> <servlet-class>com.cc.sampleapp.servlet.frontcontroller</servlet-class> <! Struts default modul --> <init-param> <param-name>config</param-name> <param-value>web-inf/config/struts-config.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet> <servlet-name>res</servlet-name> <display-name>ressourcen Servlet</display-name> <description>verwaltung von Ressourcen</description> <servlet-class>com.cc.framework.resource.resourceservlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>res</servlet-name> <url-pattern>*.res</url-pattern> </servlet-mapping> <session-config> <session-timeout>10</session-timeout> </session-config> <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> <! Common Controls TagLibs--> <taglib-uri>/web-inf/tlds/cc-base.tld</taglib-uri> <taglib-location>/web-inf/tlds/cc-base.tld</taglib-location> <taglib-uri>/web-inf/tlds/cc-controls.tld</taglib-uri> <taglib-location>/web-inf/tlds/cc-controls.tld</taglib-location> <taglib-uri>/web-inf/tlds/cc-forms.tld</taglib-uri> <taglib-location>/web-inf/tlds/cc-forms.tld</taglib-location> <taglib-uri>/web-inf/tlds/cc-menu.tld</taglib-uri> <taglib-location>/web-inf/tlds/cc-menu.tld</taglib-location> Appendix: Example web.xml 6

<taglib-uri>/web-inf/tlds/cc-security.tld</taglib-uri> <taglib-location>/web-inf/tlds/cc-security.tld</taglib-location> <taglib-uri>/web-inf/tlds/cc-svg.tld</taglib-uri> <taglib-location>/web-inf/tlds/cc-svg.tld</taglib-location> <taglib-uri>/web-inf/tlds/cc-template.tld</taglib-uri> <taglib-location>/web-inf/tlds/cc-template.tld</taglib-location> <taglib-uri>/web-inf/tlds/cc-utility.tld</taglib-uri> <taglib-location>/web-inf/tlds/cc-utility.tld</taglib-location> <! Struts TagLibs--> <taglib-uri>/web-inf/tlds/struts-bean.tld</taglib-uri> <taglib-location>/web-inf/tlds/struts-bean.tld</taglib-location> <taglib-uri>/web-inf/tlds/struts-html.tld</taglib-uri> <taglib-location>/web-inf/tlds/struts-html.tld</taglib-location> <taglib-uri>/web-inf/tlds/struts-logic.tld</taglib-uri> <taglib-location>/web-inf/tlds/struts-logic.tld</taglib-location> <taglib-uri>/web-inf/tlds/struts-nested.tld</taglib-uri> <taglib-location>/web-inf/tlds/struts-nested.tld</taglib-location> <taglib-uri>/web-inf/tlds/struts-template.tld</taglib-uri> <taglib-location>/web-inf/tlds/struts-template.tld</taglib-location> <taglib-uri>/web-inf/tlds/struts-tiles.tld</taglib-uri> <taglib-location>/web-inf/tlds/struts-tiles.tld</taglib-location> </web-app> Appendix: Example web.xml 7

3 Support We would be happy to be of service if you have any questions or problems. Please use our Service Form on our homepage for your queries. We shall endeavor to answer your queries as quickly as possible Support 8

4 Index of Abbreviations C CC Common-Controls Index of Abbreviations 9