Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  Java call Appbean function from Databean

    Posted 08/02/21 02:03 PM

    Hi,

    I would like to call function in Appbean from Databean.

    For example:

    Appbean - psdi.cust.webclient.beans.asset.AssetAppBean

    Databean - psdi.cust.tamit.app.asset.TLOAMAssetSet

    I am trying to manipulate ControlInstance from Databean on field Action, so that when user change value UI reflect those changes (visibility, label, color...), but I can’t get WebClientSession or CurrentApplication from Databean.

    I am aware that this can be achieved using SIG and conditional properties.

    Maybe I am trying to solve problem the wrong way, so new ideas are more than welcome.

    I’ve created working python script for this, but I would like to do it using Java only

    if app == "ASSET_CUST" and interactive == True: context = UIContext.getCurrentContext() wcs = context.getWebClientSession() currApp = wcs.getCurrentApp() fldRemark = currApp.getCurrentPage().getControlInstance("fldRemark") if fldRemark != None: fldRemark.setProperty("label", "Remark") fldRemark.setProperty("rows", "10")

    Thanks






    #Support
    #SupportMigration
    #AssetandFacilitiesManagement
    #Maximo


  • 2.  RE: Java call Appbean function from Databean

    Posted 08/06/21 08:29 AM

    Every DataBean has a field "app" which returns an AppInstance object.

    This works in any UI DataBean:

    this.app.getAppBean()






    #Maximo
    #SupportMigration
    #AssetandFacilitiesManagement
    #Support