`
congpeixue
  • 浏览: 269542 次
  • 性别: Icon_minigender_1
  • 来自: ...
社区版块
存档分类
最新评论

Click framework 的 Page类(一)

阅读更多
pages(页面)是web程序的核心。 在click中,页面将html请求的处理
和html呈现整合在了一起。
本节讨论的click页面涵盖以下主题:
Classes - 页面对应的java类
Execution - 页面执行序列
Request Param Auto Binding - 请求参数自动绑定到page字段
Security - 页面安全模型
Navigation - 页面之间的跳转
Page Templating - 页面模板
Direct Rendering -页面 直接呈现
Stateful - 状态页
Error Handling - 页面错误处理
Page Not Found - 对不能找到页面的处理
Message Properties - 页面消息属性

在click中,一个逻辑页面由java类和Velocity 模板组成, 它们被定义在
click.xml的page元素里。
<page path="search.htm" classname="com.mycorp.page.Search"/>

path属性指定了Velocity 模板的位置, classname 属性指定了
java类的名字。

如果你使用其他的模板引擎,使用步骤如上。
你也可以配置Click 使用jsp来呈现页面
<page path="search.jsp" classname="com.mycorp.page.Search"/>



Classes

所有的用户自定义page类都必须是Page的子类。如下的图标1描述了
Page类和它的关联类 (Context类及Control类)的关系。


page提供了model属性,model属性中保存着用于在Velocity 模板中显示的对象。
model属性也可以包含Control对象。

Page拥有一个 Context对像, 用于访问所有的servlet对象。 当你使用Click进行
编程时, 你可以使用该对象来访问HttpServletRequest  parameters  HttpSession


Page类提供了一些空的处理方法, 用户可以覆盖这些方法。
onSecurityCheck()
onInit()
onGet()
onPost()
onRender()
onDestroy()

ClickServlet 依赖一个public类型的无参的构造方法来初始化一个Page类, 所以当你
新建一个Page类的子类时, 你必须确保你没有添加一个不兼容的构造方法。


Execution关于Page的GET请求的执行序列, 被概括如下:


  • 大小: 16.9 KB
  • 大小: 15.8 KB
分享到:
评论
2 楼 congpeixue 2008-08-22  
谢谢哦 ~~
1 楼 avaj 2008-08-20  
继续~~加油

相关推荐

    Apache Click User Guide

    Apache Click is a simple JEE web application framework for commercial Java developers. Apache Click is an open source project, licensed under the Apache license . Click uses an event based programming...

    click-2.3.0.zip

    Click is a J2EE web application framework featuring a Page and Component oriented design. Click is an open source project licensed using the Apache license.

    robotframework-zoomba:扩展的Robot Framework库使测试GUI,RESTSOAP API,Mobile和Windows Desktop更加容易

    作为一个团队,开始使用Robot Framework进行自动化之旅-我们发现花了一些时间来扩充我们的库,而Robotframework-Zoomba的目标是使该过程对于新项目更容易。 有关该功能的更多特定信息,请参见 , , , 或库的...

    RobotFramework常见语法.pdf

    [Documentation] 截图 Capture Page Screenshot [Arguments] ${JSContent} [Documentation] 执⾏JS Execute JavaScript ${JSContent} [Arguments] ${location} [Documentation] 选择Frame Select Frame ${location} ...

    CSharp 3.0 With the .NET Framework 3.5 Unleashed(english)

    一本不错的C#书,希望对您有帮助,本书目录: C# 3.0 Unleashed 1 Table of Contents 6 Introduction 30 Why This Book Is for You 31 Organization and Goals 32 Part 1 Learning C# Basics 36 1 Introducing ...

    Java邮件开发Fundamentals of the JavaMail API

    If you're viewing this document online, you can click any of the topics below to link directly to that section. 1. Tutorial tips 2 2. Introducing the JavaMail API 3 3. Reviewing related ...

    UiPath高级开发者认证-操作题

    2. On the landing page, Dashboard, click on the Work items menu item. Scrape the data in all the pages of the table, page by page, ensuring error handling and recovery. 3. For each page: - Filter the ...

    Java Language Conversion Assistant

    Windows 2000, Windows Server 2003, Windows XP Visual Studio .NET 2003 Instructions Click the Download button in the upper right-hand corner of this page to start the download, or choose a different ...

    asp.net知识库

    Click button only once in asp.net 2.0 Coalesys PanelBar + R.a.d Treeview +Xml 构建的Asp.net 菜单和权限管理模块 突破屏蔽限制,自己的网站使劲弹新IE窗口 对页面SCROLLING的CSS不能生效原因 .Net 中IE使用...

    微软Kinect for Windows7 SDK Beta开发工具包(32)

    On this page, click Download to start the Kinect for Windows SDK beta download. Click Run to start Setup, and follow the instructions in the Setup Wizard. Or, to save the download on your computer ...

    微软Kinect for Windows7 SDK Beta开发工具包(64)

    On this page, click Download to start the Kinect for Windows SDK beta download. Click Run to start Setup, and follow the instructions in the Setup Wizard. Or, to save the download on your computer ...

    SignalR 2.0 and MVC 5即时通讯完整版示例

    在Visual Studio中,创建一个面向.NET Framework 4.5的C#ASP.NET应用程序,将其命名为SignalRChat,然后单击确定。 创建网页 在New ASP.NET Project对话框中选择MVC,然后点击Change Authentication。 创建网页 ...

    ASPNET35开发大全第一章

    3.2.2 创建一个类和其方法 3.2.3 类成员 3.2.4 构造函数和析构函数 3.3 对象的生命周期 3.3.1 类成员的访问 3.3.2 类的类型 3.3.3 .NET的垃圾回收机制 3.4 使用命名空间 3.4.1 为什么要用命名空间 3.4.2 创建命名...

    ASP.NET3.5从入门到精通

    3.2.2 创建一个类和其方法 3.2.3 类成员 3.2.4 构造函数和析构函数 3.3 对象的生命周期 3.3.1 类成员的访问 3.3.2 类的类型 3.3.3 .NET 的垃圾回收机制 3.4 使用命名空间 3.4.1 为什么要用命名空间 3.4.2 创建命名...

    北京中科信软 Visual Basic.NET培训

    一 NET开发基础 .NET Framework概述 VS2008开发环境 C#语言及编码规范 面向对象开发初步 接口和类的设计 SQL语句,存储过程 二 .NET框架&C#编程 面向对象的基本知识体系 .NET中的面向对象设计与应用 C#与...

    IE浏览器自定义的下载管理器(VBIEDownloadMa nager)

    Click the "Download" button on this page, and then VBWebDownloader.exe will be launched. In VBWebDownloader.exe, you will find that the url is ...

    VB.NET Developer's Guide(4574).pdf

    Customizing the Start Page 139 Accessibility Options 141 Summary 142 Solutions Fast Track 142 Frequently Asked Questions 143 Chapter 4 Common Language Runtime 145 Introduction 146 Component ...

    Login Control

    Right-click anywhere in the pane and select "Customize Toolbox...", click ".Net Framework" tab, browse and locate JoeWoods.LoginControl.dll as you did in step 1. This will create the LoginControl ...

    Selenium WebDriver Practical Guide 最新 原版

    Perform advanced actions such as drag-and-drop, double-click, right-click, and action builders on web pages Explore the advanced features of WebDriver such as handling cookies, taking ...

Global site tag (gtag.js) - Google Analytics