I have a checkbox as follows in a jsp:
<s:checkbox theme="simple" name="ticket.ccUpdateFlag" id="ticket.ccUpdateFlag"
/>
Once a user selects the checkbox and submits the form, ccUpdateFlag is set to
true. However, on the database side the value is stored as 'Y' or 'N' . So my
getCcUpdateFlag returns 'Y' or 'N' depending on the fact ccUpdateFlag is set to
true or false.
Now on a different page (say update/vie page), I have the same exact check box.
I have been trying to map 'Y' to "fieldValue=true" unsuccessfully so far. I
have tried the followings:
<s:checkbox theme="simple" name="ticket.ccUpdateFlag" id="ticket.ccUpdateFlag"
<s:if test="ticket.ccUpdateFlag='Y'">filedValue="true"</s:if> />
This breaks the page and the page does not even compile, I get invalid jsp
exception..
I then went to my bean and added the following method:
public boolean isCCUpate(){
return "Y".equals(getCcUpdateFlag());
}
I then tried to use the following:
<s:checkbox theme="simple" name="ticket.ccUpdateFlag" id="ticket.ccUpdateFlag"
fieldValue="<s:property value='ticket.CCUpate'/>" />
This would also fail, looking at generated html, here is what is generated:
<input type="checkbox" name="ticket.ccUpdateFlag" value="<s:property
value='ticket.CCUpate'/>" id="ticket.ccUpdateFlag"/>
<input type="hidden" name="__checkbox_ticket.ccUpdateFlag"
value="<s:property value='ticket.CCUpate'/>" />
Is there a way that I can have checkbox fieldValue="true" if
"ticket.ccUpdateflag == 'Y'.
__________________________________________________________________
Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo!
Canada Messenger at http://ca.beta.messenger.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]