* @exception JspException if a JSP exception has occurred
*/
public int doEndTag() throws JspException {
HttpServletRequest request = (HttpServletRequest) this.pageContext.getRequest();
IDataComposer dataComposer = HDIVUtil.getDataComposer(request);
// Acquire the select tag we are associated with
SelectTag selectTag = (SelectTag) findAncestorWithClass(this, SelectTag.class);
if (selectTag == null) {
// This tag should only be nested in an select tag
// If it's not, throw exception
JspException e = new JspException(messages.getMessage("optionTag.select"));
TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
String cipheredValue = dataComposer.composeFormField(selectTag.getProperty(), value, false, null);
// If there isn't any content in the body of the tag option, and there isn't
// any value for the property key, the value of the property value is shown.
// This is, the encoded value is shown. That is the reason why we store the
// plain value, without encoding.