formentryapp extensions: Where is "Show If" processed?

Tags: #<Tag:0x00007f2998f61ff8>

Hi @mogoodrich @dkayiwa,

As you know App Framework’s extensions will display or not based on whether their "require" expression is fulfilled, see here:

if (contextModel == null || checkRequireExpression(candidate, contextModel)) {
  extensions.add(candidate);
}

I was interested in the “Show If” possibility for formentryapp’s form extensions and I just could not find where is the code that processes showIf

Any idea?

Cc @samuel34 @ruhanga

showIf is also processed as require in the snippet of code that you have provided above because of this: https://github.com/openmrs/openmrs-module-formentryapp/blob/8bd46a93a418af62c7c05665037f996111364fb5/omod/src/main/java/org/openmrs/module/formentryapp/page/controller/forms/ExtensionForm.java#L119

2 Likes

Ah, how did I miss that. Thanks @dkayiwa!