How to use th: if

1

Good morning, someone would tell me the correct way to use Thymeleaf's "th: if" with Spring MVC, I'm trying that way but I'm not getting it ..

th:if="${situacao_financeira} eq 'A'"
    
asked by anonymous 27.10.2016 / 14:04

1 answer

1

It was as follows:

No model:

public boolean aPagar() {
        if(situacao_financeira.equals("A"))
            return true;
        else
            return false;
    }

and in the View

<div class="form-group" th:if="${inscricao.aPagar()}">
    
27.10.2016 / 18:13