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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:17:06+00:00 2026-06-13T13:17:06+00:00

I am trying to update a row in a JSF data table based on

  • 0

I am trying to update a row in a JSF data table based on the method in this article: http://www.mkyong.com/jsf2/how-to-update-row-in-jsf-datatable/

When I click Save, I am getting this error message:

Conversion Error setting value ‘1970-09-08’ for ‘null Converter’.

Screenshot:
Screenshot

Markup:

<h:form>
                        <h:commandButton action="addEmployee" value="Add New" class="btn btn-primary" />
                        <br />

                        <h:dataTable class="table table-striped" value="#{employeeCollection.items}" var="item">
                            <h:column>
                                <f:facet name="header">Edit</f:facet>
                                <h:commandButton action="#{employeeCollection.edit(item)}" value="Edit" class="btn" rendered="#{not item.isEditing}" />
                                <h:commandButton action="#{employeeCollection.save(item)}" value="Save" class="btn btn-success" rendered="#{item.isEditing}" />
                            </h:column>
                            <h:column>
                                <f:facet name="header">First Name</f:facet>
                                <h:inputText value="#{item.firstName}" rendered="#{item.isEditing}" />
                                <h:outputText value="#{item.firstName}" rendered="#{not item.isEditing}" />
                            </h:column>
                            <h:column>
                                <f:facet name="header">Last Name</f:facet>
                                <h:inputText value="#{item.lastName}" rendered="#{item.isEditing}" />
                                <h:outputText value="#{item.lastName}" rendered="#{not item.isEditing}" />
                            </h:column>
                            <h:column>
                                <f:facet name="header">Date of Birth</f:facet>
                                <h:inputText value="#{item.dateOfBirth}" rendered="#{item.isEditing}" />
                                <h:outputText value="#{item.dateOfBirth}" rendered="#{not item.isEditing}" />
                            </h:column>
                        </h:dataTable>
                    </h:form>

I would post the managed bean code, but I don’t think that’s necessary because when clicking the Save button, the save(item) function never seems to be called anyway… so it must be something else. I am new to Java, so probably I’m forgetting something very basic here, somewhere…

  • 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-13T13:17:07+00:00Added an answer on June 13, 2026 at 1:17 pm

    The error describes that there was an error converting the String using a null converter. This happens if you use a Date object in your <h:inputText> tag component without a DateTime converter. You can fix this by changing the JSF code:

    <h:column>
        <f:facet name="header">Date of Birth</f:facet>
        <h:inputText value="#{item.dateOfBirth}" rendered="#{item.isEditing}">
            <!-- adding the datetime converter -->
            <f:convertDateTime pattern="yyyy-MM-dd" />
        </h:inputText>
        <h:outputText value="#{item.dateOfBirth}" rendered="#{not item.isEditing}" />
    </h:column>
    

    Still, it’s not a good approach to handle the date validations for you and your user. It would be better to use a third party library that provides you a Calendar component like PrimeFaces Calendar or RichFaces Calendar.

    Note that you can use the JSF provided converters for DateTime and Numbers, and you can create your custom data converters. More info:

    • Custom Converter in JSF 2.0
    • Custom converter JSF 2 with arguments
    • Generic JSF entity converter
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to update an sqlite table row(id, data columns) from rails console. All
I'm trying to do a single row insert/update on a table but all the
I am trying to update a table in my database with another row from
I'm getting this error when trying to update a row in DB through stored
I am trying to update a row in a table which has no unique
I am trying to figure out how to update a row in one table,
Hi When i'm trying to update a jdbc table only first row gets updated
I am trying to update a row called ctcode in a table called partnumber
I'm trying to update some rows in a table based on two other columns
I'm trying to update a table with demo data, so I decided to build

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.