You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by liulocust <li...@163.com> on 2006/12/10 15:49:57 UTC

batch submit in datatable

Hi:
   I want to edit multi datatable row,and batch submit.But now,I encounter a
problem,can anybody help me?
   The datatable jsf like below:
    <t:dataTable id="student" value="#{examinee.examineeList}" var="stu" >
        <t:column>
	<f:facet name="header" >
	   <h:outputText value="updater/delete"/>
               </f:facet>
	<t:panelGrid columns="2" align="center">
	    <t:commandLink actionFor="stuform" action="#{examinee.updateExaminee}">
	          <t:graphicImage border="0" url="/images/anniu2.gif" width="57"
height="25" />
	   </t:commandLink>
	   <t:commandLink actionFor="stuform" action="#{examinee.deleteExaminee}">
	         <t:graphicImage border="0" url="/images/anniu4.gif" width="57"
height="25" />
                 </t:commandLink>
             </t:panelGrid>
      </t:column>
     <t:column>
           <f:facet name="header">
	<h:outputText value="schno"/>
          </f:facet>
         <t:inputText displayValueOnly="#{!stu.checked}"
value="#{stu.examinee.schno}" />
     </t:column>					
    <t:column>
           <f:facet name="header">
	<h:outputText value="name"/>
          </f:facet>
         <t:inputText displayValueOnly="#{!stu.checked}"
value="#{stu.examinee.name}"/>
     </t:column>
 </t:datatable>
  <t:commandLink actionFor="stuform" action="#{examinee.saveExaminee}">
       <t:output value="save" />
   </t:commandLink>
  
  when I click the first row update button,the row change to edit
status,then I can edit the value。
  Now if I click the save button,I can get the first row enter data;But I
want to edit more row and batch submit,so I click the second row update
button,the second row become to edit status,but now the first row data I
entered was replaced by the data before。
   The problem below:
   I want to edit more row in datatable,and batch submit。Can the datatable
support? and how to do it?
  Thanks anyway.
save button
-- 
View this message in context: http://www.nabble.com/batch-submit-in-datatable-tf2789434.html#a7782458
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: batch submit in datatable

Posted by Hazem Saleh <ha...@gmail.com>.
Hi,
Please see that tutorial. I think it will help you in that case
http://www.jroller.com/page/HazemBlog?entry=creating_sortable_editable_addable_and
Thanks


On 12/10/06, liulocust <li...@163.com> wrote:
>
> Hi:
>   I want to edit multi datatable row,and batch submit.But now,I encounter a
> problem,can anybody help me?
>   The datatable jsf like below:
>    <t:dataTable id="student" value="#{examinee.examineeList}" var="stu" >
>        <t:column>
>        <f:facet name="header" >
>           <h:outputText value="updater/delete"/>
>               </f:facet>
>        <t:panelGrid columns="2" align="center">
>            <t:commandLink actionFor="stuform" action="#{examinee.updateExaminee}">
>                  <t:graphicImage border="0" url="/images/anniu2.gif" width="57"
> height="25" />
>           </t:commandLink>
>           <t:commandLink actionFor="stuform" action="#{examinee.deleteExaminee}">
>                 <t:graphicImage border="0" url="/images/anniu4.gif" width="57"
> height="25" />
>                 </t:commandLink>
>             </t:panelGrid>
>      </t:column>
>     <t:column>
>           <f:facet name="header">
>        <h:outputText value="schno"/>
>          </f:facet>
>         <t:inputText displayValueOnly="#{!stu.checked}"
> value="#{stu.examinee.schno}" />
>     </t:column>
>    <t:column>
>           <f:facet name="header">
>        <h:outputText value="name"/>
>          </f:facet>
>         <t:inputText displayValueOnly="#{!stu.checked}"
> value="#{stu.examinee.name}"/>
>     </t:column>
>  </t:datatable>
>  <t:commandLink actionFor="stuform" action="#{examinee.saveExaminee}">
>       <t:output value="save" />
>   </t:commandLink>
>
>  when I click the first row update button,the row change to edit
> status,then I can edit the value。
>  Now if I click the save button,I can get the first row enter data;But I
> want to edit more row and batch submit,so I click the second row update
> button,the second row become to edit status,but now the first row data I
> entered was replaced by the data before。
>   The problem below:
>   I want to edit more row in datatable,and batch submit。Can the datatable
> support? and how to do it?
>  Thanks anyway.
> save button
> --
> View this message in context: http://www.nabble.com/batch-submit-in-datatable-tf2789434.html#a7782458
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


-- 
Hazem Ahmed Saleh Ahmed
IBM Egypt Cairo TDC ( Technology Development Center )
WebSphere Business Integration Modeler Software Engineer
http://www.jroller.com/page/HazemBlog