Validate modification in ajax on a h:selectOneListbox

Posted on 2009-06-29
Medium Priority
Last Modified: 2013-11-24

I need to do the same thing that the related question, this time this is on a html event, so I don't know exactly how to manage this with the a4j:support?


Is there an other component in richfaces that have the same display and have listener? or permit to have an direct synchronisation with the bean?
Question by:Nargzul
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 60

Expert Comment

by:Kevin Cross
ID: 24740370
Check the ajaxValidator, should work.  This page gives example of how to code the ValidationBean and include the tag in JSF.


Author Comment

ID: 24740453
But I've nothing to validate on this field.

In facts, at the final validation, he could be empty, it's just an intermediary container
LVL 60

Expert Comment

by:Kevin Cross
ID: 24740543
Oh, sorry guess I misunderstood.  Thought you were looking to do validation.

I am not sure, so will have to do some research.  I know there is a4j:ajaxListener, but I have not used enough to know for certain that is what you need; however, you can give it a try.  It is guaranteed to be invoked for every AJAX response before the Render Response fires.

Author Comment

ID: 24745516
I've try this but it doesn't work.

I've found this:
But I've an error because the "selectOneListbox"  "Parent component treetake for a ajaxListener is not source of AjaxEvents"

<a4j:outputPanel id="ajxpn1" ajaxRendered="true">     
   <h:selectOneListbox id="listservtake"  rendered="#{AddDeal.serv!=null}" value="#{AddDeal.currentService}" >
      <f:selectItems  value="#{AddDeal.serv}"/>

Open in new window


Accepted Solution

Nargzul earned 0 total points
ID: 24745553
Sorry, I put the wrong error: "Parent component listservtake for a ajaxListener is not source of AjaxEvents"

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question