You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Arinaya <ar...@realidea.ca> on 2004/11/19 02:05:47 UTC

RE: Problems with inputCalendar

It looks like someone else had the same problem recently (below).
Strangely enough, even when I switch back to server-side state saving, I
still get the same error about duplicate component IDs. Although it worked
before.
 
Anyone have any ideas? I'm stumped. I've spend hours stepping through jsf
code and trying different settings and I can't get the calendar to work. If
Rana is still on the list, did you ever get it working?
 
Thanks,
Arinaya
 
 
Hello All,

I'm new to this forum. I want to know how can I

integrate the Calendar component in my JSF

application.



So far I tried to follow these steps:



(1) I've put myfaces-components.jar in the WEB-INF\lib

directory.



(2) In the jsp page defined the taglibs:



<%@ taglib uri="http://java.sun.com/jsf/html"
<http://java.sun.com/jsf/html%22> ;

prefix="h" %>

<%@ taglib uri="http://java.sun.com/jsf/core"
<http://java.sun.com/jsf/core%22> ;

prefix="f" %>

<%@ taglib

uri="http://myfaces.sourceforge.net/tld/myfaces_ext_0_9.tld"
<http://myfaces.sourceforge.net/tld/myfaces_ext_0_9.tld%22> ;

prefix="x"%>



(3) And then creating the component in the JSP page

by:



<x:inputCalendar monthYearRowClass="yearMonthHeader"

weekRowClass="weekHeader"

currentDayCellClass="currentDayCell"

value="#{calendar.date}" renderAsPopup="true"

popupTodayString="Today is : " popupWeekString="Wk" />



However in JBOSS 3.2.2 I'm getting the following

error:



org.apache.jasper.JasperException: Duplicate component

ID 'submitForm:_id67' found in view.



Any help will be really appreciated.



Thanking you in advance.


  _____  

From: Arinaya [mailto:arinaya@realidea.ca] 
Sent: Thursday, November 18, 2004 3:21 PM
To: 'MyFaces Discussion'
Subject: RE: Problems with client side state saving


Interesting FYI,
 
The below scenario works when the selectItems values are Integer objects,
but not when they are Strings.
 
But Strings are ok with state saving method = server.
 
So my only remaining problem is with the inputCalendar not working when
renderAsPopup = true.
If anyone has any insight into that it would be most appreciated.
 
Regards,
Arinaya


  _____  

From: Arinaya [mailto:arinaya@realidea.ca] 
Sent: Thursday, November 18, 2004 12:05 PM
To: 'MyFaces Discussion'
Subject: RE: Problems with client side state saving


The following works perfectly when state is saved on the server, but not
when state is saved on the client. Can someone please explain why. It looks
like the valueChangeListener is not even being triggered. What do I need to
do to make JSF aware of changes to the selectOneMenu input?
 
<h:selectOneMenu value="#{xxxBean.recordsPerPage}"
onchange="this.form.submit();" immediate="true">

<f:selectItem itemLabel="10" itemValue="10"/>

<f:selectItem itemLabel="20" itemValue="20"/>

<f:selectItem itemLabel="50" itemValue="50"/>

<f:selectItem itemLabel="All" itemValue="#{xxxBean.recordCount}"/>

<f:valueChangeListener type="x.y.z.SatRecordsPerPageChangeListener"/>

</h:selectOneMenu>