9 Replies Latest reply on Jan 16, 2008 12:40 PM by juanignaciosl

    Can't click ListShuttle elements

    juanignaciosl

      I am using listShuttle this way:

      <rich:listShuttle sourceValue="#{empresasBean.sectoresDisponibles}"
       sourceCaptionLabel="" rowKeyVar="rowIndex"
       targetValue="#{empresasBean.modelo.sectores}"
       targetCaptionLabel="#{mmE.sectores}" var="sector"
       converter="#{sectorConverter}" id="sectores">
      
       <rich:column>
       <h:outputText value="#{sector.etiqueta}" />
       </rich:column>
      </rich:listShuttle>
      


      It loads both boxes fine.

      When page loads I get this JS error:

      C.isSelected is not a function


      If I click any element it won't do anything (neither throwing new errors not activating buttons).

      Any ideas?

      Thank you in advance

        • 1. Re: Can't click ListShuttle elements
          juanignaciosl

          RF 3.1.3, of course :)

          • 2. Re: Can't click ListShuttle elements
            ilya_shaikovsky

            May we look to the whole page snippet and ask about general JSF environment? Will be helpfull.

            For example we've already works under the same problem when listShuttle used in modal panel.

            • 3. Re: Can't click ListShuttle elements
              juanignaciosl

              Nothing too strange this time:

              ...

              <ui:composition template="/plantilla.ita.jspx">
              
               <ui:define name="bundles">
               <a4j:loadBundle basename="es.jcyl.ita.gnomos.empresas.web.messages"
               var="mwE" />
               <a4j:loadBundle
               basename="es.jcyl.ita.gnomos.empresas.modelo.mensajes" var="mmE" />
               </ui:define>
              
               <ui:define name="titulo">
               <h:outputText value="#{mwE.tituloGestion}" />
               </ui:define>
              
               <ui:define name="cuerpo">
               <a4j:outputPanel id="gestionEmpresas">
               <t:panelGrid styleClass="formulario" columns="6">
              
               <ita:etiquetaFormulario for="nombre" value="#{mmE.nombre}" />
               <ita:inputText id="nombre" value="#{empresasBean.modelo.nombre}"
               size="30" maxlength="255" />
              
               <ita:etiquetaFormulario for="email" value="#{mmE.email}" />
               <ita:inputText id="email" value="#{empresasBean.modelo.email}" />
              
               <ita:etiquetaFormulario for="telefono" value="#{mmE.telefono}" />
               <ita:inputText id="telefono"
               value="#{empresasBean.modelo.telefono}" />
              
               <ita:etiquetaFormulario for="fax" value="#{mmE.fax}" />
               <ita:inputText id="fax" value="#{empresasBean.modelo.fax}" />
              
              
               <ita:etiquetaFormulario for="facturacion"
               value="#{mmE.facturacion}" />
               <ita:inputText id="facturacion"
               value="#{empresasBean.modelo.facturacion}" />
              
               <ita:etiquetaFormulario for="NEmpleados" value="#{mmE.NEmpleados}" />
               <ita:inputText id="NEmpleados"
               value="#{empresasBean.modelo.NEmpleados}" />
              
               <ita:etiquetaFormulario for="descripcion"
               value="#{mmE.descripcion}" />
               <t:panelGroup colspan="2">
               <ita:inputTextarea id="descripcion"
               value="#{empresasBean.modelo.descripcion}" cols="30" rows="4" />
               </t:panelGroup>
              
               <ita:etiquetaFormulario for="sectores" value="#{mmE.sectores}" />
               <t:panelGroup colspan="2">
               <rich:listShuttle
               sourceValue="#{empresasBean.sectoresDisponibles}"
               sourceCaptionLabel="#{mmE.sectoresDisponibles}" rowKeyVar="rowIndex"
               targetValue="#{empresasBean.modelo.sectores}"
               targetCaptionLabel="#{mmE.sectores}" var="sector"
               converter="#{sectorConverter}" id="sectores"
               fastOrderControlsVisible="false" orderControlsVisible="false"
               fastMoveControlsVisible="false" listsHeight="70"
               copyControlLabel="#{mwE.seleccionar}"
               removeControlLabel="#{mwE.deseleccionar}">
               <rich:column>
               <h:outputText value="#{sector.etiqueta}" />
               </rich:column>
               </rich:listShuttle>
               </t:panelGroup>
              
              


              That page snippet is inserted in a facelet template:

               <ui:composition>
               <h:outputText escape="false"
               value="<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>" />
              
               <t:document>
               <c:if test="${empty enctype}">
               <c:set var="enctype" value="multipart/form-data" />
               </c:if>
               <c:if test="${empty idForm}">
               <c:set var="idForm" value="idFormPlantilla" />
               </c:if>
               <c:if test="${empty reRenderRoleador}">
               <c:set var="reRenderRoleador" value="${reRenderRoleador}" />
               </c:if>
              
               <ui:insert name="bundles" />
              
               <ita:head />
              
               <t:documentBody>
               <a4j:form enctype="${enctype}" id="${idForm}">
               <a4j:loadBundle
               basename="es.jcyl.ita.fwk2.componentes.error.errores"
               var="mesgErrores" />
               <a4j:outputPanel ajaxRendered="true">
               <f:verbatim>
               <script type="text/Javascript">
               var nombreUsuario="<h:outputText value="#{sessionScope.__UsuarioEnSesion.etiqueta}" />";
               //A4J.AJAX.onError = function(req,status,message) {
               // enviarError(req+" ;;; "+status+" ;;; "+message+"; usuario: "+nombreUsuario);
               // alert('${mesgErrores.errorErrorAjax}');
               // A4J.AJAX.onError = null;
               //};
               A4J.AJAX.onExpired = function(loc,expiredMsg){
               alert('${mesgErrores.errorErrorSesionExpirada}');
               A4J.AJAX.onExpired = null;
               };
               </script>
               </f:verbatim>
               </a4j:outputPanel>
              
               <c:choose>
               <c:when test="#{empty menu.usuario}">
               <jsp:forward page="/error.jsf" />
               </c:when>
              
               <c:otherwise>
               <a4j:jsFunction name="enviarError" action="#{beanErrores.error}">
               <a4j:actionparam name="mensajeError" />
               </a4j:jsFunction>
              
               <t:dojoInitializer require="dojo.io.*" parseWidgets="false"
               searchIds="" />
               <t:dojoInitializer require="dojo.io.IframeIO"
               parseWidgets="false" searchIds="" />
              
               <a4j:loadBundle
               basename="es.jcyl.ita.fwk2.base.util.ConfiguracionAplicacion"
               var="cfg" />
               <a4j:loadBundle basename="menu" var="mesgMenu" />
              
               <ita:encabezado reRenderRoleador="${reRenderRoleador}"
               roleadorBean="${roleadorBean}" titulo="#{cfg.TITULO}"
               logo="/imagenes/Gnomos.png" roleadorAction="${roleadorAction}" />
              
               <t:div styleClass="principal">
               <h1>
               <ui:insert name="titulo" />
               </h1>
              
               <ita:messages id="mensajesPlantilla" />
              
               <ui:insert name="cuerpo" />
              



              I use MyFaces 1.1.5 + Facelets on SJSAS 8.1.

              • 4. Re: Can't click ListShuttle elements
                juanignaciosl

                Internet Explorer (6, 7) doesn't work, either

                • 5. Re: Can't click ListShuttle elements
                  ilya_shaikovsky

                  could you please create sample war for us? And create a bug in jira with it attached?

                  • 6. Re: Can't click ListShuttle elements
                    juanignaciosl

                    Ok, I'll create a simple project in order to reproduce it and post a Jira. Thanks!

                    • 7. Re: Can't click ListShuttle elements
                      ilya_shaikovsky

                      Ok.. it will be explored and answered. Thanks you too for help.

                      • 8. Re: Can't click ListShuttle elements
                        juanignaciosl

                        Here you have: http://jira.jboss.com/jira/browse/RF-1829
                        I must be doing something _really_ wrong, since I've made the simplest application possible (nothing but MyFaces and RichFaces) and it doesn't work either.

                        Thank you for your support

                        • 9. Re: Can't click ListShuttle elements
                          juanignaciosl

                          Ok, the workaround suggested at the jira works. Thanks!!!!