Hello,
when I click a timelineEvent it gets selected and ajax is fired (event="select").
Now, I want to select the same event and get the ajax fired once more - but the event is already selected and no action is performed.
In my case one solution could be to clear the selection after the first ajax is completed -> thus the question:
on a timeline - how can one clean the selection from bean? (and/or javascript)
Regards,
Herbu
PrimeFaces Extention 2.1.0
timeline - clear selection
AFAIK,there is no unselect client side API function available.But you can unselect the event by clicking outside of the target event.In your case,You can use clear method on TimelineUpdater Server side API.Check this example.http://www.primefaces.org/showcase-ext/ ... Server.jsf
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/
___________________
Sudheer Jonna
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/
___________________
Sudheer Jonna
Hi sudheer,
some kind of workaround that did work for me (maybe sb. will be interested):
bean:
TimelineModel model;
...
timelineUpdater = TimelineUpdater.getCurrentInstance( ((Timeline) this.selectedEvent.getSource()).getClientId() );
model.delete( selectedEvent.getTimelineEvent(), timelineUpdater );
model.add( selectedEvent.getTimelineEvent(), timelineUpdater );
In my case I have stacked events and adding an event looks kind of strange for a user. So additionally I added:
<pe:timeline ....
animate="false" />
Regards,
herbu
some kind of workaround that did work for me (maybe sb. will be interested):
bean:
TimelineModel model;
...
timelineUpdater = TimelineUpdater.getCurrentInstance( ((Timeline) this.selectedEvent.getSource()).getClientId() );
model.delete( selectedEvent.getTimelineEvent(), timelineUpdater );
model.add( selectedEvent.getTimelineEvent(), timelineUpdater );
In my case I have stacked events and adding an event looks kind of strange for a user. So additionally I added:
<pe:timeline ....
animate="false" />
Regards,
herbu
Thats great.Have you tried with clear instead delete operation?
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/
___________________
Sudheer Jonna
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/
___________________
Sudheer Jonna
There is "unselectable" attribute:
"If true, you can unselect an item by clicking in the empty space of the timeline. If false, you cannot unselect an item, there will be always one item selected. Default is true."
AFAIK, there is also server-side method "unselect" in TimelineUpdater / Model.
"If true, you can unselect an item by clicking in the empty space of the timeline. If false, you cannot unselect an item, there will be always one item selected. Default is true."
AFAIK, there is also server-side method "unselect" in TimelineUpdater / Model.
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 12 guests