multiple dropdown boxes from a IS service output.

I have a IS service that returns a complex structure containing lists in a list.
ex.
result
Orders[i]
OrderNo
OrderLines[j]
lineNo

Does anyone have a suggestion on how to implement a dropdown box for the Orders structure and then a new Dropdown box for the OrderLines?

regards
John Arne

Hi Johnal,

From the above IS doc structure what i have understood is orders is the doc list and for each orderNo again u ll be having the orderLines as one more doc list, if this is correct,

U can create a groupOfOptions as a contentProvider, if u bind this to the dropDown you ll be getting the orders in that.

use a raiseOnChange control along with AsnyHiddenCommand button for the orders dropdown.

in the action, retrive the orderLines values from the resultprovider for the item that user has selected from the orders dropdown and assign those values to a string list. Bind the string list to the orderLines dropdown.

Hope this will be helpful,

Regards,
Sunil_N
In the above scenario every countryName is having some of the qualificationNames associated with that.doc (46 KB)

Hi.
Thanks for the input but I need a bit more help.
I am able to populate the first dropdown.
But I don’t quite get how to populate the second.
"retrieve the orderLines values from the resultprovider for the item that user has selected from the orders dropdown and assign those values to a string list. Bind the string list to the orderLines dropdown. "

How do I retrieve these values and populate a string list?
I am feeling very lost in the portlet world. :frowning:

regards
John Arne

Hi John,

i have used a raiseOnChange control along with the asnyHiddenCommand button.
this button is binded to an action which will transfer the values from the result provider to string list.

Code for transferring the values from contentProvider to the ArrayList
U have to create two content providers for the orderNo’s one is GroupOfOptions and another one is BasicTable(version 7.1.2)

getPersonalDetailsBean().getQualifications().clear();
Iterator assQual = getDetailsProvider().getList().iterator();
while(assQual.hasNext())
{
__Details assQ = (__Details)assQual.next();
if(getPersonalDetailsBean().getCountryObtained().equals(“Select”))
{
return “”;
}
else
{
if(getPersonalDetailsBean().getCountryObtained().equals(assQ.getCountryName()))
{
int size = assQ.getQualificationDetails().length;
for(int j=0;j<size;j++)
{
if(assQ.getQualificationDetails()[j].getQualificationName().equals(“No”))
{
return “”;
}
else
{
getPersonalDetailsBean().getQualifications().add(j,assQ.getQualificationDetails()[j].getQualificationName());
}
}
}

    		}
    	}

Hi John,

i have used a raiseOnChange control along with the asnyHiddenCommand button.
this button is binded to an action which will transfer the values from the result provider to string list.

Code for transferring the values from contentProvider to the ArrayList
U have to create two content providers for the orderNo’s one is GroupOfOptions and another one is BasicTable(version 7.1.2)

getPersonalDetailsBean().getQualifications().clear();
Iterator assQual = getDetailsProvider().getList().iterator();
while(assQual.hasNext())
{
__Details assQ = (__Details)assQual.next();
if(getPersonalDetailsBean().getCountryObtained().equals(“Select”))
{
return “”;
}
else
{
if(getPersonalDetailsBean().getCountryObtained().equals(assQ.getCountryName()))
{
int size = assQ.getQualificationDetails().length;
for(int j=0;j<size;j++)
{
if(assQ.getQualificationDetails()[j].getQualificationName().equals(“No”))
{
return “”;
}
else
{
getPersonalDetailsBean().getQualifications().add(j,assQ.getQualificationDetails()[j].getQualificationName());
}
}
}

    		}
    	}

Regards,
Sunil