Hi.
I have a filter where I have 8 commands tabs attached. I would like to have one of the tabs to be the one show when I select an entry in the filter list. I have marked the tab as the default tab and that works the first time I open the filter and select one of the entries. But If I have navigated to one of the other tabs and then select anoteher entry in the filter list the active tab is the one from the previus entry.
Is it possible to force one of the tabs to be the activ one when a list entry is selected?
/klaus
VLF-ONE (web) V15 and default tab
Re: VLF-ONE (web) V15 and default tab
Hi Klaus
What you describe is the expected result in VLF, if you select another entry in the instance list, it will remain in the same command handler tab and just switch the value to the new entry selected... even if you close the tabs and select another entry, it will show first the last tab used.
Even if you create a custom handler, you will have a routine like this in it:
and you can see that the line #DataItem.avExecuteDefaultCommand is the one that transfer the control, but still follows the same procedure as the original instance handler. If you want to change that way you will need to request an enhancement.
Saying so, while not a perfect solution, but an easy one, is that in each of those tabs that are not the default one, you add a code like this in your uExecute (my tabs are called ONE, TWO, THREE, etc. being ONE the default one and my example was created over PSLMST so my akey was EMPNO):
This code is basically saying that if the key is different to what it was before, so if you change instance entries,
it will switch to the tab called ONE which is my default tab. It works fine. Just tested
What you describe is the expected result in VLF, if you select another entry in the instance list, it will remain in the same command handler tab and just switch the value to the new entry selected... even if you close the tabs and select another entry, it will show first the last tab used.
Even if you create a custom handler, you will have a routine like this in it:
Code: Select all
Evtroutine Handling(#VisualizedInstanceList.ItemGotFocus)
Define_Com Class(#vf_lm003O) Name(#DataItem) Reference(*DYNAMIC)
If (#COM_OWNER.UIisLocked.Not)
#DataItem <= #VisualizedInstanceList.CurrentItem.RelatedReference *As #VF_LM003O
* Make this the current item
#DataItem.avIsCurrent := True
* Execute any default command
#DataItem.avExecuteDefaultCommand
Endif
EndroutineSaying so, while not a perfect solution, but an easy one, is that in each of those tabs that are not the default one, you add a code like this in your uExecute (my tabs are called ONE, TWO, THREE, etc. being ONE the default one and my example was created over PSLMST so my akey was EMPNO):
Code: Select all
Mthroutine Name(uExecute) Options(*REDEFINE)
#COM_ANCESTOR.uExecute GotoFreeState(#GotoFreeState) SwitchCallerReference(#SwitchCallerReference)
#EMPNO := #Com_Self.avAssociatedInstance.avAKey1
* * * * * START OF THE CODE
Invoke Method(#AVFRAMEWORKMANAGER.avRestoreValue) WithID1("EMPLOYEE") ToAValue(#STD_STRNG)
If (#STD_STRNG *NE #EMPNO)
* this is a different instance value, lets switch to default
Invoke Method(#AvFrameworkManager.avSaveValue) WithID1("EMPLOYEE") FromAValue(#EMPNO)
#avFrameworkManager.avSwitch Caller(#COM_OWNER) ToObjectNamed("OBJECTONE") Execute("ONE")
Endif
* * * * * END OF THE CODE * * * * *
Endroutineit will switch to the tab called ONE which is my default tab. It works fine. Just tested
Re: VLF-ONE (web) V15 and default tab
hi Dino.
I have add this code to ofmy handler: #avFrameworkManager.avSwitch Caller(#COM_OWNER) Execute("Forside") ToObjectNamed("OBJECTFORSIDE")
And the settings on the tab "Forside"
But it gives me the error that OBJECTFORSIDE in not.......
/Klaus
I have add this code to ofmy handler: #avFrameworkManager.avSwitch Caller(#COM_OWNER) Execute("Forside") ToObjectNamed("OBJECTFORSIDE")
And the settings on the tab "Forside"
But it gives me the error that OBJECTFORSIDE in not.......
/Klaus
- Attachments
-
- forside.PNG (41.5 KiB) Viewed 12295 times
-
- ObjectForside.PNG (5.16 KiB) Viewed 12295 times
Re: VLF-ONE (web) V15 and default tab
The one you are pointing will be the tab identification i think.
You want to use the Object name, assigned to the Command Definition, which most likely is FORSIDE in your case. (ONE in mine)
Where you find that? Well, from the commands allowed, you can see the commands and their Singular Name. the actual name assigned to the object is what I highlighted in yellow, not the one in blue:
And the ID was assigned when you created the command, so if you click COMMAND DEFINITIONS button at the bottom right of the screen:
you will find it and can change it:
You want to use the Object name, assigned to the Command Definition, which most likely is FORSIDE in your case. (ONE in mine)
Where you find that? Well, from the commands allowed, you can see the commands and their Singular Name. the actual name assigned to the object is what I highlighted in yellow, not the one in blue:
And the ID was assigned when you created the command, so if you click COMMAND DEFINITIONS button at the bottom right of the screen:
you will find it and can change it:
Re: VLF-ONE (web) V15 and default tab
and the object name is here:
Re: VLF-ONE (web) V15 and default tab
Hi Dino.
It worked - thanks
/klaus
It worked - thanks
/klaus