public FieldMetadata getEmptyField ( FieldMetadata fieldMetadata ) { ValidationSession session = fieldMetadata . getValidationSession ( ) ; RuleSessionImpl ruleSession = getRuleSession ( session ) ; ProxyField proxyField = session . getProxyField ( fieldMetadata ) ; RuleProxyField ruleProxyField = ruleSession . getRuleProxyField ( proxyField ) ; while ( true ) { RuleProxyField rpf = ruleProxyField . backChain ( ) ; if ( rpf == null ) { // there are no unfilled fields return null ; } else { // We got an unfilled field return it return rpf . getProxyField ( ) . getFieldMetadata ( ) ; } } }
Find an empty field ie one that is unknown and not not known If we don t find one then return null .