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
Sub Menu Function Menu
Drane_Matthew
How can you accomplish adding a command to the function menu as a sub menu, similar to the Info sub menu. I would like to add several new commands to the menu, but don't want it to stretch the main menu too long. Thanks.
Find more posts tagged with
Comments
Philip_Schneider_(x-kpmgbe011_-_(deleted))
Any answers here ?I?m also interested in that topic.
Martin_Gäckler
Matthew,That is not possible unless you write your own applet and include it in an own browseview.html.Martin
Claudia_Meyer
Message from chris meyer via eLinkHi Mathew,Have a look at the attached screenshot. Is this what you mean?.This isn't a standard thing to accomplish. Whenever you hit the down-arrow on a Java function menu, the Java applet makes a Livelink request of the form: ?func=ll&objAction=FunctionsMenu&objId=29041&nextURL=...which returns the available command names, url, and sort order to the applet. Unfortunately, this request handler is not generic enough for adding new arbitrary sub-menus, as you would like. I suggest you research this request handler and implement a generic way to register new sub-menus to which new WebNodeCMDs can be registered (by editing the _CMDTypes() function of the WebNodeCMD).I hope this helps you get started. cheers, chriseLink Discussion: Development Discussion wrote:>Sub Menu Function Menu>Posted by Drane, Matthew on 05/19/2003 03:05 PM>>How can you accomplish adding a command to the function menu as a sub menu, similar to the Info sub menu. I would like to add several new commands to the menu, but don't want it to stretch the main menu too long. >>Thanks.>>[To reply to this thread, use your normal e-mail reply function.]>>============================================================>>Discussion: Development Discussion>
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=786303&objAction=view>>Livelink
Server:>
https://knowledge.opentext.com/knowledge/livelink.exe>>>
; >
Drane_Matthew
Hi Chris,Yes, the screen shot you attached is exactly the type of functionality I'm looking for.I will take a look at the request handler you noted and see what I can find.Since the function menu by documentation anyway includes sub menu functionality and can be implemented, it might be nice in the future to expose it through the standard request handler. As much as sub menus can be overwhelming, I'm finding it necessary to research because the function menu can become very extensive when you have a few modules that add functionality through the Function menu. Take just core Livelink, add RC/Explorer/Elink to name a few and the menu starts getting pretty long. Sub Menus would seem to be the only way to keep things under control.Thanks for getting me started. Any sample code anyone has would also be greatly appreciated.Thanks.
Finney_Bryan_(x-giantuser2_-_(deleted))
Attached is some uncommented sample code from the _SubClassExecute in the FunctionMenu webNode that I orphaned in one of my custom modules. If you have any questions please feel free to askThanksBryan FinneyGiant Eagle Inc.
Claudia_Meyer
Message from chris meyer via eLinkHi Bryan,You may want to generalize your approach by using the standard WebNodeCMD functionality of Livelink. This allows you to add new function urls to a node without having to hardcode them in the execute function.cheers, chriseLink Discussion: Development Discussion wrote:>Sample Code>Posted by Bryan, Finney on 05/29/2003 08:28 AM>>Attached is some uncommented sample code from the _SubClassExecute in the FunctionMenu webNode that I orphaned in one of my custom modules. If you have any questions please feel free to ask>Thanks>Bryan Finney>Giant Eagle Inc.>>>[To reply to this thread, use your normal e-mail reply function.]>>============================================================>>Attachment link: _subclassexecute.txt>
https://knowledge.opentext.com/knowledge/livelink.exe/3067040/_subclassexecute.txt?func=doc.Fetch&nodeid=3067040>>============================================================>>Topic
: Sub Menu Function Menu>
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=3052442&objAction=view>>Discussion
: Development Discussion>
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=786303&objAction=view>>Livelink
Server:>
https://knowledge.opentext.com/knowledge/livelink.exe>>>
; >>------------------------------------------------------------------------>>function Assoc _SubclassExecute( \> Object webNode, \> Record request )> > DAPINODE parentNode> Record parentRec>> Assoc response = ._NewResponse() > Object prgCtx = request.prgCtx> Assoc data = response.data> Record nodeRec = response.data.nodeRec = $WebNode.WebNodeUtils.NodeToWebNode( request.node )> > List myGroups = $gecust.wfutils._getmygroups(prgCtx.USession())> Assoc coreAdmin = $gecust.utils.iniUtil("gecust","AdminGroups","SelectPref","CoreAdmin")> Boolean coreAdminFlag = false> Integer group> for group = 1 to length(myGroups)> if str.stringtoInteger(coreAdmin.pref) == myGroups[group]> coreAdminFlag = true> end> end> List excludeActions> > if !coreAdminFlag> excludeActions = { \> "Edit", \> "CreateChild", \ > "Copy", \> "Delete", \> "CreateAlias", \> "Move", \> "EditConfig", \ > "Properties", \> "CreateNewsAndAttach", \> "SetNotification", \> "Download", \> "AddVersion", \ > "ReserveDoc", \> "UnReserveDoc", \> "CreateGeneration", \> "MoveProject", \ > "Permissions" \> }> request.IncludeInfo = 0> > else> excludeActions = { "CreateChild","CreateNewsAndAttach","ReserveDoc","UnReserveDoc""CreateGeneration","SetNotification" }> end> > //if request.SERVER_NAME> parentNode = DAPI.GetParentNode( request.node )> > if IsNotError( parentNode )> parentRec = $WebNode.WebNodeUtils.NodeToWebNode( parentNode )> end> > // skip the sub-menu for Properties> > if IsDefined( request.nextURL )> if IsDefined( Str.Locate( request.nextURL, "objAction=properties" ) )> excludeActions = {
@excludeActions
, "Properties" }> end> if ( coreAdminFlag ) && !( NodeRec.ExAtt2 == $ArtifactProduction )> //excludeActions = {
@excludeActions
, "manualReview" }> elseif !IsDefined( Str.Locate( Str.Lower(request.nextURL), "func=gecust.myartifacts" ) ) && !coreAdminFlag > //excludeActions = {
@excludeActions
, "manualReview" }> end> > end>> //response.data.cmds = webNode.Cmds( prgCtx, nodeRec, parentRec, excludeActions )> Object theCmd> String theCmdName> List result> Assoc item> String theNextURL = request.nextURL> Integer menuOrder = 0> List theCmdList = webNode.Cmds( prgCtx, nodeRec, parentRec, excludeActions )> Assoc userFavorites> Dynamic session = prgCtx.USession()> Assoc oneFavorite> Dynamic oneKey> Boolean isFavorite = False> Dynamic x = Assoc.FromRecord( nodeRec )> userFavorites = UAPI.PrefsGet( session.fSession, session.fUserID, 'PersonalFavoritesTabs', Assoc.CreateAssoc() )>> // Find out if the current object is already > // a favorite of the current user.> for oneFavorite in userFavorites> for oneKey in Assoc.Keys( oneFavorite.Contents )> if ( oneKey == x.DataID )> isFavorite = True> end > end> end >> List statusResult> for theCmd in theCmdList> theCmdName = theCmd.Signature()> theCmdName = theCmd.Name()> > // Show either the Make Favorite or Remove Favorite> // but not both.> if ( isFavorite && theCmd.Signature() == 'MakeFavorite' )> continue> elseif ( !isFavorite && theCmd.Signature() == 'RemoveFavorite' )> continue> end >>> if theCmd.Signature() != 'Properties'>> item = Assoc.CreateAssoc()> item.Name = theCmdName > //if theCmd.Signature() == "Delete"> //item.URL = web.escape('javascript:confirm("xx")')> //else> //item.URL = theCmd.URL( request, nodeRec, theNextURL )> //end> > if item.Name == '< Manual Review >'> > if isDefined(nodeRec.ExAtt2)> item.Name = Str.Format("< Status: %1 >", $gecust.WFUtils._getStatusNameByID( nodeRec.ExAtt2 ) )> else> item.Name = Str.Format("< Status: Unknown >") > end> > item.URL = ""> result = {
@result
, item }> > Assoc manualReview = UNDEFINED> Assoc renditionPDF = UNDEFINED> Assoc updateStatus = UNDEFINED> > //scheduler.debugbreak()> if ( coreAdminFlag ) && !( NodeRec.ExAtt2 == $ArtifactProduction )> item = Assoc.CreateAssoc()> item.Name = "My Assignments"> item.URL = "/livelink/livelink.exe?func=Personal.Assignments&workid=" + $gecust.wfutils._getIDFromWF(prgCtx,nodeRec.DataID) > item.ORder = "0.1"> manualReview = item> > if ( coreAdminFlag ) && !( NodeRec.ExAtt2 == $ArtifactProduction )> item = Assoc.CreateAssoc()> item.Name = "Update Status"> item.URL = str.format("/livelink/livelink.exe?func=gecust.updateArtifactStatus&objid=%1&parentObjID=%2",nodeRec.DataID,nodeRec.parentID)> item.Order = "0.2"> updateStatus = item> end > > elseif IsDefined( Str.Locate( Str.Lower(request.nextURL), "func=gecust.myartifacts" ) ) && !coreAdminFlag > if ( NodeRec.ExAtt2 == $ArtifactProduction )> item = Assoc.CreateAssoc()> item.Name = "Manual Review"> item.URL = theCmd.URL( request, nodeRec, theNextURL )> item.Order = "0.1"> manualReview = item> end > > else> if ( coreAdminFlag && isDefined(NodeRec.ExAtt2) )> item = Assoc.CreateAssoc()> item.Name = "Manual Review"> item.URL = theCmd.URL( request, nodeRec, theNextURL )> item.Order = "0.1"> manualReview = item> end> > if ( coreAdminFlag && NodeRec.SubType == $ApplTypeDocument )> item = Assoc.CreateAssoc()> item.Name = "Manual Render PDF"> item.URL = str.format("/livelink/livelink.exe?func=gecust.renditionpdf&objid=%1",nodeRec.DataID)> item.Order = "0.2"> renditionPDF = item > end> > if ( coreAdminFlag ) && !( NodeRec.ExAtt2 == $ArtifactProduction )> item = Assoc.CreateAssoc()> item.Name = "Update Status"> item.URL = str.format("/livelink/livelink.exe?func=gecust.updateArtifactStatus&objid=%1&parentObjID=%2",nodeRec.DataID,nodeRec.parentID)> item.Order = "0.3"> updateStatus = item> end > > end> statusResult = List.Sort( statusResult )> if Isdefined( manualReview )> statusResult = { manualReview,
@statusResult
}> end> if Isdefined( renditionPDF )> statusResult = { renditionPDF,
@statusResult
}> end> if Isdefined( updateStatus )> statusResult = { updateStatus,
@statusResult
}> end > > > elseif item.Name == 'Artifact Report'>> Assoc artifactReport = UNDEFINED> item = Assoc.CreateAssoc()> item.Name = "Artifact Report"> item.URL = theCmd.URL( request, nodeRec, theNextURL )> item.Order = "0.0"> artifactReport = item >> statusResult = List.Sort( statusResult )> if Isdefined( artifactReport )> statusResult = { artifactReport,
@statusResult
}> end > > else> item.URL = theCmd.URL( request, nodeRec, theNextURL )> result = {
@result
, item }> end>> end> end>> statusResult = List.Sort( statusResult )> result = {
@result
,
@statusResult
}> result = List.Sort( result )> > for item in result> if !isdefined(item.Order)> item.Order = Str.ValueToString( menuOrder )> menuOrder = menuOrder + 1> end> end>>> if ( request.IncludeInfo == 1 )> > theCmdList = webNode.InfoCmds( prgCtx, nodeRec )> > if ( Length( theCmdList ) > 0 )> > item = Assoc.CreateAssoc()> item.Order = Str.ValueToString( menuOrder )> item.Name = "-"> item.URL = ""> result = {
@result
, item }> > menuOrder += 1> > item = Assoc.CreateAssoc()> item.Order = Str.ValueToString( menuOrder )> item.Name = [WebNode_HTMLLabel.Info]> item.URL = ""> result = {
@result
, item }> > List infoResult> > Assoc general = UNDEFINED> Assoc specific = UNDEFINED> > > for theCmd in theCmdList> theCmdName = theCmd.OSName> > if theCmdName == ""> theCmdName = OS.Name( theCmd )> end> > item = Assoc.CreateAssoc()> > if theCmdName == 'Properties'> > item.Name = [WebNode_HTMLLabel.General]> item.URL = theCmd.URL( request, nodeRec, theNextURL )> > general = item> > elseif theCmdName == 'Info'> > item.Name = [WebNode_HTMLLabel.Specific]> item.URL = theCmd.URL( request, nodeRec, theNextURL )> > specific = item> > else > item.Name = theCmd.Name()> item.URL = theCmd.URL( request, nodeRec, theNextURL )> infoResult = {
@infoResult
, item }> end> end> > infoResult = List.Sort( infoResult )> > if Isdefined( specific )> infoResult = { specific,
@infoResult
}> end> > if Isdefined( general )> infoResult = { general,
@infoResult
}> end> > Integer subMenuOrder = 0> String menuOrderPrefix = Str.ValueToString( menuOrder ) + "."> > for item in infoResult> item.Order = menuOrderPrefix + Str.ValueToString( subMenuOrder )> subMenuOrder += 1> end> > result = {
@result
,
@infoResult
}> > end> > end>> //scheduler.debugbreak();> response.data.cmds = result> > return response> >end> >