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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:25:02+00:00 2026-06-11T13:25:02+00:00

I want to create a web page using JSF with the following table: Item

  • 0

I want to create a web page using JSF with the following table:

Item 1 | ( ) good ( ) ok ( ) bad
Item 2 | ( ) good ( ) ok ( ) bad
Item 3 | ( ) good ( ) ok ( ) bad
[…]

After a radio button has been checked, I immediately want to submit and process the rating. The current code for the dataTable looks as follows:

<h:dataTable value="#{bean.list}" var="item">
    <h:column>
        <h:outputText value="#{item.title}"/>
    </h:column>
    <h:column>
        <h:form>
        <h:selectOneRadio id="rate" value="#{bean.rate}">
            <f:selectItem itemValue="1" itemLabel="good" />
            <f:selectItem itemValue="0" itemLabel="ok" />
            <f:selectItem itemValue="-1" itemLabel="bad" />
            <f:ajax event="click" execute="rate" />
        </h:selectOneRadio>
        </h:form>
    </h:column>
</h:dataTable>

The problem I am now facing: I need to determine, which item was actually rated. Can somebody give me a hint how I can achieve this?

  • 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-11T13:25:03+00:00Added an answer on June 11, 2026 at 1:25 pm

    You can choose among several techniques. For example, you could use a Map in your bean

    <h:selectOneRadio value="#{bean.ratePerItem[item]}"

    Map<ItemClass, Integer> ratePerItem;

    That way you must walk through the map looking for values. A simpler approach for your needs might be using a h:inputHidden which stores the item.

    Or, maybe better, f:setPropertyActionListener. It depends on what you exactly want.

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

Sidebar

Related Questions

I need to create a table on a web page that has two rows.
I want to create a web page background image that fills the entire background,
I want to create a web page where a registered user picks a number
I want to create a web page that allows the user to initiate a
For an internal customer service application, I want to create a web page that
I want to open a website on a button click of asp.net web page.
I'm using snap framework and haskell to create simple web application.I want to know
I want to create a client side mail creator web page. I know the
I want to create web application using Grails. The main layout consists of few
I want to convert a ASP.NET web page to pdf using ITextSharp. I did

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.