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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:41:52+00:00 2026-05-28T05:41:52+00:00

Yesterday I was trying to implement a Listener for a SelectManyListbox using Ajax in

  • 0

Yesterday I was trying to implement a Listener for a SelectManyListbox using Ajax in JSF 2.

Following code is from my memory, since I dont have it available right now 🙂

<h:head>
<title>Test</title>
</h:head>

<h:body>
<h:selectManyListbox value="#{myBean.myList}">
    <f:ajax render="delete" listener="#{myBean.listener}" />
<h:selectManyListbox>
<h:commandbutton id="delete" disabled="#{myBean.disabled}" value="Delete" />
<h:body>

I tried a lot of different things because my listener was never called. In the end I just added a surrounding <h:form> tag and everything worked. Why is that?

My goal is a composite-control that just displays a list and enables/disables the delete-button when a item is selected/unselected. In my understanding a form is only needed when I want to submit multiple values at once.

Thanks

  • 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-28T05:41:53+00:00Added an answer on May 28, 2026 at 5:41 am

    In my understanding a form is only needed when I want to submit multiple values at once.

    This is thus untrue. A <h:form> is necessary when you want to send a POST request to the server by JSF by an UIInput component such as <h:selectManyListbox>. This is regardless of whether the POST request is performed by a regular (synchronous) request or an ajaxical (asynchronous) request. This is regardless of the amount of inputs. You should not forget that the javax.faces.ViewState hidden input field and if necessary also the name=value of the command button itself also needs to be sent along as well, so there’s basically never means of a single input value in a JSF postback request.

    POST has the major advantage over GET that there’s no limit in the amount of data which can be sent. In GET this is dependent on the webbrowser used and ranges from 255 characters until 2~4KB in older browsers and 8~10KB in newer browsers. In POST the limit is usually around 2GB.

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

Sidebar

Related Questions

I have been trying since yesterday to get google like paging, but each time
I spent about 4 hours yesterday trying to fix this issue in my code.
As I mentioned in my yesterday's post, I'm trying to teach myself templates from
I'm using the latest indy snapshot (installed yesterday) and newest SSL libraries. When trying
I just started working using Google Maps API yesterday, and trying to set up
I'm having a problem, I've been trying to solve it since yesterday but no
Good morning friendly Flashers ;) So I've been trying since yesterday to just load
I am playing with MongoDB since yesterday and absolutely love it. I am trying
Trying to get information from an external source, I'm receiving the following error: Warning
I have installed Nuget 1.2 yesterday, and today, while I was trying to install

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.