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 7983591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:00:23+00:00 2026-06-04T11:00:23+00:00

Using seam-gen based code. I have an object Classroom, which contains an instance of

  • 0

Using seam-gen based code. I have an object “Classroom”, which contains an instance of “Location”. I want to query for classrooms but specifying a value on the Location object.

Something like ‘select from Classroom where Location.State = “NY”‘. When I try to bind a selectOneMenu with a list of states to #{ClassroomList.classroom.location.state} I’m getting errors.

Was getting a null pointer exception on Location. I’m assuming I need to instantiate a new “Location” on the Classroom object, but not sure where to do that. On the Classroom entity’s constructor? On the ClassroomList backing bean (where the example object is bound to the ClassroomList JSP search fields)?

  • 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-06-04T11:00:25+00:00Added an answer on June 4, 2026 at 11:00 am

    Not sure if this is the best way, but I got it working.

    I have a String exposed on my ClassroomList backing bean as “String locationState”. My dropdown list of states binds to that

    Then that’s referenced in my restrictions as:
    …
    lower(classroom.location.state) like lower(concat(#{classroomList.locationState}, ‘%’))”,
    …

    —

    When I tried to instantiate ClassroomList.instance.Location, I would get:
    javax.servlet.ServletException with message: “Id and clazz must not be null”
    Not sure what’s causing that?

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

Sidebar

Related Questions

I have written an application using Seam 2.2.1 & MySQL which is working. I
I haved generated simple CRUD application from seam-gen using seam generate-ui command, but the
I generated a new form using sean-gen (seam new-form) and added another field to
We are using Seam 2.2.0 Java 1.6.14 Weblogic 10.3.1.0 (named 11g Doh!) I have
I am testing a Seam application using the needle test API. In my code
I created an application using seam-gen. The created operation to search the DB ends
I would like to create an application from a database schema using seam-gen; unfortunately
I'm writing an application using Seam 2.2.x which will be deployed on JBoss 5.1.
I created a seam application using seam-gen. I am getting below error while navigating
I am making a web application using JBoss Seam 2.2.0, and I want to

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.