Thanks for your help.
I started learning ofbiz and trying to display selected fields from an
entity in form
For this, i have written the code like this
1. Use findByConditionCache to get selected fields
-
List fieldUser = FastList.*newInstance*();
fieldUser.add("userId");
fieldUser.add("userName");
EntityCondition userIdCond = *new* EntityExpr("userId",
EntityOperator.*IN*, userIds);
List userList = delegator.findByConditionCache("User",
userIdCond, fieldUser, *null*);
Here i need to retrieve the userList and send as a Map which conains user
records - only userId & userName for matching user ids in userIds List.
Thanks for any help.
Regards
Vedam
On Thu, Mar 13, 2008 at 11:52 AM, skip@thedevers <
[hidden email]>
wrote:
> Here's what I would do assuming the list is called productList and has a
> productId in it and you wanted to map the list by productId:
>
> FastMap returnMap = FastMap.newInstance();
>
> for(int i = 0; i < productList.size(); i++)
> {
> GenericValue product = (GenericValue)productList.get(i);
> returnMap.put(product.getString("productId", product);
> }
>
> Skip
>
> -----Original Message-----
> From: Vedam B [mailto:
[hidden email]]
> Sent: Wednesday, March 12, 2008 10:21 PM
> To:
[hidden email]
> Subject: convert list of Generic value to Map
>
>
> Hi,
>
> Can some one help on "how to convert list of generic values returned using
>
> findByConditionCache to a Map".
>
>
>
> Regards
>
> Vedam
>
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.518 / Virus Database: 269.21.7/1324 - Release Date: 3/10/2008
> 7:27 PM
>
> No virus found in this outgoing message.
> Checked by AVG.
> Version: 7.5.518 / Virus Database: 269.21.7/1324 - Release Date: 3/10/2008
> 7:27 PM
>
>