You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Tang Yongkang (JIRA)" <de...@myfaces.apache.org> on 2008/10/13 11:00:45 UTC

[jira] Created: (TOMAHAWK-1352) The Status of DataTable wasn't saved when use HashMap to reserve DataSource.

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.


[jira] Updated: (TOMAHAWK-1352) The Status of DataTable wasn't saved when use HashMap to reserve DataSource.

Posted by "Tang Yongkang (JIRA)" <de...@myfaces.apache.org>.
     [ 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.