java - JSF / PrimeFaces: Fill out at least one of X fields -


I am currently developing a dynamic form system and implementing a feature where the user The form field should be set in some predefined areas) should be the ability to define which input field is required and which does not. There should also be a possibility to set the following: "Field A and B. should be displayed. You must fill at least one (A or B, or if you want A and B) form."

I have collected the following data:

  0: not displayed 1: displayed 2: displayed and required (w / o dependence on any other field) more than 1 : Custom identifier  

Example:

  Name: 1 Birthday: 2 City: 2x: 3 y: 3 Postal Code: 0  < / Pre> 

Filling the user with that setting, either birthday or and either the X or Y.

Does JSF support that type of "required" field?

Documentation prefix 4.0 (), attribute required < / Code> accepts a javax.el.ValueExpression evaluation to java.lang.Boolean .

In my understanding, it will help to create an invoice function which can return a boolean , and to determine whether it is true Or use your logic false (keeping in mind the user settings and current elements).


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -