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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:53:08+00:00 2026-05-25T21:53:08+00:00

I have an issue binding the AutoPupulating List in a form to update the

  • 0

I have an issue binding the AutoPupulating List in a form to update the data. I was able to save the data using Autopopulating list though.

Here is the form backing model.

public class AddUpdateShot {

private Integer shootId;
private char shotSelect;
private String shotNotes;   
private Integer numOfItems;
private AutoPopulatingList itemNumColors;
private Integer totalNumOfItems;
private String shotName;

----------

public void setItemNumColors(AutoPopulatingList  itemNumColors){
    this.itemNumColors = itemNumColors;
}

public AutoPopulatingList getItemNumColors(){
    return this.itemNumColors;
}

--------

}

Where itemNumClors is a simple model

public class ItemNumColor {

private Integer id;
private Integer itemNum;
private String itemName;
private String colorCode;
private String colorName;

------get and set methods    

}

When I first saved the data, depending on how many ItemColors the user wanted,using jquery I added the input fields dynamically as shown in the following code.

<form:form id="createShootForm" method="POST"
            commandName="createShoot">
<tr>
<td align="left"><label for="shootName">*Shoot Name:</label></td>
<td><form:input id="shootName" class="required" path="shootName" /></td>
</tr>
 ------- other input fields in form backing obj----

<c:forEach var="i" begin="${start}" end="${end-1}" step="1" varStatus="status">
<tr>
    <td align="left"><label for="itemNumber${i}">Item
            Number${i+1}:</label></td>
    <td><form:input id="itemNumber${i}"
            path="createShoot.itemNumColors[${i}].itemNum" /></td>
    <td><form:select id="color${i}"
            path="createShoot.itemNumColors[${i}].colorCode">
            <form:option value="" label="Color" />
        </form:select>
    </td>
</tr>
</c:forEach>
<tr id="submitRow">
<td></td>
<td></td>
<td align="right"><input name="submit" type="submit" value="Next" /></td>
</tr>
</table>
</form:form>

The above code worked perfectly fine when I initially saved the data. But now when the user want to update the earlier saved data, I am unable to bind the Autopopulating list to the JSP. Here is how am doing it.

<form:form id="updateShotForm" method="POST"
            commandName="shotToUpdate">
----other input fields of form backing object---
<c:forEach var="i" begin="0" end="${totalNumOfItems-1}" step="1"
                    varStatus="status">
<tr><td align="left"><label for="itemNumber${i}">ItemNumber${i+1}:</label></td>  
<td><form:input id="itemNumber${i}"path="shotToUpdate.itemNumColors[${i}].itemNum"  /></td> 
</tr>
</c:forEach>
<tr id="submitRow">
<td></td>
<td></td>
<td align="right"><input name="submit" type="submit"
                        value="Next" />
</td>
</table>
</form:form>

When I open the edit JSP, I get the following run time exception

Sep 7, 2011 10:38:00 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [jalapeno] in context with path [/OnLocation] threw exception [An exception occurred processing JSP page /WEB-INF/views/app/updateShot.jsp at line 256

253:   <tr>
254:    <td align="left"><label for="itemNumber${i}">Item
255:                Number${i+1}:</label></td>
256:    <td><form:input id="itemNumber${i}"
257:        path="shotToUpdate.itemNumColors[${i}].itemNum" /></td>
258:    <td><form:select id="color${i}"
259:        path="shotToUpdate.itemNumColors[${i}].colorCode">

Stacktrace:] with root cause
org.springframework.beans.NotReadablePropertyException: Invalid property 'shotToUpdate' of bean class [com.jcrew.jalapeno.app.model.AddUpdateShot]: Bean property 'shotToUpdate' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:707)
at org.springframework.beans.BeanWrapperImpl.getNestedBeanWrapper(BeanWrapperImpl.java:555)
at org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(BeanWrapperImpl.java:532)
at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:697)
at org.springframework.validation.AbstractPropertyBindingResult.getActualFieldValue(AbstractPropertyBindingResult.java:98)
at org.springframework.validation.AbstractBindingResult.getFieldValue(AbstractBindingResult.java:224)
at org.springframework.web.servlet.support.BindStatus.<init>(BindStatus.java:120)
at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getBindStatus(AbstractDataBoundFormElementTag.java:174)
at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getPropertyPath(AbstractDataBoundFormElementTag.java:194)
at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getName(AbstractDataBoundFormElementTag.java:160)
at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.writeDefaultAttributes(AbstractDataBoundFormElementTag.java:123)
at org.springframework.web.servlet.tags.form.AbstractHtmlElementTag.writeDefaultAttributes(AbstractHtmlElementTag.java:408)
at org.springframework.web.servlet.tags.form.InputTag.writeTagContent(InputTag.java:140)
at org.springframework.web.servlet.tags.form.AbstractFormTag.doStartTagInternal(AbstractFormTag.java:102)

I am not sure why I am not able to bind the object this way to the form since my form backing object does have an Autopopulating List which I initialised in the controller before loading this form

    AutoPopulatingList itemNumColors = new AutoPopulatingList(ItemNumColor.class);

    for( OnLocShotItemNumber onLocItemNumColor : itemNumColorsList){
        ItemNumColor itemColor = new ItemNumColor();
        itemColor.setId(onLocItemNumColor.getId());
        itemColor.setColorCode(onLocItemNumColor.getItemColorCode());
        itemColor.setItemNum(onLocItemNumColor.getItemNumber());
        itemNumColors.add(itemColor);
    }

    shotToUpdate.setItemNumColors(itemNumColors);

model.put("shotToUpdate", shotToUpdate);
model.put("totalNumOfItems", itemNumColorsList.size());

Any help is greatly appreciated.

Thanks,
Shravanthi

  • 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-25T21:53:08+00:00Added an answer on May 25, 2026 at 9:53 pm

    Remove the ‘shotToUpdate.’ keyword from the PATH attribute. You have already specified the command object name so the PATH attributes should be relative to the command object.

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

Sidebar

Related Questions

I have a very simple WPF application in which I am using data binding
I have a small issue binding the values into a dropdown using LINQ in
I have an issue with model binding a checkbox from a form to an
I have a WPF sorting/binding issue. (Disclaimer: I am very new to WPF and
I have an issue that is driving me a bit nuts: Using a UserProfileManager
We have an issue using the PEAR libraries on Windows from PHP . Pear
I have an issue with using AWK to simply remove a field from a
I have an issue trying to persist entities to the DB using code-first technique.
i have this issue : Cannot add or update a child row: a foreign
I am having an issue with Dynamic Binding in JSF page I am using

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.