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
Subclassing objects
JohnL
I have an object that is an orphan of the Lliapi:Document (I also have a corresponding webnode that is an orphan of WebDoc:Document) I'm having trouble with the View and Download actions, all the other actions work, but when I try to view or Download the document I get an "Invalid Action Specified" error. When I debug it, I see that the action the url is calling is not being returned from the WebNode.WebNodeActionMultiMap for my object type, but is returned for the regular document.(I see this by debugging the call to my webnode's Action() method). Since it's an orphan of document, I don't understand why the action isn't valid for my object. Also this doesn't seem like it would be necessary, I've also set the fProxySubtype to document's subtype. Any suggestions on why these actions wouldn't be working?Thanks, Dawn
Find more posts tagged with
Comments
JohnL
I sent an email a couple of days ago describing some problems with a node I created by orphaning LLIAPI.Document. Specifically, I was unable to View or Download my new node. I was able to solve the problems I described in my previous email by doing two things:1) In my new Document WebNode object I modified the Action method, replacing the line for i in { Undefined, .fSubtype }with for i in { Undefined, .fSubtype, $ApplTypeDocument}in the following context://for i in { Undefined, .fSubtype }for i in { Undefined, .fSubtype, $ApplTypeDocument} for webNodeAction in actionMultiMap.Get( i ) actions.RegisterItem( webNodeAction, \ webNodeAction.OSName ) endendThis returns all the actions registered to my subtype as well as the document's subtype. Doing this gave me the Download functionality, but I was still having trouble with the View action. When I looked at the View Cmd that was being called by the regular Document class, I saw that it had a Nodetype specified of $ApplTypeDocument. Orphaning this command and changing to Nodetype to my subtype supplied me with a View command I was able to use with my node. Making these changes left me confused about how object inheritance really works in livelink. Since my class is an orphan of the regular Livelink Document class, (and its ApplTypes include Document), I expected it to inherit the actions of the Document class. The Documentation in the Action() method on the WebNode object explicitly says that subclasses are not to override the method, but I had to override it to get the document actions. I have 3 questions:1) Am I doing something wrong? Do you really lose inheritance of actions when you create a new class with a different subtype? 2) Shouldn't WebNode.Action() be looking up actions based on Appltypes, not the subtype?3) Similarly, shouldn't WebNodeCmd.Nodetype() have a list of Appltypes, not the subtype? Thanks, Dawn