Page 1 of 1

VF_BasicGoogleChart widget definition

Posted: Mon Jul 22, 2019 11:11 am
by MarkDale
If you need a copy of the definition of widget VF_BasicGoogleChart, used in the VLF when generating VLF-ONE Graph or Chart command handlers, it is available here:
VF_BasicGoogleChart QuickExport20190722105229.zip
(21.59 KiB) Downloaded 13 times
The compiled object is already shipped in VLF epc142057 (VF_BASICG.js)

Re: VF_BasicGoogleChart widget definition

Posted: Tue Jul 23, 2019 12:22 am
by Fromm603
MarkDale,
I am new to LANSA, Is there an easy way to incorporate a Google chart as part of the command handler, and not the entire screen area? So I want more on the screen, besides the chart, I only want the chart (a bar chart with 3 bars) to fill part of the screen. I have spent an amazing amount of time to get, what I consider, a simple function to work.
Then when I click a new item from my filter, it calls the command handler differently.
This example and EPC makes it easier for sure, but as usual, somehow doesn't fit what I need.

Re: VF_BasicGoogleChart widget definition

Posted: Tue Jul 23, 2019 10:13 am
by MarkD
When you refer to the example, do you mean you generated an example using this Common Activity?
Capture1.PNG
Capture1.PNG (11.63 KiB) Viewed 174 times
or to a precompiled shipped example i.e. one of these:

Re: VF_BasicGoogleChart widget definition

Posted: Tue Jul 23, 2019 10:21 am
by MarkD
I'm going to assume a generated graph, but the broad layout manager explanation would apply to the shipped examples just as much.

Attached is a generated example that has been modified slighty by the addition of 3 colored panels and some layout commands:

Code: Select all

Define_Com Class(#Prim_Panl) Name(#Left_Panel) Parent(#COM_OWNER) Displayposition(5) Tabposition(5) Style(#BlueBackground) Height(235) Left(4) Top(61) Width(189)
Define_Com Class(#Prim_Panl) Name(#Right_Panel) Parent(#COM_OWNER) Displayposition(4) Tabposition(4) Style(#RedBackground) Height(235) Left(480) Top(61) Width(181)
Define_Com Class(#Prim_Panl) Name(#Bottom_Panel) Parent(#COM_OWNER) Displayposition(3) Tabposition(3) Style(#GreenBackground) Height(117) Left(4) Top(296) Width(657)

Define_Com Class(#PRIM_ATLI) Name(#MainAttachmentManagerItem_Left) Attachment(Left) Parent(#MainAttachmentManager) Manage(#Left_Panel)
Define_Com Class(#PRIM_ATLI) Name(#MainAttachmentManagerItem_Right) Attachment(Right) Parent(#MainAttachmentManager) Manage(#Right_Panel)
Define_Com Class(#PRIM_ATLI) Name(#MainAttachmentManagerItem_Bottom) Attachment(Bottom) Parent(#MainAttachmentManager) Manage(#Bottom_Panel)


Define_Com Class(#Prim_vs.Style) Name(#RedBackground) Normbackcolor(Red)
Define_Com Class(#Prim_vs.Style) Name(#BlueBackground) Normbackcolor(Blue)
Define_Com Class(#Prim_vs.Style) Name(#GreenBackground) Normbackcolor(Green)
The example now looks like this:
Capture.PNG
Capture.PNG (19.64 KiB) Viewed 174 times

This adds panels to the left, right and below the graph.
You would then add your additional information to the required panels(s), which might themselves also be layout managed.

example.zip
(2.2 KiB) Downloaded 6 times

Re: VF_BasicGoogleChart widget definition

Posted: Tue Jul 23, 2019 10:24 am
by MarkD
Could you elaborate on what "Then when I click a new item from my filter, it calls the command handler differently." means?

Re: VF_BasicGoogleChart widget definition

Posted: Thu Jul 25, 2019 2:07 am
by Fromm603
Mark,
As I run the handler, I have used sys.web.alerts to show me what processes are running. So when the handler is called the first time, I understand it should do uInitalize at that time (like INZSR fr us RPG folks). But then I would expect it to run the same routines as when just clicking a new item in the filter. I'm not sure how to copy and paste my screen into this replay.

I am going to load the new EPC and try adding a Google chart that way

Re: VF_BasicGoogleChart widget definition

Posted: Thu Jul 25, 2019 8:32 am
by MarkD
In your command handler it should run uInitialize and then uExecute the first time it is executed.

As you click down an instance list of business objects in your filter it should run only uExecute - because your command handler is already open and active.

If your command handler becomes inactive (for example by executing a different command handler/tab) then uTerminate should run before it becomes inactive.

There is an option to keep a command handler active.