dkim18
asked on
call another function from jsp using jstl tag?
Hi,
I have this domain object. Which I am calling from a jsp page.
It is a boolean and When I display it, I would like to convert it to a string so it prints yes or no.
Is there a way to call, getTagIDText() instead?
<tr><td>Tag ID</td><td><c:out value="${myItems.tagID}" /></td></tr> <=== this return 1 or 0
I have this domain object. Which I am calling from a jsp page.
It is a boolean and When I display it, I would like to convert it to a string so it prints yes or no.
Is there a way to call, getTagIDText() instead?
<tr><td>Tag ID</td><td><c:out value="${myItems.tagID}" /></td></tr> <=== this return 1 or 0
boolean tagID;
public boolean getTagID() {
return tagID;
}
public void setTagID(boolean tagID) {
this.tagID = tagID;
}
public String getTagIDText(){
if (tagID){
return "Yes";
} else {
return "No";
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER