六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 93|回复: 0

JSF Component & Render

[复制链接]

升级  55.33%

33

主题

33

主题

33

主题

秀才

Rank: 2

积分
133
 楼主| 发表于 2013-2-7 18:54:23 | 显示全部楼层 |阅读模式
when using JSF, some scenarios are difficult to deal with.
e.g. 1. multi rows raido buttons in dataTable
     2. multi columns radio buttons in dataTable
     The radio buttons don't fall in the one radio group, so they don't behave as one radio group

Solution: create customize component
     step1, inherit and implement component class
           add one overrideName field, so we can override the radio names generated by radio button. In this way, multi-row or column radios are considered in one radio group
     step2, inherit and implement render class
         override Decode(apply request phase, retrive the value from request obj and apply to component)
         override Encode(render response phase)

     step3, customize tag lib




http://www.javaworld.com/javaworld/jw-02-2007/jw-02-jsf.html?page=2
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表