Hi.
I am trying to move a wam application to the new VL-WEB. In my wam I have a list of items. On each of these item entries I have a lot of fields (More than 100) some of them is not shown every time, but are depending on other fields value. On each of these entries I am also displaying 5 other lists.
In the WAM I can control much of this in the xsl.
now I want to make use of RP in the VL-web. I have tried to use a RP as tree like this: #PRIM_PANL *implements #Prim_Tree.iTreeDesign *ListFields #ListFields but there is a limit of 100 fields. And I don't know how tosend the list to this RP.
Does anybody have an idea/suggestion of how I should do this?
/klaus
VL-WEB and Complex design
-
dannyoorburg
- Posts: 177
- Joined: Mon Jan 04, 2016 9:50 am
- Location: Australia
Re: VL-WEB and Complex design
Hi Klaus,
it's hard to imagine the need for a 100 or more fields in any list construct.
What does it currently look like in the WAM? How do you intend to make it look in VL WEB.
Maybe post some screenshots so we know what you're trying to do.
Cheers,
Danny
it's hard to imagine the need for a 100 or more fields in any list construct.
What does it currently look like in the WAM? How do you intend to make it look in VL WEB.
Maybe post some screenshots so we know what you're trying to do.
Cheers,
Danny
Re: VL-WEB and Complex design
Hi.
Here are som samples and they should look nearly the same in the new application.
There is some list where we display the data, and there is a lot of Fields controlling what icons should be visible or not. and there is Fields just as output.
/Klaus
Here are som samples and they should look nearly the same in the new application.
There is some list where we display the data, and there is a lot of Fields controlling what icons should be visible or not. and there is Fields just as output.
/Klaus
- Attachments
-
- item3.png (41.65 KiB) Viewed 34078 times
-
- item2.png (38.83 KiB) Viewed 34078 times
-
- item1.png (60.17 KiB) Viewed 34078 times
Re: VL-WEB and Complex design
anybody?
/Klaus
/Klaus
Re: VL-WEB and Complex design
Hey Klaus,
You could decompose the app into multiple smaller components. I don't know if I would use a tree view in this case. Perhaps a root component with some sub components and the root gets added into a Data Table, Expanding Panel or even a PRIM_MD.List.
Regarding all the lists, do they all need to be visible at once? Can you put them in a dialog?
Unfortunately you can't send def_lists to another component, you have to send a component like a PRIM_ACOL<>. To help out with this you can use a data object as outlined in the "Passing a List of Data" section here https://docs.lansa.com/14/en/lansa017/c ... 3_0155.htm. We do this quite a bit in our VLF-ONE app where a Filter gets multiple collections (lists) from a Server Module, and then passes them to other components.
Depending on how many root components that you are showing you can asynchronously load their fields based on some given identifiers. You are going to have to do some plumbing work to hook up events and trigger the loading. This will cause a lot of hits to the Server Modules, but it may be ok in your case.
Joe
You could decompose the app into multiple smaller components. I don't know if I would use a tree view in this case. Perhaps a root component with some sub components and the root gets added into a Data Table, Expanding Panel or even a PRIM_MD.List.
Regarding all the lists, do they all need to be visible at once? Can you put them in a dialog?
Unfortunately you can't send def_lists to another component, you have to send a component like a PRIM_ACOL<>. To help out with this you can use a data object as outlined in the "Passing a List of Data" section here https://docs.lansa.com/14/en/lansa017/c ... 3_0155.htm. We do this quite a bit in our VLF-ONE app where a Filter gets multiple collections (lists) from a Server Module, and then passes them to other components.
Depending on how many root components that you are showing you can asynchronously load their fields based on some given identifiers. You are going to have to do some plumbing work to hook up events and trigger the loading. This will cause a lot of hits to the Server Modules, but it may be ok in your case.
Joe
Re: VL-WEB and Complex design
Hi Joe.
What do you mean by root Component?
And I need all the list because they decide which parts they need base on the info on these list. It could be an oil filter that is change from a production yyyymm.
Are you able to send multiple PRIM_ACOL<> to a RP? or could there be list inside a acol?
Thanks
/klaus
What do you mean by root Component?
And I need all the list because they decide which parts they need base on the info on these list. It could be an oil filter that is change from a production yyyymm.
Are you able to send multiple PRIM_ACOL<> to a RP? or could there be list inside a acol?
Thanks
/klaus
Re: VL-WEB and Complex design
Hi Klaus,
By root component I mean the composition root RP. Its the RP that holds contains the other smaller RPs and perhaps coordinates them.
I did not outline that very well, but you could visualize it like your first list entry.
In that first element, you have 3 components, the green outline, the red outline and the yellow outline. The "root" is the RP that has all three of those components.
If the lists don't have to be immediately visible you could lazy load them, such as a "click to expand" feature. I don't know your domain, but lets say they search for "oil filters" and you display a list of found oil filters. They find the type of oil filter they need, and now could select a "Production Year" to get a that specific filter for a specific year. The selection of the "Production Year" would go fetch all the years that specific filter was in production. This way you don't fetch all the production year data for every oil filter, you only fetch it for the oil filter the user is interested in.
Not being familiar with your domain, its hard to come up with a rational, real-world example.
Regarding the PRIM_<>, you can pass multiple PRIM_ACOLS<> to a component, just pass them by reference.
In this example, if you had a "root" component define and load these three collections, you can pass them into a "child" component
In the Root Component
In the Child Component
Hope this helps,
Joe
By root component I mean the composition root RP. Its the RP that holds contains the other smaller RPs and perhaps coordinates them.
I did not outline that very well, but you could visualize it like your first list entry.
In that first element, you have 3 components, the green outline, the red outline and the yellow outline. The "root" is the RP that has all three of those components.
If the lists don't have to be immediately visible you could lazy load them, such as a "click to expand" feature. I don't know your domain, but lets say they search for "oil filters" and you display a list of found oil filters. They find the type of oil filter they need, and now could select a "Production Year" to get a that specific filter for a specific year. The selection of the "Production Year" would go fetch all the years that specific filter was in production. This way you don't fetch all the production year data for every oil filter, you only fetch it for the oil filter the user is interested in.
Not being familiar with your domain, its hard to come up with a rational, real-world example.
Regarding the PRIM_<>, you can pass multiple PRIM_ACOLS<> to a component, just pass them by reference.
In this example, if you had a "root" component define and load these three collections, you can pass them into a "child" component
In the Root Component
Code: Select all
* declared in module/component scope
define_com class(#PRIM_ACOL<#ASCCHIPaymentType>) name(#PaymentTypes)
define_com class(#PRIM_ACOL<#ASCCHDCheckLine>) name(#Lines)
define_com class(#PRIM_ACOL<#ASCCHDCheckSummary>) name(#Summary)
* called from another event(perhaps Initialize or a button click etc.)
mthroutine name(LoadDataFromServer)
#Get.Execute Summary(#Summary) Lines(#Lines) PaymentTypes(#PaymentTypes) Status(#wk_Status)
endroutine
evtroutine handling(#Get.Completed)
#ChildComponent.LoadData pSummary(#Summary) pLines(#Lines) pPaymentTypes(#PaymentTypes)
endroutine
Code: Select all
mthroutine name(LoadData)
define_map for(*INPUT) class(#PRIM_ACOL<#ASCCHDCheckSummary>) name(#pSummary) pass(*BY_REFERENCE)
define_map for(*INPUT) class(#PRIM_ACOL<#ASCCHDCheckLine>) name(#pLines) pass(*BY_REFERENCE)
define_map for(*INPUT) class(#PRIM_ACOL<#ASCCHIPaymentType>) name(#pPaymentTypes) pass(*BY_REFERENCE)
* do something with each collection. maybe add to different lists
endroutine
Joe
Re: VL-WEB and Complex design
Hi Joe.
If I have my root component and i have defined a prim_md.list to hold my item list. How do I then add the child component(which i use to make the setup) to an entry in the prim_md. list?
Today I have used the prim_tree like this:
Define_Com Class(#PRIM_TREE<#FDKItemListItemLayout1>) Name(#Tree4) Displayposition(1) Left(0) Parent(ÆCOM_OWNER) Tabposition(3) Top(0) Height(800) Width(500) Visible(False)
and in the child i use
Begin_Com Role(*EXTENDS #PRIM_PANL *implements #Prim_Tree.iTreeDesign *ListFields #ListFields) Displayposition(1) Height(217) Left(0) Tabposition(1) Top(0) Width(865) Layoutmanager(#NormalLayout)
/Klaus
If I have my root component and i have defined a prim_md.list to hold my item list. How do I then add the child component(which i use to make the setup) to an entry in the prim_md. list?
Today I have used the prim_tree like this:
Define_Com Class(#PRIM_TREE<#FDKItemListItemLayout1>) Name(#Tree4) Displayposition(1) Left(0) Parent(ÆCOM_OWNER) Tabposition(3) Top(0) Height(800) Width(500) Visible(False)
and in the child i use
Begin_Com Role(*EXTENDS #PRIM_PANL *implements #Prim_Tree.iTreeDesign *ListFields #ListFields) Displayposition(1) Height(217) Left(0) Tabposition(1) Top(0) Width(865) Layoutmanager(#NormalLayout)
/Klaus
Re: VL-WEB and Complex design
Hi Klaus,
Attached is a simple demo that I just threw together. It looks like this in the IDE The page as a PRIM_TRIM<ROOTCOMP> on it. The Root Component has 2 Child Components and the Root Component tells one of the Children to do something, in this case it increments a count.
When running it looks like this Its a pretty contrived example.
But hopefully it helps some.
Joe
Attached is a simple demo that I just threw together. It looks like this in the IDE The page as a PRIM_TRIM<ROOTCOMP> on it. The Root Component has 2 Child Components and the Root Component tells one of the Children to do something, in this case it increments a count.
When running it looks like this Its a pretty contrived example.
Joe
- Attachments
-
- QuickExport20200212090328.zip
- (13.58 KiB) Downloaded 3516 times
Re: VL-WEB and Complex design
Hi Joe.
Thanks for exsample. This is pretty much what I already got.
What I want is to change the treeview to a list of a kind, so I can do something like this #ChildComponent.LoadData pSummary(#Summary) pLines(#Lines) pPaymentTypes(#PaymentTypes) for each entry in the list, so i can transfer much more info to the RP root component.
I don't know if this is possible.
/Klaus
Thanks for exsample. This is pretty much what I already got.
What I want is to change the treeview to a list of a kind, so I can do something like this #ChildComponent.LoadData pSummary(#Summary) pLines(#Lines) pPaymentTypes(#PaymentTypes) for each entry in the list, so i can transfer much more info to the RP root component.
I don't know if this is possible.
/Klaus