×
JFinal 摘要

第0章 极速体验Model与Bean

0.1 极速体验 Generator0.2 JFinal相关生成文件0.3 Model 与 Bean 合体

第一章 快速上手

1.1 JFinal创建项目1.2 放入 JFinal 库文件1.3 修改 web.xml1.4 添加 java 文件1.5 JFinal启动项目1.6 开启浏览器看效果1.7 Maven 下开发

第二章 JFinalConfig

2.1 概述2.2 configConstant(Constants me)2.3 configRoute(Routes me)2.4 configPlugin (Plugins me)2.5 configInterceptor (Interceptors me)2.6 configHandler (Handlers me)2.7 afterJFinalStart()与 beforeJFinalStop()2.8 PropKit

第三章 Controller

3.1 概述3.2 Action3.3 getPara 系列方法3.4 getModel 与 getBean 系列方法3.5 setAttr 方法3.6 getFile 文件上传3.7 renderFile 文件下载3.8 session 操作方法3.9 render 系列方法

第四章 AOP

4.1 概述4.2 Interceptor4.3 Before4.4 Clear4.5 Interceptor 的触发4.6 Duang、Enhancer4.7 Inject 拦截器

第五章 ActiveRecord

5.1 概述5.2 ActiveRecordPlugin5.3 Model5.4 JavaBean 与 Model 合体5.5 JFinal 独创 Db + Record 模式5.6 声明式事务5.7 Cache5.8 Dialect 多数据库支持5.9 表关联操作5.10 复合主键5.11 Oracle 支持5.12 多数据源支持5.13 非 web 环境下使用 ActiveRecord

第六章 EhCachePlugin

6.1 概述6.2 EhCachePlugin6.3 CacheInterceptor6.4 EvictInterceptor6.5 CacheKit6.6 ehcache.xml 简介

第七章 RedisPlugin

7.1 概述7.2 RedisPlugin7.3 Redis 与 Cache7.4 非 web 环境使用 RedisPlugin第八章 Validator第九章 国际化第十章 FreeMarker 基础第十一章 JFinal 架构及扩展

3.3 getPara 系列方法


   Controller 提供了 getPara 系列方法用来从请求中获取参数。getPara 系列方法分为两种类型。 第 一 种 类 型 为 第 一 个 形 参 为 String 的 getPara 系列 方法 。 该 系 列 方法 是对 HttpServletRequest.getParameter(String name)  的 封 装 , 这 类 方 法 都 是 转   调 了 HttpServletRequest.getParameter(String name)。第二种类型为第一个形参为 int 或无形参的 getPara 系列方法。该系列方法是去获取 urlPara 中所带的参数值。getParaMap 与 getParaNames 分别对应 HttpServletRequest 的 getParameterMap 与 getParameterNames。


记忆技巧:第一个参数为 String 类型的将获取表单或者 url 中问号挂参的域值。第一个参数为int 或无参数的将获取 urlPara 中的参数值。


getPara 使用例子:

方法调用

返回值

getPara(”title”)

返回页面表单域名为“title”参数值

getParaToInt(”age”)

返回页面表单域名为“age”的参数值并转为 int 型

getPara(0)

返回 url 请求中的 urlPara 参数的第一个值,如 http://localhost/controllerKey/method/v0-v1-v2 这个请求将 返回”v0”

getParaToInt(1)

返回 url 请求中的 urlPara 参数的第二个值并转换成 int 型,如 http://localhost/controllerKey/method/2-5-9 这个请求将返回 5

getParaToInt(2)

如 http://localhost/controllerKey/method/2-5-N8 这个 请求将返回 -8。注意:约定字母 N 与 n 可以表示负 号,这对 urlParaSeparator 为  “-” 时非常有用。

getPara()

返回 url 请求中的 urlPara 参数的整体值, 如 http://localhost/controllerKey/method/v0-v1-v2 这个 请求将返回”v0-v1-v2”



分类导航

关注微信下载离线手册

bootwiki移动版 bootwiki
(群号:472910771)