Hey guys,
me again. Quick question, maybe some of you already have something like this.
Im using a listform-component to show a few records of my servers like this:
What i want now, is a “simulated” record “+ ADD” like this:
I tried to play with some css divs but didnt get it to work.
Do i have to add a “empty” record in my foundset and then use the isVisibleDataProvider for the elements etc. Or is there a better, cleaner way?
thanks!
Hi,
For these kind of use cases I use the “Custom List” component.
There you can add custom entries to the component (see entry as an object with data)
The data in the entry is rendered by a render function, where you need to write the html yourself.
In this case you can think of 2 types of entries:
- entries with the data of the record you want to display
- the ‘add record’ entry
Based on the type you can let the render function display your data as you like.
The Custom List performs really well as the only data transfer are the entries and a one-time-push of your render function to the client.
The rendering happens client-side, so be aware of this while writing your logic: you can’t use Servoy functions.
Hope this helps
Hi Marc,
thanks for you input. I didnt even think about the customList for this usecase. Its definitly a another aproach for it, thanks!