Hello guys!
Is there anyway to always show groups in p:timeline? Even if there's no event with some of these groups?
I need that because I'm using p:timeline component to implement something like an agenda, but without date, just using hours (7am to 23pm using the same random date to start and end dates) and days of the week, so the days are the groups. I'm using enumeration to the days of the week.
So, I want to keep all the values in the enumeration like a group in a p:timeline, and I want they are always visible.
Thank you!
Always show groups in p:timeline
I have answered this questions 100+ times in this forum. No, it is not possible. It is probably possible in the new vis.js script (native script for this widget, see http://visjs.org/#example). The problem is, vis.js doesn't contain all features yet which are used in the current timeline implementation. You can consider a PRO support, otherwise we don't have any needs to implement this feature currently by ourself. In short words, we will not port the current timeline impl. to the new one as long as nobody pays for that.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin
- sebargarcia
- Posts: 44
- Joined: 01 Apr 2011, 00:24
- Location: Salta, Argentina
One way i found to do this is to create invisible events for each group. It is not a solution but a kind of hack. When your timeline loads you have to create an event for each group and set for thats events this style:
Add events like this
This works also for set consistent heigth to the groups when the groups has no events. As i said it is not a good solution but works.
Code: Select all
div.invisible-item{
display: block;
visibility: hidden;
}
Code: Select all
TimelineEvent evt = new TimelineEvent(YourObject, beginDate, endDate, false, idGroup,"invisible-item");
Netbeans 8.0, Mojarra 2.1.26 , Primefaces 5, PrimeFaces Extensions 2.0.0, OmniFaces 1.8.1 , Glassfish 3.1.2.
Yes, I know about this workaround. I think some other users use the same "hack".
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin
-
- Information
-
Who is online
Users browsing this forum: No registered users and 23 guests