Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
How do I whistle up a PrgSession context object?
Robert_Davies_(unlondonadmin_-_(deleted))
Hi.I have created a new node type which, whilst it is not strictly a container, does have a meaningful size.Looking at browseview.html I can see that the "Size" column, in say the enterprise workspace contents list, is generated by a call to WebNode.Size()However to generate the result I need access to the pExtendedData of the node, which is not part of the data passed to the Size() method. I do get passed the DataID though, so I can call DAPI.GetNodeByID() to return the node.However although the request handler calling that script has a PrgSession object 'prgCtx', it doesn't pass it as a parameter to that script. So I cannot obtain the DSession object required for the call to GetNodeByID().So my problem is either (a) how do I refer to the PrgSession object in my callers scope? Or (b) how do I whistle up my own PrgSession object?I have looked at PrgSession.CreateNew() but that also requires information that doesn't seem to be available to me in the Size() method.Can anyone help me out?Best regards/matt.
Find more posts tagged with
Comments
Application_Services_FUJITSU_(fuji_ware05_-_(delet
You don't have a prgctx in you browsview.html???Look to the first line.. the first parameter that is passed, is ..... prgctx...Hope this solves your problemKind regardsJohan Raedemaekermailto:jraedemaeker@switch.be
Robert_Davies_(unlondonadmin_-_(deleted))
Hi Johan.Please forgive me if i've misunderstood your reply, i've just stepped off a plane from Cleveland so i'm probably a bit jetlagged.On re-reading my original message I can see that it is a bit confused. Let me try and clarify:My goal is to have a folder's item-list display a meaningful value for the 'size' of my custom node type, this size being dependent upon data stored in the extendedData area of the custom node. In 'browseview.html' there is section of code which displays the item-list of the folder, workspace, etc... This code calls the Size() method of the WebNode of each item to display a string like "3 items", "2 Sub-Projects", "" and so on.I am attempting to override the Size() method in my custom WebNode to return a meaningful value, however to do this it requires access to the extended data area of my LLNode subclass.Although BrowseView.html has a Program Session object passed as a parameter AFAIK it's scope is local to BrowseView template and it cannot be seen by my Size() method.So my problem is one of:1) How can I reference variables which are local to my callers scope?2) How can I create a new reference to an existing program session object?3) How can I create a new program session object?Any further help or clarification you can give me would be much appreciated.Best regards/matt.
Christina_Pultrone_(x-nasalewisadmin_-_(deleted))
Hi Matt, I asked the exact same question to OpenText support for exactly the same reason a couple of weeks ago. Here is what they told me: Since a DAPINode or a contextis not passed to the Size script, we are limited in what we can do. We haveabout 3 options.1) Setup a global object that will allow you to connect to a DapiSession.2) Save the information required to create a DAPISession as globals. Thenuse the global values to create a new DAPI Session.3) Store your information within variables that are passed into the SizeScript. This would be columns within DTREE, such as EXATT1.The Size script usually does not require the dapinode, so it usually is notpassed into the script.What I finally did was calculate the size for the Item when it was created or updated and I put that value into the EXATT1 column. Then in the Size method I just read it out from there. It seemed like the easiest and cleanest thing to do. Globals always scare me! Funny that you mentioned being in Cleveland since you helped me last week via e-mail with fixing the links on your site. I am in Cleveland !
Robert_Davies_(unlondonadmin_-_(deleted))
Hi HerbThanks for the conformation about using EXATT1, it looks like we are on a wavelength! I think I will do the same and see what happens. Does anyone from OpenText want to give me dire warnings of the consequences?I remember seeing a big building with NASA painted on it as I took off from Hopkins yesterday. Was that you? :)Best regards/matt.
Dylan_Wright_(xisdylan_-_(deleted))
Why not duplicate GimmeAPrgCtx from the DBWizAPISubsystem... it requires some connection info which can be whistled up from $LLIApi.DbInfoPkg.Findrec($Kernel.SystemPreferences.GetPrefGeneral( "DftConnection" ) ), together they give you a sort of prgctx generator which requires no input... give me a mail if you have questions.dylan@xisinc.com
Robert_Davies_(unlondonadmin_-_(deleted))
Hi DylanThank you, that sounds like an interesting approach.matt