I have a dataTable which has a value of a bean class which looks like this:
public class myBean {
private List<SelectItem> depList;
With getters and setters.
My getter calls a method buildDepList()
which gets department names from the database and fills the depList.
Here's how my JSP file looks like:
<ice:dataTable id="specializationTable" style="height: 216px; left: 134px; top: 62px; position: absolute"
value="#{AdmissionApplication$Application.specBean}" var="specRow" width="480">
<ice:column id="column2">
<ice:outputText id="outputText9" value="#{specRow.choiceNum}" visible="true"/>
<f:facet name="header">
<ice:outputText id="outputText3" value="#{msg.Choice_Number}"/>
</f:facet>
</ice:column>
<ice:column id="column4">
<f:facet name="header">
<ice:outputText id="outputText8" value="#{msg.Department}"/>
</f:facet>
<ice:selectOneMenu id="selectOneMenu2" partialSubmit="true" value="#{specRow.departmentName}">
<f:selectItems id="selectOneMenu2selectItems" value="#{specRow.departmentItems}"/>
</ice:selectOneMenu>
</ice:column>
<ice:column id="column5">
<f:facet name="header">
<ice:outputText id="outputText10" value="#{msg.Specialization}"/>
</f:facet>
<ice:selectOneMenu id="collegesSelectOneMenu" partialSubmit="true" style="width: 118px" value="#{specRow.specializationName}">
<f:selectItems id="selectOneMenu3selectItems22" value="#{specRow.specializationItems}"/>
</ice:selectOneMenu>
</ice:column>
</ice:dataTable> -->
The value of the selectOneMenu
(the String
) should be in a session Bean, right?
myBean
class is in fact application scoped. I have a list of this object List<myBean>
called specBean
as you can see in my JSP code where the dataTable
value is set to that.
What do you suggest, should I have n
different variables for the names of the selectOneMenu
to save in the session? How do you suggest to do that?