//
// Create the button row
//
UIComponent buttonRow = _createRow(isDesktop, XhtmlConstants.H_ALIGN_END);
CoreGoButton cancelButton =
JspUtils.createGoButton(arc, _CANCEL_LABEL_KEY);
buttonRow.getChildren().add(cancelButton);
Object cap = arc.getAgent().getCapabilities().get(
TrinidadAgent.CAP_MULTIPLE_WINDOWS);
boolean multWindowsSupported = Boolean.TRUE.equals( cap );
if (multWindowsSupported )
{
cancelButton.setOnclick("return _doCancel()");
}
else
{
// create the destination of the cancel button
StringBuffer cancelDest = new StringBuffer();
EncoderUtils.appendURLArguments(cancelDest,
destination,
new String[]{
TrinidadRenderingConstants.EVENT_PARAM,
TrinidadRenderingConstants.CANCEL_EVENT
});
// Prepend a slash, because this destination already
// includes the context root
cancelButton.setDestination("/" + cancelDest.toString());
String value = __getParam(context, TrinidadRenderingConstants.VALUE_PARAM);
if (value != null)
{
long lg = Long.parseLong(value);