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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:37:44+00:00 2026-05-16T06:37:44+00:00

I’m trying to build some select boxes with dependencies on other select boxes. I’m

  • 0

I’m trying to build some select boxes with dependencies on other select boxes. I’m fairly new to Seam – just to add this. Here is my JSF – for test purposes I’m trying to display a dataTable

<f:facet name="header">Profil</f:facet>

<a:form ajaxSubmit="true" reRender="testTable">
    <s:decorate id="techTypeField" template="layout/edit.xhtml">
        <ui:define name="label">Choose tech</ui:define>
           <h:selectOneRadio id="techType" value="#{technologyType}" onchange="submit()">
                <s:selectItems value="#{technologyTypes}" var="elem" label="#{elem.name}" id="typeId"/>
                <s:convertEntity/>
           </h:selectOneRadio>
    </s:decorate>
</a:form>

<div style="clear:both"/>

<h:dataTable var="productLine" id="testTable" value="#{productLines}" rendered="#{productLines.rowCount > 0}">
    <h:column >
        <f:facet name="header">pl</f:facet>
        #{productLine.id}
    </h:column>
</h:dataTable>

My backing bean

package de.ac.dmg.productfinder.workflow;

import java.util.List;

import javax.ejb.Remove;
import javax.ejb.Stateful;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.jboss.seam.annotations.Factory;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.datamodel.DataModel;
import org.jboss.seam.annotations.datamodel.DataModelSelection;
import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.log.Log;

import de.ac.entity.Machine;
import de.ac.entity.ProductLine;
import de.ac.entity.TechnologyType;

@Stateful
@Name("Profil")

public class ProfilBean implements IProfil {
@PersistenceContext
private EntityManager entityManager;

@Logger
private Log log;

@DataModel(value = "technologyTypes")
private List<TechnologyType> technologyTypes;

@DataModelSelection(value = "technologyTypes")
private TechnologyType technologyType;

@DataModel(value = "productLines")
private List<ProductLine> productLines;

@DataModel(value = "machines")
List<Machine> machines;

@In
StatusMessages statusMessages;

// add additional action methods

@Factory("technologyTypes")
public void loadTechTypes() {
    technologyTypes = entityManager.createQuery("Select t from TechnologyType t").getResultList();
}

@Factory("productLines")
public void loadProductLinies() {
    System.out.println(technologyType);
    productLines = entityManager.createQuery("select p from ProductLine p where p.technologyType = :type ")
            .setParameter("type", technologyType).getResultList();
}

public void next() {
    // implement your business logic here
    log.info("Profil.next() action called with: #{Profil.value}");
    statusMessages.add("next #{Profil.value}");
}

@Remove
public void destroy() {
}

}

I can set the tech type on time – after one click it isn’t refreshed sadly. What I’m doing wrong here?

  • 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-16T06:37:45+00:00Added an answer on May 16, 2026 at 6:37 am

    When selecting a ‘technology type’, you need an action which reloades the product types based on the selected techtype. Something like action=#{Profil.loadProductLines()}

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

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to select an H1 element which is the second-child in its group
I know there's a lot of other questions out there that deal with this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have some data like this: 1 2 3 4 5 9 2 6
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has

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.