Announcement

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

    relogin error when accessing pages using createRecordComponent

    The problem is that pages which use "createRecordComponent" to generate listgrid records from a data source are not generated at "re-login". The page using such listgrid are blank and the only error reported is that the data source is null. Many attempts to delete remnant client objects have been unsuccessful.

    1. SmartClient Version: SC_SNAPSHOT-2012-02-23_v8.2p/Pro Deployment (built 2012-02-23)

    2. Firefox 11.0

    3. === 2012-06-08 13:33:21,221 [l0-3] INFO IDACall - Performing 1 operation(s)
    === 2012-06-08 13:33:21,222 [l0-3] DEBUG AppBase - [builtinApplication.DS_fetch] No userTypes defined, allowing anyone access to all operations for this application
    === 2012-06-08 13:33:21,222 [l0-3] DEBUG AppBase - [builtinApplication.DS_fetch] No public zero-argument method named 'DS_fetch' found, performing generic datasource operation
    === 2012-06-08 13:33:21,237 [l0-3] WARN DSResponse - Attempted to call getRecord() on a DSResponse with null DataSource

    4. sample code:

    Page Source where the error is happening - only pages that use createCustomRecord:

    listGrid = new ListGrid(){
    @Override
    protected Canvas createRecordComponent(final ListGridRecord listGridRecord, Integer colNum) {

    String fieldName = this.getFieldName(colNum);

    if(fieldName.equalsIgnoreCase("ALLOW_ON")){
    Img detailsImage = new Img();
    detailsImage.setWidth(32);
    detailsImage.setHeight(16);

    String permissionLevel = listGridRecord.getAttribute("PERMISSIONLEVEL");

    if(null != allowedLocations){
    if(allowedLocations.equalsIgnoreCase(PERMISSION.VIEW.toString()))
    detailsImage.setSrc("view.png");
    else if(allowedLocations.equalsIgnoreCase(PERMISSION.CREATE.toString()))
    detailsImage.setSrc("create.png");
    else if(allowedLocations.equalsIgnoreCase(PERMISSION.MODIFY.toString()))
    detailsImage.setSrc("modify.png");
    if(null != detailsImage)
    detailsImage.show();
    }
    Canvas holder = new Canvas();
    holder.setWidth(32);
    holder.setHeight(16);
    holder.addChild(detailsImage);
    return holder;
    }

    return null;

    }
    };

    listGrid.setCriteria(criteria);
    listGrid.setID(PAGE_BASE_ID + "_Permission_ListGrid");
    listGrid.setShowFilterEditor(false);
    listGrid.setCanAcceptDroppedRecords(false);
    listGrid.setPreventDuplicates(true);
    listGrid.setShowRecordComponents(true);
    listGrid.setShowRecordComponentsByCell(true);

    My biggest question is what is still in the browser that needs to be deleted after logging out so that "re-login" will work? Destroying the datasource, calling clear() on the listgrid at logout has no impact. Destroying the canvas that all widgets, canvases, and data sources are a part is also equally ineffective. What are the best practices to clean up, i.e. remove completely client objects to prevent this type of issue from happening on a "re-login"?

    #2
    Not really sure what the question means..

    The purpose of Relogin as described in the QuickStart is to preserve all the state of the application and re-issue the request that encountered a timed-out session.

    You seem to want to wipe out all this information - this is the opposite goal of Relogin and is poor user experience, but reloading the page (programmatically via window.location.reload()) is all you would need to do.

    Comment

    Working...
    X