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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:30:34+00:00 2026-05-16T12:30:34+00:00

I am using Stripes for a project and have a situation I cannot understand.

  • 0

I am using Stripes for a project and have a situation I cannot understand. In my action bean I have a list of objects (for setting app config params) and in the jsp I am dynamically creating input fields for each object. For a normal edit everything works fine however if I try and set a field to empty the object value remains what it was previously. I have looked extensively through the code and am confident it is not being done by any of the code we have written. When I debug I can see that the setValue() method of my object is being called for all configuration objects except the one that is blank, rather than setValue being called with an empty string which is what I would expect.

Does anyone know if Stripes is doing something under the hood which is affecting this?

Thanks

Snippets of Code:

Object code:

public class Configuration implements Serializable {
  @Id
  @Basic(optional = false)
  @Column(name = "id", nullable = false)    
  private Integer id;

  @Basic(optional = false)
  @Column(name = "name", nullable = false, length = 100, updatable = false)
  private String name;

  @Basic(optional = true)
  @Column(name = "value", nullable = true, length = 200)
  private String value;
  ...
  public void setValue(String value) {
    //This is never called when I empty my input field
    this.value = value;
  }
  ...
 }

Action Bean Code:

public class ConfigActionBean extends BaseActionBean {
  private List<Configuration> allConfigurationEntries;

  @Before(stages = LifecycleStage.BindingAndValidation)
  public void rehydrate() {
    allConfigurationEntries = configurationService.getAllEntries();        
  }

  @DefaultHandler
  public Resolution view() {
    return new ForwardResolution(
            "/WEB-INF/jsp/admin/configuration.jsp");
  }

  public Resolution Save() {       
    configurationService.saveAllEntries(allConfigurationEntries,is);
    return new RedirectResolution(ConfigActionBean.class,"view");
  }

  public void setAllConfigurationEntries(
        List<Configuration> allConfigurationEntries) {
    this.allConfigurationEntries = allConfigurationEntries;
  }

  public List<Configuration> getAllConfigurationEntries() {
    return allConfigurationEntries;
  }
  ...
}

View JSP Code:

...
<c:forEach items="${actionBean.allConfigurationEntries}" var="items" varStatus="loop">
   <div>
      <s:label for="allConfigurationEntries[${loop.index}].value">${items.name}</s:label>
      <s:text id="${items.name}" name="allConfigurationEntries[${loop.index}].value" value="${items.value}" />
   </div>
</c:forEach>
...
  • 1 1 Answer
  • 1 View
  • 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-16T12:30:35+00:00Added an answer on May 16, 2026 at 12:30 pm

    Webbrowsers don’t add empty fields to the http request. Thus by removing the @Before method and putting this code into the view() method you’re issue will be resolved.

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

Sidebar

Related Questions

I have been working on a small web app using the Stripes framework. Now
I'm building a web application using Stripes and Spring. It needs to have a
I'm using Stripes 1.5 and I was using a interceptor (based on this example
I'm using Stripes and I am validating the values of a drop down box
I am currently working with Stripes and I have an ActionBean that loads a
All - I'm using stripes to do some form input for a problem I'm
I'm having an issue using Stripes validation method. It works but rather than returning
I have started using Selenium IDE. I am recording my actions to create tests.
I have the understanding that using data access routines directly from presentation code is
I am using Stripes and jQuery along with a generated jQuery UI theme. 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.