Is the closing parenthesis"()" at the end of the following line of code
correct?

*AbstractGrid#*getInitializationJavascript()
{
.......
sb.append("})*()*;\n");
........
}
I have a link in the data grid to call a modal window,it is not working
with this closing parenthesis, it is good if I removed it. But the Grid
header resize function is not working.

Chrome complaining as a script error in the Ajaxcall with the symbol "()",

Any help?


*Method from AbstractGrid.java*

private String getInitializationJavascript()
{
AppendingStringBuffer sb = new AppendingStringBuffer(128);
sb.append("(function() {\n");

// initialize the columns
sb.append("var columns = [\n");
Collection<IGridColumn<M, I, S>> columns = getActiveColumns();
int i = 0;
for (IGridColumn<M, I, S> column : columns)
{
++i;
sb.append("  {");
sb.append(" minSize: " + column.getMinSize());
sb.append(", maxSize: " + column.getMaxSize());
sb.append(", id: \"" + column.getId() + "\"");
sb.append(", resizable: " + column.isResizable());
sb.append(", reorderable: " + column.isReorderable());
sb.append("  }");
if (i != columns.size())
{
sb.append(",");
}
sb.append("\n");
}

sb.append("];\n");

// method that calls the proper listener when column state is changed
sb.append("var submitStateCallback = ");
sb.append(submitColumnStateBehavior.getCallbackScript());
sb.append("\n");

// initialization
sb.append("InMethod.XTableManager.instance.register(\"" + getMarkupId() +
"\", columns, submitStateCallback);\n");
*sb.append("})();\n");// issue is here with the "()"*
System.out.println("sb.toString():"+sb.toString());

return sb.toString();
}

Thanks.

Reply via email to