Question : how to Get Array details of the Selected Array Item?

Dear all,
          I would like to know how to get the details of the array elements .
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
//Array of Mobile Products
MobilePhones[] mobilePhoneProducts=null;

LinkedHashMap<String, String> mobilePhoneProductsMap = new LinkedHashMap<String, String>();


int mobilePhoneProductLength=mobilePhoneProducts.length;


//Adding the elements to a LinkedHashmap

for (int i =0 ; i < mobilePhoneProductLength ; i ++)
			{
				   mobilePhoneProductsMap.put(mobilePhoneProducts[i].getProductName(),chkBookProducts[i].getProductName());
			 } 
		

using the map  in a jsp like below
1:
2:
<netui:select tagId="mobileProducts" dataSource="actionForm.formMobiles" optionsDataSource="${pageFlow.mobilePhoneProductsMap}" defaultValue="-1"/>

Till now everything is working fine




My Query is when I select  a perticular mobile product from the drop down menu i would like to get the details of it.

for  EX :   In a drop down menu when i select Nokia N97 i want the get the details like Price(mobilePhoneProducts.getPrice), color(mobilePhoneProduct.getColor), Mobile code(mobilePhoneProduct.getCode)  ....etc




Any help will be highly Appreciated.

Answer : how to Get Array details of the Selected Array Item?

you'd use the map


MobilePhone selected = mobilePhoneProductsMap.get(selectedProductName);
Random Solutions  
 
programming4us programming4us