@Override
protected void encodeAllChildren(
FacesContext context, UIComponent component) throws IOException
{
ResponseWriter rw = context.getResponseWriter();
RenderingContext rc = RenderingContext.getCurrentInstance();
FacesBean bean = getFacesBean(component);
ShuttleInfo shuttleInfo = _getShuttleInfo(rc);
ContainerInfo containerInfo = _getContainerInfo(rc, _isLeading);
rw.startElement("table", null);
OutputUtils.renderLayoutTableAttributes(context, rc, null, null);
// Render the filter, if needed
if (_isLeading)
{
UIComponent filter = getFacet(component,
CoreSelectManyShuttle.FILTER_FACET);
if (filter != null)
{
_startRow(context, 3);
encodeChild(context, filter);
_endRow(context, rc, _DEFAULT_FILTER_HEIGHT);
}
}
_startRow(context, 1);
delegateRenderer(context,
rc,
component,
bean,
_list);
if (!_isLeading && isReorderable())
{
rw.endElement("td");
renderReorderButtons(context, rc, bean, containerInfo.id);
rw.startElement("td", null);
}
boolean hasLeadingDesc = getLeadingDescShown(bean);
boolean hasTrailingDesc = getTrailingDescShown(bean);
boolean hasDescArea = hasLeadingDesc || hasTrailingDesc;
_endRow(context, rc, 0);
if (hasDescArea)
{
// Write out a spacer row beween the list and the description
_startRow(context, 1);
_endRow(context, rc, 8);
_startRow(context, 3);
rw.startElement("span", null);
renderStyleClass(context, rc, SkinSelectors.INSTRUCTION_TEXT_STYLE_CLASS);
String label = rc.getTranslatedString(_SELECT_MANY_DESCRIPTION_LABEL_KEY);
rw.writeText(label, null);
rw.endElement("span");
rw.startElement("div", null);
rw.endElement("div");
rw.startElement("textarea", null);