Hello. I'm creating a dinamic carousel, so when someone clicks on "Selecionar GrupoB" button, for example, my carousel must change its pictures. I have a ListCarousel list records, whose aggregate's name is "GetCarGroupPicturesA.List", that shows current car pictures(Group A cars). My problem is that I don't know how I can change my carousel pictures dinamically, after pressing some button like "Selecionar GrupoB". I created an action called SelecionarGrupo, with "GrupoCarro" input parameter that holds the CarGroup Identifier, so when someone clicks on a button, this action is triggered and my carousel must change its pictures according to the CarGroup.
I tried to assign my aggregate GetCarGroupPicturesB.List (holds Group B car pictures) but it didn't work.
Please, anyone help me.
Xue Li wrote:
Daniel Neto wrote:
Hi if I am not mistaken, when ajax refresh is perform on the ListCarousel, the list will display based on the source list, i.e. still the GetCarGroupPicturesA.List.
You might want to have another list variable for the data to be shown. Example: CarGroupPictureList.
The source of the ListCarousel should be CarGroupPictureList.
In preparation, since you start with GetCarGroupPicturesA, you can assign CarGroupPictureList = GetCarGroupPicturesA.List.
Later on when you want to change the pictures to be display, execute the GetCarGroupPicturesB query and assign CarGroupPictureList = GetCarGroupPicturesB.List before the ajax refresh.
Alternatively, if the aggregate GetCarGroupPicturesA & GetCarGroupPicturesB can be merge into same aggregate, you could just perform a aggregate refresh, then follow by the ajax refresh.
Hello Xue Li, I tried to do what you suggested, but it didn't work. When I click on button "Selecionar GrupoB"(or similar buttons) my carousel refreshs, but nothing displays, like this:
Here is my preparation(by default, my carousel displays GroupA car pictures):
In preparation, my assign really works properly but when I call the action "SelecionarGrupo", my carousel displays no pictures, even with refreshing it. This is my action flow:
My input parameter "GrupoCarro" is attached to different buttons. Each button should trigger my action. Note: GrupoCarro parameter is setted according to the car group. Example: Entities.CarGroup.GroupA, the same to other buttons..
If you can help me, I would be grateful! Thank you!
Hi Daniel, I encountered the same issue following the implementation. So I tried using the ajax refresh on the carousel component instead of the list component. That works out well. Could you give it a try? :)
Xue Li, thank you so much, it really worked out!! Very good! :D
Hi Daniel,
I've come up with an approach that might be more along what you are trying to do, see attached oml, I called it TestScreenFakeDynamic
Basically,
see attached oml.
Note, don't forget to set Line Separator to None on your ListRecords
Cheers,
Nuno Verdasca
Nuno Miguel Verdasca wrote:
Nuno, despite I didn't use your solution, thank you for your reply!
The important thing is that you have found a solution to your problem. And this just proves that the community works, that there are colleagues who are always ready to help others. :)