on a jsp file I have the following code that is used by the page to populate the DataBean java class with some data:
<jsp:useBean id="dataBean" scope="request" class="a.b.c.DataBean"/>
The DataBean.java has the method:
public static String getOverrideOption() {
return OVERRIDE_OPTION;
}
I want to use that method on the page to enable/disable a checkbox depending on the return, this is the code on the jsp:
<tr>
<th class="light">Use old method:</th>
<td colspan="2">
<span class="radiobuttons">
<input type="checkbox" alt="Old Method" name="oldMethod"
${dataBean.oldMethod ? "checked" : ""} />
</span>
</td>
</tr>
I have tried creating a script to try and fetch the data, assign it to a variable or string and then make the string as enabled/disabled on the checkbox but so far no success.
I am not very familiar with jsp so I am trying to figure it out but no luck so far, any help would be much appreciated.