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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:19:52+00:00 2026-06-03T02:19:52+00:00

I am using seam 2.2.2.Final on JBoss AS 5. I am working on a

  • 0

I am using seam 2.2.2.Final on JBoss AS 5. I am working on a multi-page wizard.On my first page, user will be able to enter several business names separated by a new line on a textarea.

<s:decorate id="businessNameTextAreaField" template="layout/edit.xhtml">

                    <ui:define name="label">Business Names</ui:define>

                    <h:inputTextarea id="businessNameTextArea"

                                   cols="80"

                                   rows="3"

                               required="true"

                                  value="#{businessNameHome.instance.businessNameTextArea}"/>

            </s:decorate>

Upon submission of the page, the system parses the inputed value and splits it into a list of strings

      public String checkBusinessNames(){

            String businessNameTextArea = this.getInstance().getbusinessNameTextArea();

            String[] businessNameTextAreaArray = businessNameTextArea.split("\\n");



            List<SelectItem> businessNameChoices = new ArrayList<SelectItem>();



            for(String businessNameText: businessNameTextAreaArray){           

                businessNameChoices.add(new SelectItem(businessNameText));

            }



            this.getInstance().setBusinessNameChoices(businessNameChoices);

            return "valid";

      }

The user is then asked to select from the list of valid business names to register

<s:decorate id="businessNameRegisterListField" template="layout/edit.xhtml">

 <ui:define name="label">Business Name</ui:define>

 <h:selectManyCheckbox  value="#{businessNameHome.instance.selectedbusinessName}" layout="pageDirection" immediate="true" >

 <s:selectItems value="#{businessNameHome.instance.businessNameChoices}" var="bn" label="#{bn.label}" />                                                                                      </h:selectManyCheckbox>                            

  </s:decorate>

selectedbusinessName is of type String while businessNameChoices is of List

Upon submission of the page, what is submitted as business names is something like this:

javax.faces.model.SelectItem@135aa7c

I have tried putting an itemValue on the s:selectItems but I get another error which is “Value is not valid”

Tried to use <s:convertEntity> but gets a NumberFormatException

I have also tried to create my own converter

public class BusinessNameBeanConverter implements javax.faces.convert.Converter {

        @Override

        public Object getAsObject(FacesContext context, UIComponent cmp, String value)      {

            // TODO Auto-generated method stub

            System.out.println("getAsObject "+value);

            return value;

        }



        @Override

        public String getAsString(FacesContext context, UIComponent cmp, Object value) {

            // TODO Auto-generated method stub

            System.out.println("getAsString "+((SelectItem)value).getValue());

            return ((SelectItem)value).getValue();

        }



    }

but I still get the same “Value is not valid” error.

I don’t know what to do anymore. Please help.

Thanks,

Nicholas

  • 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-03T02:19:54+00:00Added an answer on June 3, 2026 at 2:19 am

    Change

    <s:selectItems value="#{businessNameHome.instance.businessNameChoices}" var="bn" label="#{bn.label}" />
    

    to

    <f:selectItems value="#{businessNameHome.instance.businessNameChoices}" />
    

    You’ve namely already a List<SelectItem>, not a List<SomeObject> for which <s:selectItems> is useful.

    Don’t forget to remove the converter, it makes no sense.

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

Sidebar

Related Questions

I'm writing an application using Seam 2.2.x which will be deployed on JBoss 5.1.
I have a jboss seam 2.2.2 project and it is my first time using
I have to investigate the possibility of using JBoss and Seam to build user
I'm using seam page navigation rules. and did not experience any problem with adding
I am trying to update user details like firstName, lastName, emailAddress especially using Seam's
Given a web application built using Jboss seam with following details: dynamic web module:
Im using JBOSS Seam 2.2.1 and I am trying to work with application server
I'm using JBOSS Seam 2.0 with JBoss 6 to send emails. I'm getting java.lang.UnsupportedOperationException
I'm writing application in JBoss 7.1.1.Final, Weld, Seam 3. I have following bean: @ConversationScoped
I'm making a program using Seam and Java. On my web page I have

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.