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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:21:27+00:00 2026-06-09T02:21:27+00:00

I’m trying to create a basic table with JSF 2.0 to send timesheet entries

  • 0

I’m trying to create a basic table with JSF 2.0 to send “timesheet” entries to a database. I have written my bean with setters and getters for all fields, and have managed the bean through faces-config, but I keep running into the error:
"com.sun.faces.mgbean.ManagedBeanCreationException: Unable to set property monday1 for managed bean timesheet"

The property name is irrelevant, it’s just the first property listed on faces-config. None of my int properties seem to work.

Here is the HTML / JSF table:

<h:form>
            <table>
                <thead>
                    <tr>
                        <th>Employee Details</th>
                        <th id="reqBox" colspan="2">
                            <span class="reqStar">*</span>
                            <span class="reqText">Required Field</span>
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>
                            Employee ID <br />
                            <input name="empID" type="text" value="#{userBean.id}" readonly="readonly"/>
                        </td>
                        <td>
                            Employee Name <br />
                            <input name="empName" type="text" value="#{userBean.firstName} #{userBean.lastName}" readonly="readonly" />
                        </td>
                        <td>
                            Week Starting <span class="reqStar">*</span> <br />
                            <input name="weekOf" type="text" value="" />
                            <a href="javascript:NewCal('demo1','mmddyyyy')">&nbsp;
                                <img src="images/cal.gif" border="0" alt="Pick a date" width="16" height="16" />
                            </a>
                        </td>
                    </tr>
                    <tr class="whiteSpacerRow"></tr>
                </tbody>
            </table>
            <table class="content" border="1" rules="none" frame="box" cellpadding="0" cellspacing="0">
                <thead>
                    <tr>
                        <th colspan="10">Record Timesheet</th>
                    </tr>
                    <tr class="header">
                        <td>Task</td>
                        <td>Monday</td>
                        <td>Tuesday</td>
                        <td>Wednesday</td>
                        <td>Thursday</td>
                        <td>Friday</td>
                        <td>Saturday</td>
                        <td>Sunday</td>
                        <td>Total Hours</td>
                    </tr>
                </thead>
                <tbody>
                    <tr class="dateRow">
                        <td class="blank"></td>
                        <td id="monday"></td>
                        <td id="tuesday"></td>
                        <td id="wednesday"></td>
                        <td id="thursday"></td>
                        <td id="friday"></td>
                        <td id="saturday"></td>
                        <td id="sunday"></td>
                    </tr>
                    <tr id="input_row_1">
                        <td>
                            <select name="select_1">
                                <option>-Select One-</option>
                                <option value="Development">Regular Hours</option>
                                <option value="Vacation">Paid Vacation</option>
                                <option value="LOSSOFPAY">Unpaid Vacation</option>
                                <option value="REMOTE">Remote Work</option>
                            </select>
                        </td>
                        <td id="mondayInput1">
                            <h:inputText id="monday1" size="4" value="#{timesheet.monday1}" required="false" />
                            <!-- <input name="monday1" class="smallInput" type="number" size="2" maxlength="4" min="0"/> -->
                        </td>
                        <td id="tuesdayInput1">
                            <h:inputText id="tuesday1" size="4" value="#{timesheet.tuesday1}" required="false" />
                            <!--<input name="tuesday1" class="smallInput" type="number" size="2" maxlength="4" min="0"/> -->
                        </td>
                        <td id="wednesdayInput1">
                            <h:inputText id="wednesday1" size="4" value="#{timesheet.wednesday1}" required="false" />
                            <!--<input name="wednesday1" class="smallInput" type="number" size="2" maxlength="4" min="0"/> -->
                        </td>
                        <td id="thursdayInput1">
                            <h:inputText id="thursday1" size="4" value="#{timesheet.thursday1}" required="false" />
                            <!--<input name="thursday1" class="smallInput" type="number" size="2" maxlength="4" min="0"/> -->
                        </td>
                        <td id="fridayInput1">
                            <h:inputText id="friday1" size="4" value="#{timesheet.friday1}" required="false" />
                            <!--<input name="friday1" class="smallInput" type="number" size="2" maxlength="4" min="0"/> -->
                        </td>
                        <td id="saturdayInput1">
                            <h:inputText id="saturday1" size="4" value="#{timesheet.saturday1}" required="false" />
                            <!--<input name="saturday1" class="smallInput" type="number" size="2" maxlength="4" min="0"/> -->
                        </td>
                        <td id="sundayInput1">
                            <h:inputText id="sunday1" size="4" value="#{timesheet.sunday1}" required="false" />
                            <!--<input name="sunday1" class="smallInput" type="number" size="2" maxlength="4" min="0"/> -->
                        </td>
                        <td>
                            <!-- <h:inputText id="total1" size="4" value="" required="false" /> -->
                            <input name="total1" id="total1" type="text" size="5" readonly="readonly" />
                        </td>
                    </tr>
                    <tr id="input_row_2">
                        <td>
                            <select name="select_2">
                                <option>-Select One-</option>
                                <option value="Development">Regular Hours</option>
                                <option value="Vacation">Paid Vacation</option>
                                <option value="LOSSOFPAY">Unpaid Vacation</option>
                                <option value="REMOTE">Remote Work</option>
                            </select>
                        </td>
                        <td id="mondayInput2">
                            <h:inputText id="monday2" size="4" value="#{timesheet.monday2}" required="false" />
                            <!-- <input name="monday2" class="smallInput" type="number" size="2" maxlength="4" min="0"/> -->
                        </td>
                        <td id="tuesdayInput2">
                            <h:inputText id="tuesday2" size="4" value="#{timesheet.tuesday2}" required="false" />
                            <!--<input name="tuesday2" class="smallInput" type="number" size="2" maxlength="4" min="0"/> -->
                        </td>
                        <td id="wednesdayInput2">
                            <h:inputText id="wednesday2" size="4" value="#{timesheet.wednesday2}" required="false" />
                            <!--<input name="wednesday2" class="smallInput" type="number" size="2" maxlength="4" min="0"/> -->
                        </td>
                        <td id="thursdayInput2">
                            <h:inputText id="thursday2" size="4" value="#{timesheet.thursday2}" required="false" />
                            <!--<input name="thursday2" class="smallInput" type="number" size="2" maxlength="4" min="0"/> -->
                        </td>
                        <td id="fridayInput2">
                            <h:inputText id="friday2" size="4" value="#{timesheet.friday2}" required="false" />
                            <!--<input name="friday2" class="smallInput" type="number" size="2" maxlength="4" min="0"/> -->
                        </td>
                        <td id="saturdayInput2">
                            <h:inputText id="saturday2" size="4" value="#{timesheet.saturday2}" required="false" />
                            <!--<input name="saturday2" class="smallInput" type="number" size="2" maxlength="4" min="0"/> -->
                        </td>
                        <td id="sundayInput2">
                            <h:inputText id="sunday2" size="4" value="#{timesheet.sunday2}" required="false" />
                            <!--<input name="sunday2" class="smallInput" type="number" size="2" maxlength="4" min="0"/> -->
                        </td>
                        <td>
                            <!-- <h:inputText id="total2" size="4" value="#{timesheet.total2}" required="false" /> -->
                            <input name="total2" id="total2" type="text" size="5" readonly="readonly" />
                        </td>
                    </tr>
                    <tr class="green"><th colspan="10">Expenses</th></tr>
                    <tr class="header">
                        <td class="blank"></td>
                        <td>Air Fare</td>
                        <td>Lodging</td>
                        <td>Car Rental</td>
                        <td>Per-Diem</td>
                        <td class="blank"></td>
                        <td class="blank"></td>
                        <td class="blank"></td>
                        <td>Total Expenses</td>
                    </tr>
                    <tr class="greenSpacerRow"></tr>
                    <tr>
                        <td class="blank"></td>
                        <td>
                            <h:inputText id="airFare" size="6" value="#{timesheet.airFare}" required="no" />
                            <!-- <input name="airFare" class="smallInput" type="number" size="4" maxlength="4" min="0"/> -->
                        </td>
                        <td>
                            <h:inputText id="lodging" size="6" value="#{timesheet.lodging}" required="false" />
                            <!-- <input name="lodging" class="smallInput" type="number" size="4" maxlength="4" min="0"/> -->
                        </td>
                        <td>
                            <h:inputText id="carRental" size="6" value="#{timesheet.carRental}" required="false" />
                            <!-- <input name="carRental" class="smallInput" type="number" size="4" maxlength="4" min="0"/> -->
                        </td>
                        <td>
                            <h:inputText id="perDiem" size="6" value="#{timesheet.perDiem}" required="false" />
                            <!-- <input name="perDiem" class="smallInput" type="number" size="4" maxlength="4" min="0"/> -->
                        </td>
                        <td class="blank"></td>
                        <td class="blank"></td>
                        <td class="blank"></td>
                        <td>
                            <input name="expenseTotal" id="expenseTot" class="smallInput" type="text" size="4" maxlength="4" min="0" readonly="readonly"/>
                        </td>
                    </tr>
                </tbody>
            </table>
            <table class="content" border="0" cellpadding="0" cellspacing="0">
                <tbody>
                    <tr>
                        <td>
                            <input type="button" onClick="submitTimesheet()" value="Submit" />
                            <input type="button" onClick="cancel()" value="Cancel" />
                            <input type="button" onClick="displayTimesheets()" value="Display Entered Timesheets" />
                        </td>
                    </tr>
                </tbody>
            </table>
        </h:form>

