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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:40:15+00:00 2026-05-24T00:40:15+00:00

I have a command object associated with a spring form controller: public class PluginInstance

  • 0

I have a command object associated with a spring form controller:

public class PluginInstance {
  private Set<PluginParameter> pluginParameters = new HashSet<PluginParameter>();
  ... some other string/long properties and getter setters...
}

the PluginParameter also have a Set in it which contain the values

public class PluginParameter {
  private String parmName;
  private Set<PluginParmvalue> pluginParmvalues = new HashSet<PluginParmvalue>();
  ...some other string/long properties and getter setters...
}

(Normally the pluginParmvalues will contain only one value, a list have been used for future expandability)

In the spring form I binding the values as

<form:input path="pluginParameters[${itemsRow.index}].pluginParmvalues[0].parmValue" />

but the thing is that there can be a form:select(to present multiple predefined options to the user) or form:input (user can input any value). This has to be decided from another object

public class PluginConfigParm {
  private String parmName;
  private ArrayList<String> choices;
  ...getter setters and other properties
}

where I have to compare the name of PluginConfigParm.paramName with PluginParameter.paramName when they match and PluginConfigParm.choices.size() > 0 then form:select will be shown populated with the values from PluginConfigParm.choices otherwise form:input will be shown.

The question is simple: How can I do that.
Any help will be highly appreciated.

  • 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-24T00:40:15+00:00Added an answer on May 24, 2026 at 12:40 am

    By using List<> instead of Set<> in controller. Problem solved. May be Set<> has no getter/setter that can be bind with spring form.

    So <form:input path="pluginParameters[${itemsRow.index}].pluginParmvalues[0].parmValue" />
    and List<> in controller makes my life easier.

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

Sidebar

Related Questions

I have a Grails command object that contains an emailAddresses field, e.g. public class
Let's say I have an object who's class definition looks like: class Command: foo
Let's say I have the following command object: class BreakfastSelectCommand{ List<Breakfast> possibleBreakfasts; Breakfast selectedBreakfast;
I have multiple SimpleFormController controllers. One controller contains a command object used to filter
I have a populated SqlCommand object containing the command text and parameters of various
I have this method: public static IEnumerable<T> ExecuteReaderSp<T>(string sp, string cs, object parameters) where
public void execute(Runnable command) This command object contains the submitted object, but it seems
In my ASP.net C# web project I have a query command object that has
I currently have a Database Command object in my Crystal Report that looks something
I have saved an image to a byte[] in a command object and wish

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.