Framework Level Hidden Command Changes Context

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
caseywhite
Posts: 192
Joined: Thu May 26, 2016 1:17 am

Framework Level Hidden Command Changes Context

Post by caseywhite »

If you run a framework level hidden command that is on the tool bar the context of where you are is changed to framework home. If it is a hidden command my expectation is that it should leave you where you are and simply run the hidden command. The hidden command is supposed to show another web site in another tab so changing the context of where the user is at means the user has to go back to where they are at. I supposed you could always remember where you were in terms of what application and switch the user back but it would be nice for the framework not to switch the context. Is there a work around to this besides issuing a switch to send the user back to where they were?
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: Framework Level Hidden Command Changes Context

Post by MarkD »

That sounds wrong to me, could you report it please?

A possible circumvention is to enable the hidden command definition into each application as an application level command, reusing the same command handler.

Then in filters or commands handlers that want to execute it you could use this generic code:

#AVFRAMEWORKMANAGER.avSwitch Toobjectnamed(#AssociatedVF_FP002O.uUserObjectType) Execute(THEHIDDENNCOMMAND) Caller(#COM_OWNER)

so that they execute the command within the current application (pane).
caseywhite
Posts: 192
Joined: Thu May 26, 2016 1:17 am

Re: Framework Level Hidden Command Changes Context

Post by caseywhite »

Looks like even if you set the command to now show in the toolbar if disabled it still shows. As a result when you put in on multiple applications you get the choice of which applications versions of "My Command" to run.

I will report both issues.
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: Framework Level Hidden Command Changes Context

Post by MarkD »

I added a hidden command to 4 applications.
It shows on the tool bar in Windows Desktop Style, but not in Material design style.
Could you post a screen show a screen shot of what you see appearing?
caseywhite
Posts: 192
Joined: Thu May 26, 2016 1:17 am

Re: Framework Level Hidden Command Changes Context

Post by caseywhite »

Here is what happens even in material design when I select a command that is marked as a hidden command. The material menu closes and then this little popup menu comes up asking which of the applications commands should be run. This occurs whether I am in the application to which one of the commands are attached or if I have signed in.
AppsWithSameCommand.png
AppsWithSameCommand.png (7.43 KiB) Viewed 12068 times
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: Framework Level Hidden Command Changes Context

Post by MarkD »

If this logic does not need a command launch button, and is invisible, why does it need to be a command handler at all?

As opposed to, say, some methods & properties in your IIP or in a custom framework manager.
caseywhite
Posts: 192
Joined: Thu May 26, 2016 1:17 am

Re: Framework Level Hidden Command Changes Context

Post by caseywhite »

I wanted to be able to call this logic at any time from anywhere in the framework so I need a button (command) that the framework shows to click on it.
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: Framework Level Hidden Command Changes Context

Post by MarkD »

This has now been changed .............. will be available in the first hotfix for EPC142005 VLF versions.

Hidden commands no longer cause any sort of busy state to be displayed, because they are by definition hidden.
Framework level hidden commands no longer cause the framework's main panel/tab to be displayed when they are executed.
caseywhite
Posts: 192
Joined: Thu May 26, 2016 1:17 am

Re: Framework Level Hidden Command Changes Context

Post by caseywhite »

Great. Thanks for the update.
Post Reply