return clientId + FIELD_SUFFIX;
}
protected void encodeButton(FacesContext context, UIComponent component) throws IOException {
FacesContext currentInstance = FacesContext.getCurrentInstance();
DropDownComponent fieldComponent = (DropDownComponent) component;
ResponseWriter writer = context.getResponseWriter();
// get all ids (main, button, popup)
String clientId = fieldComponent.getClientId(currentInstance);
String buttonId = clientId + BUTTON_SUFFIX;
writer.writeAttribute("nowrap", "nowrap", null);
// Render drop down button
writer.writeAttribute("id", buttonId, null);
writer.writeAttribute("align", "center", null);
writer.writeAttribute("valign", "middle", null);
writeAdditionalButtonAttributes(context, writer, fieldComponent);
String imageUrl;
if (fieldComponent.isReadonly()) {
String disabledButtonImageUrl = (String) fieldComponent.getAttributes().get("disabledButtonImageUrl");
imageUrl = Resources.getURL(context, disabledButtonImageUrl, null, "input/disabledDropButton.gif");
} else {
String buttonImageUrl = (String) fieldComponent.getAttributes().get("buttonImageUrl");
imageUrl = Resources.getURL(context, buttonImageUrl, null, "input/dropButton.gif");
}
writer.startElement("img", fieldComponent);
writer.writeAttribute("id", buttonId + "::img", null);
writer.writeAttribute("src", imageUrl, null);