Hi,
I am looking for any suggestions for coding with the EO.Web controls to get my desired results at my client end web page.
I have a single web page (application) which the client uses to perform all sorts of activities without post backs of the entire page. I have a custom Google Map control (one I wrote) and a eoMenu at the top of the screen. I have 1 eoDialog control to act as my Dialog interface to the many (about 20) different Dialogs.
Problem:
1) The user selects the Menu->EditThing
2) The OnClickScript() gets routed to my Google Map Control (in JavaScript resource) so the control can figure out what to do.
Note: It can do several things depending on other states of the Google Map Control.
- Show a FindThing dialog to get the ThingID which the application needs
- Show a EditThing dialog to actually edit the Thing with key ThingID
The Google Map Control logic will show the FindThing dialog if dose not know the ThingID, but if it does - it just shows the EditThing dialog. Note also the FindThing dialog can be called to just get a ThingID for the user with no edits (elsewhere in code).
When I show the FindThing dialog followed by the Edit Thing Dialog only the EditThing dialog shows !!
I was thinking of having the FindThing content of dialog redirect to the new dialog content on the dialog postback for the EditThing. I could pass a parameter on the dialog initialization to control the different modes of operation. But the eoDialog would have to resize depending on the content inside the dialog for each redirect. I don't think this is possible (could be wrong). I would also have to fiddle the AcceptID's to keep the dialog window open between callbacks -- a little hacky for me but I think possible.
Code sample (from my Google Map control's JavaScript):
Code: C#
proto.DoDialogShow = function (url, title, width, height)
{
gDialogResult = null;
var dlg = eo_GetObject('Dialog1')
dlg.resize (width, height);
dlg.setContentUrl(url);
dlg.show(true, title);
return (dlg.getResult());
}
proto.MenuEditThing = function () // routed here from MenuItem.OnClickScript()
{
if (this._ThingID == 0)
{ this.DoDialogShow ("/ThingFindDlg.aspx", "Lookup Thing", 382, 148));
// return if user cancels here
}
this.DoDialogShow ("/ThingEditDlg.aspx?id=" + this._ThingID, "Edit Thing", 625, 400));
}
Any suggestions ???