jsf: set-Methode wird nie aufgerufen

schaefli

Grünschnabel
Hallo!
Ich habe folgendes Problem:

JSP-Code:
<h:dataTable binding="#{JCWPage.t_importCws}" headerClass="list-header" id="t_importCws" rowClasses="list-row-even,list-row-odd"
style="left: 288px; top: 192px; position: absolute" value="#{JCWPage.myDataList}" var="dataList">
<h:column binding="#{JCWPage.c_select}" id="c_select">
<f:facet name="header">
<h:eek:utputText binding="#{JCWPage.outputText7}" id="outputText7" value="Auswählen"/>
</f:facet>
<h:selectBooleanCheckbox binding="#{JCWPage.checkbox1}" id="checkbox1" value="#{dataList.isSelected}"/>
</h:column>
<h:column binding="#{JCWPage.c_name}" id="c_name">
<f:facet name="header">
<h:eek:utputText binding="#{JCWPage.outputText4}" id="outputText4" value="Name"/>
</f:facet>
<h:eek:utputText binding="#{JCWPage.outputText3}" id="outputText3" value="#{dataList.name}"/>
</h:column>
<h:column binding="#{JCWPage.c_date}" id="c_date">
<f:facet name="header">
<h:eek:utputText binding="#{JCWPage.outputText6}" id="outputText6" value="Erstellungsdatum"/>
</f:facet>
<h:eek:utputText binding="#{JCWPage.outputText5}" id="outputText5" value="#{dataList.date}"/>
</h:column>
</h:dataTable>

und ein auszug der bean:
public class JCWPage extends AbstractPageBean implements Serializable{
// <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
private int __placeholder;
private Vector myDataList = new Vector();
private List myDataItems = null;
private CWData myDataItem = new CWData();

public String b_newCW_action() {
// TODO: Process the button click action. Return value is a navigation
// case name where null will return to the same page.
includeType = "new";
return "newCW";
}

public String b_importCW_action() {
// TODO: Process the button click action. Return value is a navigation
// case name where null will return to the same page.
includeType = "import";
fillTable();
return "importCW";
}

public List getMyDataList() {
if (myDataList == null) {
fillTable(); // Preload.
}
return myDataList;
}

public void setMyDataList(Vector myDataList) {
this.myDataList = myDataList;
}

public void fillTable ()
{
//myDataList= new Vector();
try {
int builder_id = Integer.parseInt(getValue("#{TeacherLogin.id}").toString());
PreparedStatement pstmt = getSessionBean1().con.prepareStatement("SELECT cw_id, cw_name, creation_date " +
"FROM crossword WHERE is_public = 1 AND builder_id != ? ORDER BY creation_date");
pstmt.setInt(1, builder_id );
ResultSet rs = pstmt.executeQuery();

while (rs.next())
{
myDataList.add(new CWData(rs.getInt(1), rs.getString(2), (rs.getDate(3)).toString()));
}

System.out.println("fill table" + myDataList.size());

} catch (SQLException ex) {
ex.printStackTrace();
}
}

public String b_import_action() {
// TODO: Process the button click action. Return value is a navigation
// case name where null will return to the same page.
myDataItems = new ArrayList();
System.out.println("MyDataList: " + getMyDataList().size());
for (Iterator iter = getMyDataList().iterator(); iter.hasNext();) {
myDataItem = (CWData) iter.next();
//myDataItem = (MyData) getMyDataTable().getRowData();
if (myDataItem.getIsSelected()) {
myDataItems.add(myDataItem);
myDataItem.setSelected(false); // Reset.
}
}

System.out.println("Test muh" + myDataItems.size());

// Do your thing with the MyData items in List myDataItems.

return "case1"; // Navigation case.
}

Warum wird die set-Methode von myDataList nie aufgerufen? Durch fillTable wird sie befüllt, klicke ich aber jetz auf den button b_import sind keine werte mehr in der Liste!

Würde mich auf antworten freuen!
 
Zurück