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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:16:46+00:00 2026-06-14T12:16:46+00:00

I am trying to create a custom type converter to convert a Collection of

  • 0

I am trying to create a custom type converter to convert a Collection of objects back and forth from a String. I have a text area in my form and want to create a new object in the Collection for every line break in the text area on my save. When displaying the information, I want to loop through the objects in the Collection and turn it into a String with line breaks for my text area. So far, I am unable to even get my converter to fire or receive any kind of errors based on the annotations that I have. Below is my class definition:

@Conversion()
public class FormsEdit extends JWebCrud{

Inside this class I have a List:

private List<Formfield> formFields;

Inside the Formnfield class I have a Set:

private Set<Formfieldopts> formfieldoptses = new HashSet<Formfieldopts>(0);

@TypeConversion(converter = "com.webexchange.actions.tpa.setup.forms.FormFieldOptsConverter")
public void setFormfieldoptses(Set<Formfieldopts> formfieldoptses) {
    this.formfieldoptses = formfieldoptses;
}

Can someone please direct me on how to properly setup these annotations to get the Converter to fire?

Struts 2 Version: 2.2.1

Struts Interceptor Stack:

            <interceptor-stack name="stackWithSecurity">
                            <interceptor-ref name="closeHibernateSession" />
            <!--catches exceptions pre or post action class-->
            <interceptor-ref name="exceptionInterceptor" />  
            <interceptor-ref name="security">
                <param name="excludeMethods">executeNoSecurity,executeNoSecurityOrValidation</param>
            </interceptor-ref>
            <interceptor-ref name="alias" />
            <interceptor-ref name="servletConfig" />
            <!-- Puts HTTPResponse and HTTPRequest objects on the action -->
             <interceptor-ref name="openHibernateSession" />
            <!-- Opens a db connection and creates a hibernate session -->
            <interceptor-ref name="prepare" />
            <interceptor-ref name="checkbox" /> <!-- Sets unchecked values into the action with a value of 'false' -->
            <interceptor-ref name="params" /><!-- Sets the parameters from the HTTP request to the action -->
            <interceptor-ref name="staticParams" />
            <interceptor-ref name="conversionError" />
            <!-- adds a field error when the value can't be converted to the right type -->
            <interceptor-ref name="chain">
                <!-- these properties should not be copied from one action to another on a chain -->
                <param name="excludes">dao</param>
            </interceptor-ref>
            <interceptor-ref name="validation">
                <param name="excludeMethods">
                    input,back,cancel,browse,delete,executeNoValidation,executeNoSecurityOrValidation,edit
                </param>
                <param name="validateAnnotatedMethodOnly">true</param>
            </interceptor-ref>
            <interceptor-ref name="workflow">
                <param name="excludeMethods">
                    input,back,cancel,browse,delete,executeNoValidation,executeNoSecurityOrValidation,edit
                </param>
            </interceptor-ref>
        </interceptor-stack>

Action Mapping:

        <action name="formsSave"
        class="com.webexchange.actions.tpa.setup.forms.FormsEdit"
        method="save">
        <result name="success">/jsp/centers/tpa/setup/forms/EditForms.jsp
        </result>
        <result name="input">/jsp/centers/tpa/setup/forms/EditForms.jsp
        </result>
    </action>
  • 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-14T12:16:48+00:00Added an answer on June 14, 2026 at 12:16 pm

    Thanks Dave for your help. My s:textarea was not pointing at the Collection I was trying to convert. After I did that the converter started to fire. What a total FAIL on my part, sorry.

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

Sidebar

Related Questions

The task: I am trying to create a custom data type and have it
I'm trying to create a node form for a custom type. I have organic
I have a custom content type with custom fields. I'm trying to create a
I'm trying to create a custom component to extend PrimeFaces. I have a simple
I am trying to create a custom popup view that can be called from
I'm trying to create a custom MembershipUser and I have to overide the GetUser()
I'm trying to create a custom control and need to raise an event from
I'm trying to create an Comparator on my custom type. Type { int state
I am trying to create a custom field type which will display values based
I'm trying to create a constructor for a custom type, but for some reason,

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.