Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 859503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:41:21+00:00 2026-05-15T08:41:21+00:00

I have a dataTable which has a value of a bean class which looks

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T08:41:21+00:00Added an answer on May 15, 2026 at 8:41 am

    The value of the selectOneMenu (the String) should be in a session Bean, right?

    Depends. Putting it in a session scoped bean will cause any changes in the value to be reflected/influenced to/by multiple browser windows/tabs in the same session. This may cause unintuitive webapp behaviour and thus lead to bad user experience. A request scoped (or if you’re already on JSF 2.0, view scoped) bean is a better choice.

    myBean class is in fact application scoped. I have a list of this object List 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?

    It’s unclear what you’re talking about here, but i and f the data is constant throughout the entire application and can be shared among different sessions/requests, such as the List<SelectItem> for f:selectItems, then it’s indeed better to put it in an application scoped bean.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a datatable which loops through a List and has a value column
I have this class: public class CampaignMaps : List<CampaignMap> { }; The CampaignMap object
I have a datatable which contains yearly data saved. e.g. dtDate Value 2010-01-01 00:00:00.000
I have a list view which is bound to a DataTable source. The sorting
I've a datatable which has a single text column 'Title' which can have multiple
I have created a class say A which has some functions defined as protected.
I have one DataTable which has four columns such as MileStoneID MileStoneName Percentage SeqNbr
I have a DataTable, which has a number of columns. Some of those columns
I have an object (Ticket), which has a list of other objects (Message). Message
I have a WPF DataGrid which has a DataTable as its ItemsSource . The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.