You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Justin Edelson (JIRA)" <ji...@apache.org> on 2014/06/18 16:18:03 UTC

[jira] [Updated] (SLING-3679) Required fields validation

     [ https://issues.apache.org/jira/browse/SLING-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Justin Edelson updated SLING-3679:
----------------------------------

    Fix Version/s:     (was: Sling Models Implementation 1.0.6)

> Required fields validation
> --------------------------
>
>                 Key: SLING-3679
>                 URL: https://issues.apache.org/jira/browse/SLING-3679
>             Project: Sling
>          Issue Type: Improvement
>          Components: Extensions
>    Affects Versions: Sling Models Implementation 1.0.4
>            Reporter: Krystian Panek
>              Labels: models
>
> Currently if some field cannot be injected (and it is not annotated with @Optional), model adapter factory returns null. However fact that some field has null and all other are properly injected is acceptable in my context.
> Proposal:
> * model adapter factory does not return null if not all required fields are injected,
> * result of requirement validation is serviced as for example:
> ** injecting it to some extra annotated field: @Valid boolean valid; (with default false),
> ** passing bool parameter in @PostConstruct callback, for example 'valid' (true if all required field are injected, false otherwise),
> * behave current behavior, new available only with extra model class annotation, for example @NotNull .



--
This message was sent by Atlassian JIRA
(v6.2#6252)