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

  • Home
  • SEARCH
  • 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 6531099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:50:12+00:00 2026-05-25T09:50:12+00:00

I have a datatable which loops through a List and has a value column

  • 0

I have a datatable which loops through a List and has a value column which renders as such:

<h:dataTable var="assessmentFieldValue" value="#{assessmentBean.assessmentFieldValues}">
    ...
    <ui:fragment rendered="#{assessmentFieldValue.field.type eq 'TEXT'}">
        <h:inputText value="#{assessmentFieldValue.value}" />
    </ui:fragment>
    <ui:fragment rendered="#{assessmentFieldValue.field.type eq 'SLIDER'}">
        <component:slider value="#{assessmentFieldValue.value}" />
    </ui:fragment>
    ...
</h:dataTable>

So sometimes I get a standard inputText, sometimes I get my composite slider component:

<composite:interface>
    <composite:attribute name="value" />
</composite:interface>

<composite:implementation>
    <script type="text/ecmascript">
        function updateValue(value) {
            $('##{cc.id} span').each(function() {
                $(this).text(value);
            });
        }
    </script>

    <div id="#{cc.id}">
        <input id="sliderComponent" type="range" min="1" max="10"
                value="#{cc.attrs.value}"
                style="float: left"
                onchange="javascript:updateValue(this.value);" />

        <h:outputText id="fieldValue" value="#{cc.attrs.value}"
                style="min-width: 20px; display: block; float: left" />
    </div>
</composite:implementation>

This all renders as I would like it too (deployed on JBoss-AS7), but when I hit the save button associated with the datatable the assessmentBean.assessmentFieldValue List doesn’t reflect any value changes on the slider component yet it does for the standard inputText.

Can anyone suggest why changes to the slider aren’t making it back to the backing bean? Thanks!

  • 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-25T09:50:12+00:00Added an answer on May 25, 2026 at 9:50 am

    That’s because you used a plain HTML <input> element instead of a fullworthy JSF input component like <h:inputText>. This way the value is in no way bound to the JSF context. It’s only treated as plain vanilla template output value, not as input value. A composite component isn’t going to solve this. You really need to create a fullworthy UIComponent for this (or to look for a 3rd party component library which has already done the nasty job for you, such as PrimeFaces with its <p:slider>).

    See also:

    • When to use <ui:include>, tag files, composite components and/or custom components?
    • 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 has a value of a bean class which looks
I have a simple program which loops through a resultset when a button is
I have one datatable which has DataTable: SeqNo ItemID ItemName ------- ------ -------- 1
I have a DataTable which has some rows and I am using the select
My ice:dataTable looks like below:- <ice:dataTable id=someTbl var=someVar value=#{someBean.someList} > <ice:column> <f:facet name=header> <ice:outputText
I have a DataTable which is bound to a GridView. I also have a
I have a DataTable which I want to save to a SQLite Database Table.
I have a DataTable which I select from database (Well, these data cross several
I have a DataTable which is bound to datagridview (Winforms)... I use the following
In C#/ASP.NET 3.5, I have a DataTable which pulls rows from the database. I

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.