Pass the "code" of the Highlighted Row of a List Of Values from Popup

I have a popup window which display a list of values in a tabular form. I have no problem to do the popup or display the table.

The table has two columns; one is the "code" and the other is the "description".

When a row is highlighted and the "SELECT" button is clicked, I am supposed to pass the "code" of the highlighted row back to the parent window. And I am struggling with it.

Here is my backing bean code:

import javax.faces.model.DataModel;

import javax.faces.model.ArrayDataModel;

import delegates.GenderBean;

publicclass GenderTypesManagementBean

{

private String code;

private String description;

private String selectedGender;

privateint rowIndex = -1;

private ArrayDataModel genderModel =null;

privatestaticfinal GenderBean[] genderTypes =

{

new GenderBean("F","Female"),

new GenderBean("M","Male"),

new GenderBean("U","Unknown"),

};

public GenderTypesManagementBean()

{

genderModel =new ArrayDataModel( genderTypes );

}

public DataModel getGenderTypes()

{

return genderModel;

}

public String getCode(){

return code;

}

publicvoid setCode(String code){

this.code = code;

}

public String getDescription(){

return description;

}

publicvoid setDescription(String description){

this.description = description;

}

public String getSelectedGender(){

return selectedGender;

}

publicvoid setSelectedGender(String selectedGender){

this.selectedGender = selectedGender;

}

public String select()

{

// need help

return"success";

}

}// End GenderTypesManagementBean.java

[3800 byte] By [jiapei_jena] at [2007-11-27 7:44:32]
# 1
This is probably most easily accomplished using JavaScript. The pop-up window can refer to its opener and invoke JS functions with arguments. You may want to consult a JavaScript forum if you need more details.
RaymondDeCampoa at 2007-7-12 19:25:07 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Thanks a lot for your reply. I will go to the JavaScript forums.
jiapei_jena at 2007-7-12 19:25:07 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...