1 Reply Latest reply on Oct 27, 2010 1:38 AM by Ilya Shaikovsky

    Loading rich:Modelpanel Issue

    Kumar Reddy Newbie

      Hi,

       

      I'm using the follwing code in the rich:modal panel and trying to load the modal panel on command button.the model panel loads fine for the first row in the datta table but displays empty when I click on the 2nd row and other rows.I've embeded this modal inside the rich:column.Any inpus on how to load the modal panel for the second row and the other rows.

       

      <a4j:commandButton id="uploadEntry"                     
                                      oncomplete="#{rich:component('kalturaUploadPanel')}.show()"
                                      reRender="uploadPanel"
                                      image="../img/upload.gif"                              
                                    >
      </a4j:commandButton>

       

      ---Modal panel------

       

      <a4j:outputPanel id="uploadPanel" layout="block">
                              <rich:modalPanel id="kalturaUploadPanel" autosized="true"
                                  width="600" height="300" title="Upload Artifact">
                                  <rich:spacer height="15" width="5" />
                                  <f:facet name="header">
                                      <h:outputText value="Upload Artifact" />
                                  </f:facet>
                                  <f:facet name="controls">
                                      <a4j:commandLink value="Close" style="cursor:pointer"
                                          oncomplete="#{rich:component('kalturaUploadPanel')}.hide();" />
                                  </f:facet>       
                                  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"/>
                                  <body>                           
                                  <table border="0" align="center" style="margin: 0; padding: 0; height: 30px">                                                                
                                  <div id="kcw"></div>                           
                                  <script type="text/javascript">
                                       var params = {
                                          allowScriptAccess: "always",
                                          allowNetworking: "all",
                                          wmode: "transparent"
                                      };
                                      var flashVars = {};
                                      //flashVars.uid = 2;
                                      flashVars.ks = "#{objectivelistaction.sessionId}";
                                      flashVars.afterAddEntry = "onContributionWizardAfterAddEntry";
                                      flashVars.showCloseButton = false;
                                      flashVars.Permissions = 1;
                                     //For Video,Audio and Image uploads
                                      swfobject.embedSWF("http://www.kaltura.com/kcw/ui_conf_id/1913682", "kcw1", "680", "360", "9.0.0", "expressInstall.swf", flashVars, params);
                                      </script>
                                       <script type="text/javascript">
                                           function onContributionWizardAfterAddEntry(entries) {                                   
                                          var uploadedEntryFromKaltura = entries[0].entryId;                                   
                                          kalturaentry(uploadedEntryFromKaltura);
                                          }
                                       </script>
                                        <a4j:jsFunction name="kalturaentry" >
                                               <a4j:actionparam name="uploadedEntryFromKaltura" assignTo="#{objectivelistaction.entryIdFromKaltura}"/>                                         
                                         </a4j:jsFunction>                             
                                      <tr align="right">
                                          <td><a4j:commandButton tabindex="1"
                                              image="../img/submit.gif"                                       
                                              action="#{objectivelistaction.uploadMediaEntry}"
                                              oncomplete="#{rich:component('kalturaUploadPanel')}.hide()"
                                              reRender="portfolioList" /></td>
                                      </tr>                               
                                  </table>                           
                                  </body>   
                              </rich:modalPanel>
                              </a4j:outputPanel>

       

      Thanks,

      Kumar