navigation

Cascade LOVs For Required Fields

Cascade LOVs For Required Fields

by
August 18, 2015
frontpage, Oracle ADF
4 Comments

Sometimes we need to create a “cascade list of values”. This is the situation when the value of one LOV is a view criteria attribute for the next LOV. This works fine when we add autoSubmit=”true” to the first LOV and partialTrigger to the second but…

This Does Not Work

.. when the fields are required in the JSFF because the screen validation runs before the business component’s rules.

How We Can Solve This?

My way is to add autoSubmits and partialTriggers but(!!!) the required attribute to be “true” only for the master field. Here is the example:

 

pic 12

pic 22

pic 33

All others must be an EL Expression from the type
required=”#{bindings.MasterField.inputValue != null and bindings.MasterField.inputValue != ”}”

Inspired by:

 

What would be your approach? Share your experience and questions in the comments below.

Teodor Ognianov

Qualified IT professional focused on software development having rich background with Oracle technologies. Deep knowledge in Business Intelligence, It project management. Familiar with broad set of Java EE frameworks, including Oracle ADF, database servers as Oracle Database (9i, 10g, 11g), Database Replications, Heterogeneous Service. Teodor is a team player with good coaching skills, providing assistance with patience and deep understanding of knowledge sharing. Responsible and highly motivated.

More Posts - Website

Follow Me:
LinkedInGoogle PlusReddit

Do you want more great blogs like this?

Subscribe for Dreamix Blog now!

  • That was a GREAT tip, thanks!

    • teodorognianov

      You are welcome!

  • You can also create an entity validation (instead of Mandatory attribute validation) and in JSF part change required to shorRequired attribute, the EL can stay the same. Entity validators can implement a condition that must be fulfilled before the validation’ll run – there must be a value in the first field before engine will check for null on the second and third field.

    • teodorognianov

      Sounds good. Thanks!