JSF的immediate属性

f it isn't entirely clear yet, here's a summary, complete with real world use examples when they may be beneficial:

  • If set in UIInput(s) only, the process validations phase will be taken place in apply request values phase instead. Use this to prioritize validation for the UIInput component(s) in question. When validation/conversion fails for any of them, the non-immediate components won't be validated/converted.

  • If set in UICommand only, the apply request values phase until with update model values phases will be skipped for any of the UIInput component(s). Use this to skip the entire processing of the form. E.g. "Cancel" or "Back" button.

  • If set in both UIInput and UICommand components, the apply request values phase until with update model values phases will be skipped for any of the UIInput component(s) which does not have this attribute set. Use this to skip the processing of the entire form expect for certain fields (with immediate). E.g. "Password forgotten" button in a login form with a required but non-immediate password field.





       1.如果仅在UIInput(s)中设置,则进程验证阶段将在应用请求值阶段中进行。 使用此选项可优先确定有问题的UIInput组件的验证。 当其中任何一个的验证/转换失败时,非立即组件将不会被验证/转换。
       2.如果仅在UICommand中设置,则对于任何UIInput组件,将跳过应用请求值阶段,直到更新模型值阶段为止。 使用此选项可跳过表单的整个处理。 例如 “取消”或“返回”按钮。
       3.如果在UIInput和UICommand组件中设置,则对于没有设置此属性的任何UIInput组件,将跳过应用请求值阶段,直到更新模型值阶段为止。 使用此选项可跳过对某些字段(包括立即数)的整个表单的处理。 例如 登录表单中的“密码忘记”按钮,带有必需的但不是立即的密码字段。

----------------------------------------------------------------------
转自:http://stackoverflow.com/questions/12960718/trying-to-understand-immediate-true-skipping-inputs-when-it-shouldnt
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值