Hello I am here to ask your help following a difficult i meet in my project .Your different point of vue are welcome. I am using primefaces Schedule to perform a given task but I don't know how I can pass a parameter to my backing bean.I would like to use this parameter in backing bean when a schedule event triggered like SelectEvent or dateSelect . For example if I have a parameter personeID I would pass this parameter to the bean so that when actionListener will activate this setting can be initialized in the bean so that I can use. that my code
<p:schedule id="schedule" value="#{inscrireAgendaBean.eventModel}" widgetVar="myschedule" process="@form" axisFormat="HH:mm" columnFormat="dddd D/MM" firstHour="08" locale="fr" timeZone="GMT+1" timeFormat="HH:mm">
<p:ajax event="dateSelect" listener="#{inscrireAgendaBean.onDateSelect}" update="eventDetails" oncomplete="PF('eventDialog').show();" />
<p:ajax event="eventSelect" listener="#{inscrireAgendaBean.onEventSelect}" update="eventDetails" oncomplete="PF('eventDialog').show();" />
</p:schedule>
I just want to know if there is a possibility to add a parameter to my bean when eventSelect or dateSelect triggered Thank you !!!
I understand from your question that you want to triger a listener when you select an event, so you have to add a
p:ajaxwith aeventSelectevent :and on you managedBean the
onEventSelectmethod will be as follows:so
getObject()will allow you to retrieve informations like personeID, and depends if you actually put personelID when you first created the event withevent = new DefaultScheduleEvent()to add an event by selecting a date on a schedule, you use
p:ajaxwithdateSelectevent:this will show up a dialog, you can put any information you want to add to the event, the user will enter it, so no need to pass any parameters.