and my faces-config:

<?xml version="1.0" encoding="UTF-8"?>
<faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee"
 xmlns:xi="http://www.w3.org/2001/XInclude"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
<managed-bean>
  <managed-bean-name>timesheet</managed-bean-name>
  <managed-bean-class>com.timesheet.Timesheet</managed-bean-class>
  <managed-bean-scope>session</managed-bean-scope>
  <managed-property>
   <property-name>date</property-name>
   <property-class>java.util.Date</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>monday1</property-name>
   <property-class>int</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>monday2</property-name>
   <property-class>int</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>tuesday1</property-name>
   <property-class>int</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>tuesday2</property-name>
   <property-class>int</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>friday1</property-name>
   <property-class>int</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>friday2</property-name>
   <property-class>int</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>saturday1</property-name>
   <property-class>int</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>saturday2</property-name>
   <property-class>int</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>sunday1</property-name>
   <property-class>int</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>sunday2</property-name>
   <property-class>int</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>thursday1</property-name>
   <property-class>int</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>thursday2</property-name>
   <property-class>int</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>wednesday1</property-name>
   <property-class>int</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>wednesday2</property-name>
   <property-class>int</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>workType1</property-name>
   <property-class>java.lang.String</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>workType2</property-name>
   <property-class>java.lang.String</property-class>
   <value/>
  </managed-property>
 </managed-bean>
 <managed-bean>
  <managed-bean-name>jobPostings</managed-bean-name>
  <managed-bean-class>com.logic.JobPostings</managed-bean-class>
  <managed-bean-scope>request</managed-bean-scope>
  <managed-property>
   <property-name>postings</property-name>
   <property-class>org.apache.myfaces.custom.fileupload.UploadedFile</property-class>
   <value/>
  </managed-property>
 </managed-bean>
</faces-config>

if you want to see my stack trace or bean for setters / getters I can put it up as well

  • 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-09T02:21:28+00:00Added an answer on June 9, 2026 at 2:21 am
    <managed-property>
        <property-name>monday1</property-name>
        <property-class>int</property-class>
        <value/>
    </managed-property>
    

    You have not specified a valid int value as managed property value. Valid int values are numbers in the range of Integer.MIN_VALUE to Integer.MAX_VALUE. Empty strings or nulls are not a valid int value. Those are illegal arguments.

    To fix your problem, either make it <value>0</value>

    <managed-property>
        <property-name>monday1</property-name>
        <property-class>int</property-class>
        <value>0</value>
    </managed-property>
    

    Or just remove the <managed-property> altogether and rely on the standard Java int default of 0. I have also my doubts with all of those other value-less managed properties by the way. They seem all plain useless in first place. Actually, the whole <managed-bean> entry seems plain useless as you could just use the JSF2 @ManagedBean annotation.

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

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to create an if statement in PHP that prevents a single post
I have a reasonable size flat file database of text documents mostly saved in
I am trying to loop through a bunch of documents I have to put
I have a view passing on information from a database: def serve_article(request, id): served_article
I have two tables with like below codes: Table: Accounts id | username |
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is

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.