-
1. Re: customize organizer calendar
nbelaevski Jan 7, 2009 7:50 AM (in response to josson)Hello,
Please take a look here: http://livedemo.exadel.com/richfaces-demo/richfaces/calendar.jsf?tab=organizer
and there http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/docs/devguide/en/html/calendar.html#d0e12533. Use {nextMonthControl} and {previousMonthControl} for your case. -
2. Re: customize organizer calendar
josson Jan 7, 2009 11:03 PM (in response to josson)Thanks for the response. I had already tried that option. I am able to put the previous month control and next month control. But on click of those control the getData method in the CalendarDataModelImpl is not being called. So I don't have a control to populate my own data there...
-
3. Re: customize organizer calendar
josson Jan 8, 2009 1:29 AM (in response to josson)According to the documentation if the ajax mod is on the getData on the CalendarDataModelImpl should be called whenever we click on the next month or previous month controller. But i don't see that is happening. I am using Sunone8 app server.
-
4. Re: customize organizer calendar
nbelaevski Jan 8, 2009 9:13 PM (in response to josson)Hello,
Yes, that's true, data should be fetched from the server in AJAX mode. I've just checked with 3.3.0.CR3, works ok. Can you please post full page code? -
5. Re: customize organizer calendar
josson Jan 13, 2009 4:59 AM (in response to josson)Thanks for the response. I tested my application in Tomact-6. It is working as expected. I am trying to make it work in Sun One8. I am getting the calendar but the ajax mode operation is not working. ie. the next and previous control is not fetching the data from the back end bean. I checked the document and found that the rich faces support only glasfish or sunone9. Can't i make this work in sun one 8. Please help. I have attached the code.
faces config file<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd"> <faces-config> <managed-bean> <managed-bean-name>calendarBean</managed-bean-name> <managed-bean-class>org.richfaces.demo.calendar.CalendarBean</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> <managed-bean> <managed-bean-name>calendarDataModelImpl</managed-bean-name> <managed-bean-class>org.richfaces.demo.calendar.modelImpl.CalendarDataModelImpl</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> <managed-bean> <managed-bean-name>calendarDataModel</managed-bean-name> <managed-bean-class>org.richfaces.demo.calendar.modelImpl.CalendarDataModelImpl</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> </faces-config>
web.xml<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <description>Richfaces Components demo</description> <display-name>richfaces-demo</display-name> <context-param> <param-name>javax.faces.DEFAULT_SUFFIX</param-name> <param-value>.xhtml</param-value> </context-param> <context-param> <param-name>facelets.REFRESH_PERIOD</param-name> <param-value>2</param-value> </context-param> <context-param> <param-name>facelets.DEVELOPMENT</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>server</param-value> </context-param> <context-param> <param-name>com.sun.faces.validateXml</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>com.sun.faces.verifyObjects</param-name> <param-value>false</param-value> </context-param> <context-param> <param-name>org.ajax4jsf.SKIN</param-name> <param-value>blueSky</param-value> </context-param> <context-param> <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name> <param-value>com.sun.facelets.FaceletViewHandler</param-value> </context-param> <context-param> <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>org.ajax4jsf.COMPRESS_STYLE</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>org.ajax4jsf.xmlparser.ORDER</param-name> <param-value>NEKO, TIDY</param-value> </context-param> <context-param> <param-name>org.richfaces.CONTROL_SKINNING</param-name> <param-value>enable</param-value> </context-param> <context-param> <param-name>org.richfaces.LoadStyleStrategy</param-name> <param-value>ALL</param-value> </context-param> <context-param> <param-name>org.richfaces.LoadScriptStrategy</param-name> <param-value>DEFAULT</param-value> </context-param> <filter> <display-name>Ajax4jsf Filter</display-name> <filter-name>ajax4jsf</filter-name> <filter-class>org.ajax4jsf.Filter</filter-class> <init-param> <param-name>createTempFiles</param-name> <param-value>false</param-value> </init-param> <init-param> <param-name>maxRequestSize</param-name> <param-value>100000</param-value> </init-param> </filter> <filter-mapping> <filter-name>ajax4jsf</filter-name> <servlet-name>Faces Servlet</servlet-name> <dispatcher>FORWARD</dispatcher> <dispatcher>REQUEST</dispatcher> <dispatcher>INCLUDE</dispatcher> <dispatcher>ERROR</dispatcher> </filter-mapping> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.jsf</url-pattern> </servlet-mapping> <login-config> <auth-method>BASIC</auth-method> </login-config> </web-app>
organiser.xhtml<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> <style> .header{ font-weight:bold; } .rich-calendar-header{ text-align:center; } </style> <body> <h:form id="form"> <tr><td> <rich:messages/> <rich:calendar id="myCalendar" popup="false" locale="#{calendarBean.locale}" dataModel="#{calendarDataModel}" cellWidth="40px" cellHeight="40px" mode="ajax" onchanged="if (event.rich.date) {ajaxSubmit();}" valueChangeListener="#{calendarDataModel.valueChanged}" > <a4j:outputPanel layout="block" id="cell" style="height: 100%;"> <h:panelGrid columns="1"> <h:outputText value="{day}" style="align:center" /> <h:outputText value="{data.shortDescription}" /> <h:outputText value="{data.description}" /> </h:panelGrid> </a4j:outputPanel> <h:panelGrid columns="3" width="100%" columnClasses="fake, width100 talign"> <h:outputText value="{previousMonthControl}" style="font-weight:bold;"/> <h:outputText value="{nextMonthControl}" style="font-weight:bold;"/> </h:panelGrid> <h:outputText value="{day}"></h:outputText> </rich:calendar> </td></tr> </h:form> </body> </ui:composition>
-
6. Re: customize organizer calendar
josson Jan 15, 2009 1:07 AM (in response to josson)Anybody please tell me why the above code is not running on SUN ONE 8. Or if you know the changes that I have to make it in code or any configuration file, please let me know.
-
7. Re: customize organizer calendar
nbelaevski Jan 15, 2009 10:14 AM (in response to josson)What is RichFaces/JSF version?
-
8. Re: customize organizer calendar
josson Jan 15, 2009 10:34 PM (in response to josson)I am using jsf 1.2 and rich faces 3.1.6.GA. I have listed all the jar files that i am using
commons-beanutils-1.7.0.jar
commons-collections-3.1.jar
commons-digester-1.8.jar
commons-logging-1.0.4.jar
jsf-api-1.2_11.jar
jsf-facelets-1.1.15.B1.jar
jsf-impl-1.2_11.jar
nekohtml-0.9.5.jar
richfaces-api-3.1.6.GA.jar
richfaces-impl-3.1.6.GA.jar
richfaces-ui-3.1.6.GA.jar
xercesImpl-2.9.1.jar
xml-apis-1.3.04.jar
el-api.jar
el-impl-1.0.jar -
9. Re: customize organizer calendar
josson Jan 16, 2009 9:47 AM (in response to josson)el-api.jar
el-impl-1.0.jar are the extra jar files i used for SUN oNE 8