4 Replies Latest reply on Oct 15, 2009 11:10 AM by harpritt

    rich:calendar with dragSupport

    harpritt

      Hi Everyone

      ive been struggling with this one for about 2 days - all ive developed is a nice bald patch.

      im trying to get drag and drop functionality to work with the calendar component.

      Ive takent the calendar demo and added <rich:dragSupport /> to the container that i want draggable. All i get is

      SEVERE: JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /pages/calendar.xhtml) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@1956391]
      15-Oct-2009 12:51:52 org.apache.catalina.core.StandardWrapperValve invoke
      SEVERE: Servlet.service() for servlet Faces Servlet threw exception
      java.io.IOException: org.richfaces.javacc.ParseException: Encountered "}" at line 1, column 123.
      Was expecting one of:
       "{" ...
       <LITERAL> ...
      


      heres my markup

      
      <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>
      
       <h:form id="form">
       <rich:messages />
       <a4j:jsFunction name="ajaxSubmit"
       oncomplete="#{rich:component('panel')}.show()" reRender="editContent" />
       <rich:calendar value="#{calendarBean.selectedDate}" popup="false"
       showApplyButton="false" cellWidth="100px" cellHeight="100px"
       boundaryDatesMode="none" showWeeksBar="false"
       dataModel="#{calendarDataModel}" oncurrentdateselect="return false"
       id="organizer"
       valueChangeListener="#{calendarDataModel.valueChanged}"
       showFooter="false">
       <f:facet name="header">
       <h:panelGroup>
       <h:outputText value="Current Month" styleClass="header" />
       </h:panelGroup>
      
       </f:facet>
       <a4j:outputPanel layout="block" id="cell"
       onclick="#{rich:component('organizer')}.resetSelectedDate()"
       style="height: 100%;">
      
       <h:panelGrid columns="1">
       <h:outputText value="{day}" style="align:center" />
       <a4j:outputPanel
       style="width:100px;border:1px solid gray;padding:2px"
       layout="block">
      
       <rich:dragSupport />
      
       <h:outputText value="{data.shortDescription.escapeHTML()}" />
       </a4j:outputPanel>
       <h:outputText value="{data.description.escapeHTML()}" />
       </h:panelGrid>
       </a4j:outputPanel>
       </rich:calendar>
       </h:form>
      
      </ui:composition>
      
      
      


      Any help is greatly appreciated

      rgrds... the baldy man