3 Replies Latest reply on Jun 19, 2009 2:49 AM by nimo22

    rich:fileUpload and entries.length

    nimo22

      Hello,

      How can I get the client-side-value of entries.length to my server-side-component?

      <rich:fileUpload id="myFileUpload" ..>
      
      <!--this does not work-->
      <rich:componentControl event="onadd" for="fileUpload" operation="entries.length;">
      <f:param value="#{myBean.length}" name="length"/>
      </rich:componentControl>
      
      <!--this does not work-->
      <a4j:support event="onadd" action="#{myBean.actualLength(entries.length)}" />
      
      
      </rich:fileUpload>


      When the event "onadd" occurs, then the client-side-value of the "entries.length" should be assigned to the property #{myBean.length}.

      How can I do that?

        • 1. Re: rich:fileUpload and entries.length
          nimo22

          This does also not work:

          <rich:fileUpload id="myFileUpload">
          <a4j:support event="onadd" action="#{myBean.actualSize}">
          <a4j:actionparam name="viewLength" value="($('myForm:myFileUpload').component.entries.length);" assignTo="#{myBean.length}" converter="javax.faces.Integer"/>
          </a4j:support>
          </rich:fileUpload>


          • 2. Re: rich:fileUpload and entries.length
            nimo22

            I guess, I do not need something like Seam Remoting for such things.

            for example, this:

            alert(($('myForm:myFileUpload').component.entries.length);)


            returns the actual length, but how can I transfer the ivalue to my server-side-property: #{myBean.length} ?

            • 3. Re: rich:fileUpload and entries.length
              nimo22

              I guess, it s due to my lack of java script..