We are actually encountering an error when trying to open a RadWindow.
Markup:
<
rad:RadWindowManager ID="rwmDocumentStatus" runat="server" Skin="Office2007" ClientCallBackFunction="CallBackFunctionDocumentStatus"
OnClientShow="OnClientShowDocumentStatus"
OnClientClose="OnClientCloseDocumentStatus">
<windows>
<rad:RadWindow ID="rw_StatusSelection" runat="server" Width="400px" Height="275px" NavigateUrl="./UserControls/SubDialogs/DocumentStatus.aspx"
Modal="True" Left="" Title="" Top="" />
</windows>
</rad:RadWindowManager>
On Button Click we first this javascript function:
function
ShowSaveOptions()
{
var oWnd = window.radopen(null, "rw_StatusSelection");
if (oWnd.GetUrl())
oWnd.SetUrl(oWnd.GetUrl());
else
{
OnClientShowDocumentStatus(oWnd);
oWnd.SetUrl(radWindowNavigateURL);
oWnd.SetHeight(275);
oWnd.SetWidth(400);
oWnd.OnClientClose =
"OnClientCloseDocumentStatus";
}
}
On the line "var oWnd = window.radopen(null, "rw_StatusSelection") the error
"Sys.InvalidOperationException: Two components with the same id 'rw_StatusSelection' cant be added" is thrown.
There is only one RadWindow with that ID. So I debugged the code and saw that the error is thrown by this piece of code (Microsoft.Ajax.js.debug).
function
Sys$_Application$addComponent(component) {
/// <param name="component" type="Sys.Component"></param>
var e = Function._validateParams(arguments, [
{name:
"component", type: Sys.Component}
]);
if (e) throw e;
var id = component.get_id();
if (!id) throw Error.invalidOperation(Sys.Res.cantAddWithoutId);
if (typeof(this._components[id]) !== 'undefined') throw Error.invalidOperation(String.format(Sys.Res.appDuplicateComponent, id));
this._components[id] = component;
}
Environment Info:
There is a RadEditor in a TabPanel. When the button is clicked the user tries to update/insert a new article, which was writtein the RadEditor. On the Save Button click the radwindow should be opened and a special state has to be selected how the article should be saved. The Radwindow works fine when we start with an empty RadEditor. But when we update an article (when the Editor was filled with text at page load) the mentioned error is thrown. In both cases (new and filled editor) the button click is executing the same code.