"I would like to display the ""Like Cancel"" button when the values ""sessionScope.login_employee.id"" and ""reportfavo.employee.id"" are equal in the following code."
"When I checked the values of ""sessionScope.login_employee.id"" and ""reportfavo.employee.id"", the values were the same, but the ""like cancel button"" does not appear."Could you please let me know if there is anything wrong?
<c:if test="${sessionScope.login_employee.id==reportfavo.employee.id}">
<form method="POST" action="<c:url value='/reports/destroy'/>">
<p align="justify">
<input type="hidden" name="report_id" value="${report.id}"/>
<button type="submit">Cancel Like</button>
</p>
</form>
</c: if>
From the code above
<c:if test="${sessionScope.login_employee.id==reportfavo.employee.id}">
and
</c:if>
If the button does not appear when is turned off, it is not a branch condition (c:if
).
If it is a c:if
issue, add the following two lines to see if they really match.
<c:out value="${sessionScope.login_employee.id}"/>
<c:out value="${reportfavo.employee.id}"/>
© 2024 OneMinuteCode. All rights reserved.