Ok.  I've actually gone a step further and attempted to make this work
transparently so long as you set preserveRowStates=true, and your
backing data model doesn't have duplicate objects in the list.

You can try out the patch to Tomahawk 1.1.6 (should also work against
the Tomahawk 1.1.5 release).  This patch will automatically detect and
handle deleted rows without any application code changes on your part.

You can find it in Tomahawk-961 as an attachment.

https://issues.apache.org/jira/browse/TOMAHAWK-961

As soon as it's been tested more, I'll probably commit to Tomahawk officially.

I'm deploying a production application with this patch later as it's
working in my own application.


On 4/12/07, Manuel Nieto <[EMAIL PROTECTED]> wrote:
I'll try it soon.

Thanks a lot

2007/4/11, Mike Kienenberger <[EMAIL PROTECTED]>:
> I have modified the Tomahawk dataTable to support two new methods
> relating to preserveRowStates=true.   The delete method has worked for
> my own situation.   This is now part of the Tomahawk 1.1.6 snapshot.
>
> http://svn.apache.org/viewvc?view=rev&rev=527623
>
>     /**
>      * Remove all preserved row state for the dataTable
>      */
>     public void clearRowStates();
>
>     /**
>      * Remove preserved row state for deleted row and adjust row state
> to reflect deleted row.
>      * @param deletedIndex index of row to delete
>      */
>     public void deleteRowStateForRow(int deletedIndex);
>
>
> For example,
>
>     public String deleteRow()
>     {
>
((HtmlDataTable)uidata).deleteRowStateForRow(uidata.getRowIndex());
>         list.remove(uidata.getRowData());
>
>         return null;
>     }
>
>
> On 8/10/06, Surapuraju, Vamsi < [EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >   I tried to remove a row from data table which has preserveRowStates
> > set to true and I noticed deleted row data is being shown an the next
> > row. Does anyone know How I can keep the modified data on the table with
> > out using preserveRowStates. I want to be able to remove the row from
> > data table and keep modified data.
> >
> > Thank You very Much
> >
> > Vamsi Surapuraju
>


Reply via email to