1 5 6 7 8 9 Previous Next 129 Replies Latest reply on Nov 7, 2013 2:30 AM by blabno Go to original post
      • 90. Re: Schedule
        michele.delprete

        Thanks,

         

        I've built with Richfaces 3 final. It seems work fine except for an exception :

         

        [PortalImpl:3812] Current URL /web/guest/home?p_p_id=scheduler_WAR_SandBox3_INSTANCE_97Tq&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_cacheability=cacheLevelPage&p_p_col_id=column-1&p_p_col_count=3&_scheduler_WAR_SandBox3_INSTANCE_97Tq_rfRes=org.richfaces.renderkit.html.scripts.ScheduleMessages generates exception: null

        14:07:34,768 ERROR [jsp:996] java.lang.NullPointerException

        java.lang.NullPointerException

                at java.lang.String.getBytes(String.java:945)

                at org.richfaces.renderkit.html.scripts.ScheduleMessages.getResourceAsStream(ScheduleMessages.java:59)

                at org.jboss.portletbridge.richfaces.PortletScriptRenderer.send(PortletScriptRenderer.java:63)

                at org.ajax4jsf.resource.InternetResourceBase.send(InternetResourceBase.java:374)

         

        but I see the Calendar and listeners

         

        thanks

         

        michele

        • 91. Re: Schedule
          akisg

          Hi Bernard,

           

          I would like to ask if there is a listener (or another way) already implemented to delete an item you create.

           

          Thank you,

          Akis

          • 92. Re: Schedule
            blabno

            No, you must first click on the item (item select listener is meant for this) and then click on some commandButton you create yourself that will trigger action on your backing bean.

            • 93. Re: Schedule
              akisg

              Hi Bernard,

               

              Thank you for the quick reply. I managed to create a “delete” button and delete a selected event from the calendar. But … the same is not happening when I am trying to modify and save a selected event.

               

              I’ve extended the “h:panelGrid” of a task to support many options for a selected event but I cannot save these data. How is it possible to pass the “myBean.selectedTask” as an object to the Bean that will contain all the new modified value to be saved?

               

              I’ve tried the following with no success, the values for endDate and strtDate are null and the value for “title” ignores my changed value (keeping the original value set)

               

              <a4j:commandButton value="TEST SAVE" reRender="grid" oncomplete="#{rich:component('schedule')}.refetchItems();">

               

                 <a4j:actionparam name="dd" value="#{myBean.selectedTask.endDate}" assignTo="#{myBean.test3}" />

                 <a4j:actionparam name="cc" value="#{myBean.selectedTask.startDate}" assignTo="#{myBean.test2}" />

                 <a4j:actionparam name="bb" value="#{myBean.selectedTask.title}" assignTo="#{myBean.test1}" />

               

                 <a4j:actionparam name="aa" value="#{myBean.selectedTask.id}" assignTo="#{myBean.test}" />

               

                 <rich:componentControl for="editPanel" operation="hide" event="onclick"/>

              </a4j:commandButton>

               

              Thank you

              Akis

               

              • 94. Re: Schedule
                blabno

                Akis,

                If myBean is the bean from schedule-sample then notice that taskSelected method stores selected event id on selectedEventId member. This is how task is selected. Now it's myBean's responsibility to retrive selectedTask object by selectedEventId (see getSelectedTask).

                I don't know how you update or edit the task so I'm unable to tell you why changes are ignored. I don't know why do you use those actionparams (i never use them).

                Please post your code so we can examine it.

                • 95. Re: Schedule
                  akisg

                  Bernard,

                   

                  Assuming we are working on schedule-sample project, and I want just to extend the “h:panelGrid” section to include more features as input values, how is it possible to pass this object to the Bean to store it?

                   

                  For example my panelGrid is the following:

                   

                  <h:panelGrid id="grid" columns="2" rendered="#{not empty myBean.selectedTask}">

                    <h:outputText value="Title"/>

                    <rich:inplaceInput id="one" value="#{myBean.selectedTask.title}"/>

                    <h:outputText value="Start's on:"/>

                    <rich:calendar value="#{myBean.selectedTask.startDate}"

                         locale="en/US"

                         popup="true"

                         datePattern="dd/MM/yyyy HH:mm"

                         showApplyButton="true" />

                    <h:outputText value="Ends's on:" rendered="#{not myBean.selectedTask.allDay}"/>

                    <rich:calendar value="#{myBean.selectedTask.endDate}"

                         rendered="#{not myBean.selectedTask.allDay}"

                         locale="en/US"

                         popup="true"

                         datePattern="dd/MM/yyyy HH:mm"

                         showApplyButton="true" />

                                               

                    <h:outputText value="Client Name:" />

                    <rich:inplaceInput value="#{myBean.selectedTask.clientName}"/>

                                     

                    <h:outputText value="Colleague Name:"/>

                    <rich:inplaceInput value="#{myBean.selectedTask.colleagueName}"/>

                                    

                    <h:outputText value="This is all day event" rendered="#{myBean.selectedTask.allDay}"/>

                                     

                    <h:outputText value="Details:" />

                    <h:inputTextarea value="aa" id="details"  />

                  </h:panelGrid>

                   

                  I’ve also update the ScheduleTask class and added getters and setters:

                      private String id;

                      private String title;

                      private Date startDate;

                      private Date endDate;

                      private Boolean allDay;

                      private Map<String, Object> data;

                      private Boolean editable;

                      private String url;

                      private String details;

                      private String clientName;

                      private String colleagueName;

                   

                  So, for example, using the existing structure for save (as it is on schedule-sample), I am not able to add i.e. details for “clientName” or “details”, or to change “startDate” to the form above and pass it to Bean class to update the records for that particular selection (and furthermore to store to db).

                   

                  <a4j:commandButton value="Save" oncomplete="#{rich:component('schedule')}.refetchItems();">

                    <rich:componentControl for="editPanel" operation="hide" event="onclick"/>

                  </a4j:commandButton>

                   

                  It seems that I miss something. Which method is responsible to handle that request or how is it possible by pressing the “Save” button, to pass all “myBean.selectedTask” values to Bean ?

                   

                  I have the following configuration for Bean class under Spring (in case this might helps).

                   

                  <bean id="myBean" class="org.data.schedule.Bean" scope="request">

                  <constructor-arg index="0" ref="schedulerDAO" />     

                  </bean>

                   

                   

                  Thank you very much for your help.

                  Akis

                   

                  • 96. Re: Schedule
                    blabno

                    Most probably the scope of myBean is too short.

                    • 97. Re: Schedule
                      akisg

                      Hello again,

                       

                      The thing that really confuses me is that the scope seems ok, and in logs I am getting the following:

                       

                      ID: “414”, TITLE: “Title 414”, StartDate: null, EndDate: null, Details: “”

                       

                      There are values in all fiends when the panelGrid is loaded.

                       

                      I’ve hardcoded the value of details to “aa” but it changes to <empty>

                      <h:inputTextarea value="aa" id="details"  />

                       

                      Having the code I previously posted how would you pass the object “selectedTask” to Bean.java ?

                      Is there an alternative way to post the form to the Bean?

                       

                      Many thanks

                      Akis

                       

                      • 98. Re: Schedule
                        luminis

                        Hi bernard,

                        First of all, thank you for this component, i find really easy to integrate in any WebApp.

                         

                        But i got one questions:

                         

                        Is there any way to customize the look of the tasks ? like in week Agenda view instead of displaying only the hour displaying also the event title and some icons ? and further more some links giving the possibility to delete a task. I find really interresting that you can create some tasks in one click, move it with some drag'n'drop, if you can also delete in one click, it would amazing too

                         

                        But this some real good stuf,

                        Keep up the good work !

                         

                        Adrien

                        • 99. Re: Schedule
                          blabno

                          Luminis,

                          Thanks for kind words. You can customize the look of tasks by CSS. This component is based on fullcalendar by Adam Shaw, so take a look at it's documentation. To obtain reference to fullCalendar JavaScript object in RF4 calls #{rich:component('yourScheduleId')}.__getDelegate().

                          Unfortunately, there is no button for removing the task, but maybe you could use eventAfterRender callback to add such control to the event. Such button should call a4j:jsFunction that would call some remove method on server and refresh the schedule. Could you add ticket on Adam's bugtracker for such button and post reference to it here?

                          • 100. Re: Schedule
                            luminis

                            Thanks for the reply, and thanks for the tip about eventAfterRender, i'll see what i can do.

                            I browsed the issue tracker about this enhancement, and i found this, i hope it's still on the road.

                             

                            BTW, i got the really anoying

                            java.lang.NullPointerException

                                at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:706)

                                at java.util.ResourceBundle.getBundle(ResourceBundle.java:699)

                            How to get rid of this ?

                             

                            Thanks for all

                             

                            Adrien

                            • 101. Re: Schedule
                              blabno

                              How about full stacktrace?

                              • 102. Re: Schedule
                                luminis

                                Yup sorry

                                 

                                java.lang.NullPointerException

                                    at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:706)

                                    at java.util.ResourceBundle.getBundle(ResourceBundle.java:699)

                                    at org.richfaces.renderkit.html.scripts.ScheduleMessages.getResourceAsStream(ScheduleMessages.java:44)

                                    at org.ajax4jsf.resource.ScriptRenderer.send(ScriptRenderer.java:50)

                                    at org.ajax4jsf.resource.InternetResourceBase.send(InternetResourceBase.java:374)

                                    at org.ajax4jsf.resource.ResourceLifecycle.sendResource(ResourceLifecycle.java:221)

                                    at org.ajax4jsf.resource.ResourceLifecycle.send(ResourceLifecycle.java:148)

                                    at org.ajax4jsf.resource.InternetResourceService.load(InternetResourceService.java:335)

                                    at org.ajax4jsf.cache.LRUMapCache.load(LRUMapCache.java:116)

                                    at org.ajax4jsf.cache.LRUMapCache.get(LRUMapCache.java:87)

                                    at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:195)

                                    at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:141)

                                    at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:508)

                                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

                                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                                    at com.edifixio.fwk.security.SecurityFilter.doFilter(SecurityFilter.java:51)

                                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

                                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                                    at com.edifixio.fwk.filters.HibernateFilter.doFilter(HibernateFilter.java:134)

                                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

                                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                                    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)

                                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

                                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                                    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

                                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

                                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

                                    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                                    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                                    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)

                                    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)

                                    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

                                    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

                                    at java.lang.Thread.run(Thread.java:595)

                                9 août 2011 12:04:44 org.apache.catalina.core.StandardWrapperValve invoke

                                GRAVE: "Servlet.service()" pour la servlet Faces Servlet a généré une exception

                                java.lang.NullPointerException

                                    at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:706)

                                    at java.util.ResourceBundle.getBundle(ResourceBundle.java:699)

                                    at org.richfaces.renderkit.html.scripts.ScheduleMessages.getResourceAsStream(ScheduleMessages.java:44)

                                    at org.ajax4jsf.resource.ScriptRenderer.send(ScriptRenderer.java:50)

                                    at org.ajax4jsf.resource.InternetResourceBase.send(InternetResourceBase.java:374)

                                    at org.ajax4jsf.resource.ResourceLifecycle.sendResource(ResourceLifecycle.java:221)

                                    at org.ajax4jsf.resource.ResourceLifecycle.send(ResourceLifecycle.java:148)

                                    at org.ajax4jsf.resource.InternetResourceService.load(InternetResourceService.java:335)

                                    at org.ajax4jsf.cache.LRUMapCache.load(LRUMapCache.java:116)

                                    at org.ajax4jsf.cache.LRUMapCache.get(LRUMapCache.java:87)

                                    at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:195)

                                    at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:141)

                                    at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:508)

                                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

                                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                                    at com.edifixio.fwk.security.SecurityFilter.doFilter(SecurityFilter.java:51)

                                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

                                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                                    at com.edifixio.fwk.filters.HibernateFilter.doFilter(HibernateFilter.java:134)

                                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

                                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                                    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)

                                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

                                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                                    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

                                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

                                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

                                    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                                    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                                    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)

                                    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)

                                    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

                                    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

                                    at java.lang.Thread.run(Thread.java:595)

                                 

                                Thanks in advance

                                • 103. Re: Schedule
                                  blabno

                                  You have misconfigured messages.

                                  • 104. Re: Schedule
                                    luminis

                                    You were right, sorry for the bothering ...

                                     

                                    Yet, I still have another question : How do access this method #{rich:component('yourScheduleId')}.__getDelegate() in the RF 3.3 version ?

                                     

                                    Thanks in advance,

                                    Adrien

                                    1 5 6 7 8 9 Previous Next