A
A
Adrenal1ne12016-11-26 21:11:10
Java
Adrenal1ne1, 2016-11-26 21:11:10

How to get rid of duplicate path JSTL in jsp page?

Good afternoon!
jsp page has code

<td>
                <c:choose>
                    <c:when test="${affiliateProgramConstantInfo.login != null}">
                        <sf:input path="login" id="login_id" class="form-control input-sm" readonly="true"/>
                    </c:when>
                    <c:otherwise>
                        <sf:input path="login" id="login_id" class="form-control input-sm"/>
                    </c:otherwise>
                </c:choose>
                <div class="has-error">
                    <sf:errors path="login" class="help-inline"/>
                </div>
            </td>


Intelij Idea swears at path="login"
Duplicate id reference less... (Ctrl+F1)
This inspection checks for duplicate "id" attributes in XML.

How to correctly rewrite the code so that there is no duplicate or not to pay attention to this error?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Smirnov, 2016-12-01
@Adrenal1ne1

<td>
    <sf:input path="login" id="login_id" class="form-control input-sm" readonly="${affiliateProgramConstantInfo.login != null}"/>
    <div class="has-error">
        <sf:errors path="login" class="help-inline"/>
    </div>
</td>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question