Content Management and Capture

Content Management and Capture

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
Expand all | Collapse all

Set Field value after open document for edit

  • 1.  Set Field value after open document for edit

    Posted Sun April 04, 2021 12:12 PM

    I have to set the value of 3 fields by user edit the document (the document saved by entry template) in only 1 desktop and only in 2 cases.

    First case: while the user press Edit on the search resultSet item Properties Pane(ecm.widget.ContentListEditPane i think).

    Second Case: after opening the document on the viewer By press double click on the Item in the result set, the viewer will open and then press "view properties"(it is enter automaticly to edit attribute mode).

    All 3 are an EDS filteringSelect Dependent Attribute fields(so if it is enough to reset the value on one field, an then the EDS will call autammaticly and reset the 2 more as they related to each other.It must to happen on client side, after the onLoad or onCompleatRendering was finished, cause i try to use the server side, and the sync between EDS and server side and Client EntryTemplate Side make a problem and dose not reflect all the time in the screen and it can't be done that way).

    i try to use this code on blank plugin, by added this on the global plugin JS.

    aspect.around(ecm.widget.ContentListEditPane.prototype,"onCompleteRendering",function(originalFunction){

    var item =this.itemPropertiesPane.getItem();

    item.setValue("DocType",2);

    }})

    but nothing heppen or reflect to the field value.

    I also did not found the way to enter by code to the event when the user open the Doc by viewer and press "ViewProperties" button.

    (LayoutPropertiesPane "onCompleteRendiring" dose not enter as i excepted ).



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 2.  RE: Set Field value after open document for edit
    Best Answer

    Posted Wed April 07, 2021 03:45 AM

    Hi,

    The aspect.around overwrites ICN methods and may break ICN functions which is not suggested. You may try aspect.after like below for the two cases.

    aspect.after(ecm.widget.ContentListEditPane.prototype, "onLoaded", function() {

    this.itemPropertiesPane._commonProperties.setPropertyValue("DocType", 2);

    this._setIsDirty(true);

    });

    aspect.after(ecm.widget.viewer.ContentViewerEditPaneTab.prototype, "onLoaded", function() {

    this.itemPropertiesPane._commonProperties.setPropertyValue("DocType", 2);

    this._setIsDirty(true);

    });

    Note that customization using private methods or variables is not officially supported. So please be careful when customizing. If you want to raise an enhancement request for this, please contact your support.

    Regards,

    Angie



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 3.  RE: Set Field value after open document for edit
    Best Answer

    Posted Wed April 07, 2021 07:41 AM

    Thank you, the ContentListEditPane, "onLoaded" is working,

    but some reason the ContentViewerEditPaneTab "onLoaded" dose not enter to the code while open the viewer and press "view properties" , Do you know why?



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 4.  RE: Set Field value after open document for edit
    Best Answer

    Posted Wed April 07, 2021 11:01 AM


  • 5.  RE: Set Field value after open document for edit
    Best Answer

    Posted Wed April 07, 2021 11:24 AM


  • 6.  RE: Set Field value after open document for edit
    Best Answer

    Posted Wed April 07, 2021 11:34 AM

    I check now on version 3.0.9,while press viewer view properties it enter once to ContentListEditPane onLoaded, and one time to ContentViewerEditPaneTab ,

    i think on version 3.0.9 it is ok to use ContentListEditPane on both cases, thank you




    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 7.  RE: Set Field value after open document for edit
    Best Answer

    Posted Wed April 07, 2021 12:23 PM

    You're welcome. Let me know if there are any other questions.​



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration