-
1. Re: Problem adding UICalendar programmatically
scott.jones618 Jun 14, 2011 5:37 PM (in response to scott.jones618)Anybody?
-
2. Re: Problem adding UICalendar programmatically
scott.jones618 Jun 20, 2011 5:15 PM (in response to scott.jones618)It appears the problem is due to RichFaces automagically importing numerous JavaScript libraries when I use the markup (<rich:calendar/>) but not when I add the calendar programmatically.
<script type="text/javascript" src="/ASR_Web/javax.faces.resource/jsf.js.jsf?ln=javax.faces&stage=Development"><!--
//--></script><script type="text/javascript" src="/ASR_Web/javax.faces.resource/jquery.js.jsf"><!--
//--></script><script type="text/javascript" src="/ASR_Web/javax.faces.resource/jquery.position.js.jsf"><!--
//--></script><script type="text/javascript" src="/ASR_Web/javax.faces.resource/richfaces.js.jsf"><!--
//--></script><script type="text/javascript" src="/ASR_Web/javax.faces.resource/richfaces-base-component.js.jsf"><!--
//--></script><script type="text/javascript" src="/ASR_Web/javax.faces.resource/richfaces-event.js.jsf"><!--
//--></script><script type="text/javascript" src="/ASR_Web/javax.faces.resource/json-dom.js.jsf?ln=org.richfaces"><!--
//--></script><script type="text/javascript" src="/ASR_Web/javax.faces.resource/jquery.effects.core.js.jsf?ln=org.richfaces"><!--
//--></script><script type="text/javascript" src="/ASR_Web/javax.faces.resource/jquery.effects.highlight.js.jsf?ln=org.richfaces"><!--
//--></script><script type="text/javascript" src="/ASR_Web/javax.faces.resource/JQuerySpinBtn.js.jsf?ln=org.richfaces"><!--
//--></script><script type="text/javascript" src="/ASR_Web/javax.faces.resource/calendar-utils.js.jsf?ln=org.richfaces"><!--
//--></script><script type="text/javascript" src="/ASR_Web/javax.faces.resource/calendar.js.jsf?ln=org.richfaces"><!--
//--></script><link rel="stylesheet" media="screen" type="text/css" href="/ASR_Web/rfRes/calendar.ecss.jsf?db=eAFjj-dWAgABdQCU&ln=org.richfaces" />
-
3. Re: Problem adding UICalendar programmatically
nbelaevski Jun 20, 2011 11:51 PM (in response to scott.jones618)Hi Scott,
You should use application.createComponent(FacesContext, String, String) method to create component programmatically, not a pure 'new' operator - see JSF specification for more info.
-
4. Re: Problem adding UICalendar programmatically
scott.jones618 Jun 22, 2011 12:21 PM (in response to nbelaevski)Is this what you mean?
FacesContext facesContext = FacesContext.getCurrentInstance();
Application application = facesContext.getApplication();
application.createComponent(facesContext, UICalendar.COMPONENT_TYPE, "org.richfaces.renderkit.html.CalenderRenderer");
-
5. Re: Problem adding UICalendar programmatically
ozorin Oct 11, 2011 2:39 AM (in response to scott.jones618)Dear All,
is there any other ideas?