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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:00:46+00:00 2026-06-13T10:00:46+00:00

I would like to call a setter directly from a command button and pass

  • 0

I would like to call a setter directly from a command button and pass a value. My problem is that the setter is expecting a Character and jsf if passing it back as a String. Is there a good way to ‘fix’ this on the front end instead of having to over load the setter on my backing bean?

commandButton:

<p:commandButton value="SignOff"
    actionListener="#{manageItemHandler.dataEntryOp.setBomComplete('Y')}"
    rendered="#{speed2Session.isRendered('editManageItemOp')}"/>

getter/setter from backing bean:

protected Character bomComplete;

/**
 * @return the bomComplete
 */
public Character getBomComplete() {
    return bomComplete;
}
/**
 * @param bomComplete the bomComplete to set
 */
public void setBomComplete(Character bomComplete) {
    this.bomComplete = bomComplete;
}

When I click the commandbutton I get

11:47:19,270 SEVERE [javax.enterprise.resource.webcontainer.jsf.context] (http-steves-172.16.8.26-15081-1) JSF1073: javax.faces.event.AbortProcessingException caught during processing of INVOKE_APPLICATION 5 : UIComponent-ClientId=centerForm:j_idt271, Message=Method not found: data.operation.OperationData@595025a.setBomComplete(java.lang.String)
11:47:19,273 SEVERE [javax.enterprise.resource.webcontainer.jsf.context] (http-steves-172.16.8.26-15081-1) Method not found: data.operation.OperationData@595025a.setBomComplete(java.lang.String): javax.faces.event.AbortProcessingException: Method not found: data.operation.OperationData@595025a.setBomComplete(java.lang.String)
  • 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-13T10:00:47+00:00Added an answer on June 13, 2026 at 10:00 am

    This is unfortunately by design. Everything in quotes is in EL treated as String. A workaround would be to pass String#charAt() instead.

    #{manageItemHandler.dataEntryOp.setBomComplete('Y'.charAt(0))}
    

    This is only ugly. An alternative is to pass its int codepoint instead, which is 89 for Y.

    #{manageItemHandler.dataEntryOp.setBomComplete(89)}
    

    But this is not exactly self-documenting. Much better is to just make use of enums.

    public enum Choice {
        Y, N;
    }
    

    with

    protected Choice bomComplete;
    

    which you can just invoke the desired way

    #{manageItemHandler.dataEntryOp.setBomComplete('Y')}
    

    The string 'Y' will be automatically converted to that enum. As a bonus, enums have many more additional advantages, such as compile time type safety.

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

Sidebar

Related Questions

I would like to call a Python script from within a Bash while loop.
I have a data set that that I would like to call in a
I would like to call JavaScript function many time . I have tried like
I would like to call a stored procedure (Oracle). As I my procedure calls
I would like to call the event handler just one time, and then detach
In order to make bundle work on its own i would like to call
For logging purposes, I would like to call the .ToString() method of every object
This is an objective-c question. I would like to call a method in an
I have a vector of pointers. I would like to call a function for
I've got a pickerview. I would like to call a specific function each time

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.