Generating a datatable in JSF(or a page) from list of values retrieved from Javascript component -


i have datatable defined this:

<div style="margin-top: 10px; padding: 3px 3px;">                     <fieldset>                                                   <legend>sourcepublicationdates</legend>                          <f:facet name="header" >                                 <h:outputtext value="add sourcepub date:"/>                          </f:facet>                              <h:inputtext id="sourcepublicationdate" value="#{dataentry.sourcepublicationdate}">                              <c:ajax event="keyup" />                              <c:ajax event="focus" />                                 <f:ajax execute="@this" render="sourcepublicationdate" />                          </h:inputtext>                          <h:panelgroup style="padding-left: 3px;">                                     <button class="manualcontent" id="showsourcepublicationdatecalendar" type="button"><img src="/sourcenavigateweb/resources/images/cal.gif"/></button>                                     <div id="sourcepublicationdatecalendarcontainer" />                          </h:panelgroup>                          <h:commandbutton value="add" action="#{dataentry.editsourcepubdates}">                             <f:ajax execute="@this" render="dtsourcepubdate" />                         </h:commandbutton>                         <h:datatable id="dtsourcepubdate" value="#{dataentry.sourcepubdates}" var="sourcepubdate">                             <h:column>                             <f:facet name="header" >                                 <h:outputtext value="source publication dates:"/>                             </f:facet>                                 <h:inputtext id="sourcepubdate" value="#{sourcepubdate}"/>                             </h:column>                         </h:datatable>                     </fieldset>                 </div> 

and value in table comes multiselect calendar control in javascript below. want display each individual fulldate text box field part of datatable bound jsf backing bean. how can fulldate text box fields of datatable ? or in non-editable form of datatable ?

calendarpopup.handleselectformultipledates = function(type, args, obj, inputel)         {         var arrdates = calendarpopup.sourcepublicationdatecalendar.getselecteddates();         var length = arrdates.length;         var i=0;         while(i!=length)         {             var date = arrdates[i];             var displaymonth = date.getmonth() + 1;             var displayyear = date.getfullyear();             var displaydate = date.getdate();             var fulldate = displaymonth + "/" displaydate + "/" + displayyear;             i++;         }          } 


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -