Forums de discussion

Primefaces and p:schedule

Robert Kornmesser, modifié il y a 11 années.

Primefaces and p:schedule

Junior Member Publications: 39 Date d'inscription: 03/11/11 Publications récentes
Hi Neil and thanks for your great project.
Im currently playing around with Primefaces and the p:schedule tag.
Im wondering why i dont see any events there und did some debugging.

In Primefaces 3.3.1 - ScheduleRenderer.class on line 44 there is this check:
if(context.getExternalContext().getRequestParameterMap().containsKey(schedule.getClientId(context)))


For me it looks, like a check for a dom id in the request parameter map.
An example for the client id is "_jpfcpncuivr_A6853_j_id1:j_idt9".
However and no time an instance of RequestParameterMapImpl.class has this key. Most of the time
Map<string, string[]> parameterMap = portletRequest.getParameterMap();</string,>
returns an empty map.

My question is know. Is it an error of your Bridge not having this dom id inside the map or is it just primefaces looking for somehing which cannot be inside the map (if we stick to the standard).
thumbnail
Neil Griffin, modifié il y a 11 années.

RE: Primefaces and p:schedule

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
I just tried adding the following markup to the primefaces3-portlet applicant.xhtml composition:

<p:schedule value="#{applicantModelBean.eventModel}" />


And the following to ApplicantModelBean.java
	public ScheduleModel getEventModel() {
		ScheduleModel eventModel = new DefaultScheduleModel();  
		Date startDate = new Date();
		Date finishDate = new Date();
	        eventModel.addEvent(new DefaultScheduleEvent("Champions League Match", startDate, finishDate));  
	        return eventModel;
	}


And the event displayed OK. Can you provide some modifications to this example that would reproduce the problem you're seeing? Thanks.
Robert Kornmesser, modifié il y a 11 années.

RE: Primefaces and p:schedule

Junior Member Publications: 39 Date d'inscription: 03/11/11 Publications récentes
Hei Neil.
Problem seems to occour if the xhtml does not have any layout.
I've created a patch against current git head of primefaces3-portlet example which produces the error.

Pièces jointes:

Robert Kornmesser, modifié il y a 11 années.

RE: Primefaces and p:schedule

Junior Member Publications: 39 Date d'inscription: 03/11/11 Publications récentes
Ok Problem resolved.

<p:schedule> HAS to be inside <h:form> tag.... did not know that, since i only wanted to show events and not edit ones.....
thumbnail
Neil Griffin, modifié il y a 11 années.

RE: Primefaces and p:schedule

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
OK glad to hear it. emoticon