throw new NullPointerException();
}
if (!component.isRendered()) return;
CommandLink comp = (CommandLink)component;
UIForm parentForm = getParentForm(context, component);
ResponseWriter writer = context.getResponseWriter();
String href = RendererUtils.getCurrentUrl(context);
// <go href='"+ href +"' method='post' >
writer.startElement(Attributes.GO, component);
writer.writeAttribute(Attributes.HREF, href, null);
writer.writeAttribute(Attributes.METHOD, Attributes.POST, null);
Set inputTags = RendererUtils.getInputTags(parentForm.getChildren());
Iterator iter = inputTags.iterator();
log.debug("Form has " + inputTags.size() + " input tags.");
while(iter.hasNext()){
UIComponent inputComp = (UIComponent)iter.next();
String name = RendererUtils.getAttribute(inputComp, Attributes.NAME);
// <postfield name='" + name + "' value='$(" + name + ")' />
writer.startElement(Attributes.POSTFIELD, component);
writer.writeAttribute(Attributes.NAME, name, null);
writer.writeAttribute(Attributes.VALUE, "$(" + name + ")", null);
writer.endElement(Attributes.POSTFIELD);
}
// write hidden input to determine "submited" value on decode parent UIForm component
writer.startElement(Attributes.POSTFIELD, component);
writer.writeAttribute(Attributes.NAME, parentForm.getClientId(context) + Attributes.POSTFIX_SUBMITED, null);
writer.writeAttribute(Attributes.VALUE, "true", null);
writer.endElement(Attributes.POSTFIELD);
// write hidden input to determine "activated" value on decode commandLink
writer.startElement(Attributes.POSTFIELD, component);