Guess that you have one UserModel with field saveButton as string type for storing true/false.
UserModel.java
public class UserModel {
private String saveButton = "true";
}
UserDetails.jsp<c:if test="${userModel.saveButton == 'true'}">
<input type="submit" class="btn btn-primary btn-sm" id="saveUserDetails" name="method" value="Save">
</c:if>
In this best way, we can achieve to hide/show button in spring mvc.
No comments:
Post a Comment