myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tang Yongkang (JIRA)" <...@myfaces.apache.org>
Subject [jira] Updated: (TOMAHAWK-1352) The Status of DataTable wasn't saved when use HashMap to reserve DataSource.
Date Mon, 13 Oct 2008 09:02:44 GMT

     [ https://issues.apache.org/jira/browse/TOMAHAWK-1352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tang Yongkang updated TOMAHAWK-1352:
------------------------------------

    Status: Patch Available  (was: Open)

> The Status of  DataTable wasn't saved when use HashMap to reserve DataSource.
> -----------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-1352
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1352
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>         Environment: tomahawk  1.1.7
> myfaces-core-1.1.6
>            Reporter: Tang Yongkang
>
> I'm using  a HashMap to reserve the form values.
> The search result  is a type of ArrayList. It is needed to edit the search result and
then save them to database and redisplay the datatable.
> But  when redisplay the datatable,  I found that the Status was not saved. It only dispaly
ONE ROW in the datatable.
> I trace the source and found the following source in AbstractHtmlDataTable.java:
> // Method Name: updateModelFromPreservedDataModel
> 517                if (lst!= null && lst.size() > 0)
> 518                {
> 519                    vb.setValue(context, lst.get(0));
> 520                }
> At the  row 519, the ArrayList was constrained to ONE RECORD Array.
> I changed the source as following, and it works fine.
> 517                if (lst!= null && lst.size() > 0)
> 518                {
> 519                    vb.setValue(context, lst);
> 520                }
> I don't know why it was restraned to one record array,
> But perhaps reduce the restrains may make myfaces more flexible.
> thanks a lot in advance.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message