开发者

JSF : immediate true causes problem in searching the product

I am facing the problem of immediate = "true" in my project.

I have applied imm开发者_StackOverflow社区ediate = "true" on search commandLink to By Pass the validation. but it affects the search functionality.

it does not execute the search method...

what is the problem can anyone explaine...

is there any way to bypass the validation and search the product without using immediate="true"

Thanking in advance


Your functional requirement is still unclear (which brings those contra-questions: Why is the validator there? Why/when do you want to bypass this? Do you have multiple buttons? etc..etc..), so I can't be of more help than recommending you to get yourself through this article to learn about the why of the immediate attribute and to help yourself with the problem: Debug JSF lifecycle.

Here's a summary of relevance:

Okay, when should I use the immediate attribute?

If 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