5 Replies Latest reply on Nov 6, 2007 4:59 AM by Ilya Shaikovsky

    Drag and drop problem

    Daniel Stokowski Newbie

      Hi. I tried to add dnd to project. I make everything like in example, but have xml parsing error. Because didn't know if it was my fault I tried to copy your example to my project(only packages have been changed) and still have same error. I am newbie with JSF and Richfaces. I'm using Red Hat developer Studio beta 2, and started kickstart template project with Facelets. I have confronted source code(from browser) of your example with my source code(from browser) and there is a diference.
      example:

      <script type="text/javascript">
      //<![CDATA[
      var elt = $("indicator");
       elt.markers = {};
       elt.indicatorTemplates = {};elt.markers['accept'] = "<img alt=\"\" border=\"0\" width=\"16\" height=\"16\" src=\"/richfaces/a4j_3_1_1-SNAPSHOTorg/richfaces/renderkit/html/images/accept.gif.jsf\" />";
      elt.markers['default'] = "<img alt=\"\" border=\"0\" width=\"16\" height=\"16\" src=\"/richfaces/a4j_3_1_1-SNAPSHOTorg/richfaces/renderkit/html/images/default.gif.jsf\" />";
      elt.markers['reject'] = "<img alt=\"\" border=\"0\" width=\"16\" height=\"16\" src=\"/richfaces/a4j_3_1_1-SNAPSHOTorg/richfaces/renderkit/html/images/reject.gif.jsf\" />";
      elt.indicatorTemplates['single'] = DefaultDragIndicatorView;elt.indicatorTemplates['multi'] = DefaultDragIndicatorView;createDragIndicator(elt, '', '');
      //]]>
      </script>
      

      my:
      <script type="text/javascript">var elt = $("indicator");
       elt.markers = {};
       elt.indicatorTemplates = {};elt.markers['accept'] = "<img alt=\"\" border=\"0\" width=\"16\" height=\"16\" src=\"/SOZ/a4j_3_1_0org/richfaces/renderkit/html/images/accept.gif.jsf\" />";
      elt.markers['default'] = "<img alt=\"\" border=\"0\" width=\"16\" height=\"16\" src=\"/SOZ/a4j_3_1_0org/richfaces/renderkit/html/images/default.gif.jsf\" />";
      elt.markers['reject'] = "<img alt=\"\" border=\"0\" width=\"16\" height=\"16\" src=\"/SOZ/a4j_3_1_0org/richfaces/renderkit/html/images/reject.gif.jsf\" />";
      elt.indicatorTemplates['single'] = DefaultDragIndicatorView;elt.indicatorTemplates['multi'] = DefaultDragIndicatorView;createDragIndicator(elt, '', '');</script>
      


      parser error:
       elt.indicatorTemplates = {};elt.markers['accept'] = "<img alt=\"\" border=\"0\" width=\"16\" height=\"16\" src=\"/SOZ/a4j_3_1_0org/richfaces/renderkit/html/images/accept.gif.jsf\" />";
      ------------------------------------------------------------------------------^
      


      I don't know if it is a bug in Richfaces or my project settings are wrong. Don't know what to do with that.

      any help will be appreciated
      Cheers
      Daniel