Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    general query

    Hello Sir

    I am using isomorphic smartclient v10.0 for my corporate project. I have a query regarding fucntion calling. I have attached a small call back method below for reference. In the below highlighted part, when I call the showWindow fucntion it throws null reference error. It displays (TypeError: Unable to getProperty showWindow of undefined or null reference). I have a java script page called EditRegHelpDeskToDoWindow having a function showWindow (I have attached the showWindow method of EditRegHelpDeskToDoWindow.js file below). I will appreciate if you can throw some light on it. I am new user of isomorphic client. Thanks in anticipation!!

    callback: function(response, data, request) {
    if (response.status < 0) {
    console.dir(response);
    isc.warn("Error reading To-Do item.\n" + response.httpResponseText);
    }
    else if (data.length == 0)
    isc.warn(lead.ToDo.resources.notFound);
    else {
    try {
    eval("lead.ToDo.item=" + data);
    switch (lead.ToDo.item.type) {
    case lead.ToDo.Type.REG_HELP_DESK:
    lead.EditRegHelpDeskToDoWindow.showWindow(lead.ToDo.item, function() {
    lead.ToDo.doSearch();
    });

    break;
    case lead.ToDo.Type.REG_DOCUMENT:
    lead.EditRegDocumentToDoWindow.showWindow(lead.ToDo.item, function() {
    lead.ToDo.doSearch();
    });
    break;
    case lead.ToDo.Type.QUESTION:
    lead.ReassignQuestionToDoWindow.showWindow(lead.ToDo.item, function() {
    lead.ToDo.doSearch();
    });
    break;
    case lead.ToDo.Type.REG_SHIPMENT:
    lead.EditRegShipmentToDoWindow.showWindow(lead.ToDo.item, function() {
    lead.ToDo.doSearch();
    });
    break;
    case lead.ToDo.Type.REG_RESEARCH:
    lead.EditRegResearchToDoWindow.showWindow(lead.ToDo.item, function() {
    lead.ToDo.doSearch();
    });
    break;
    default:
    isc.warn("Unknown type code: " + lead.ToDo.item.type);
    }
    }


    EditRegHelpDeskToDoWindow.js:

    lead.EditRegHelpDeskToDoWindow = {
    item: {},
    callback: null,
    /*
    * Called by external code when a To-Do is to be displayed. If a callback
    * function is passed it will be invoked after the to-do has been saved.
    * It is not called if the user cancels.
    */
    showWindow: function(item, callback) {
    this.item = item;
    this.callback = callback;
    this.general.reset(true);
    this.showItem();
    this.window.show();
    }




Working...
X