Solved

Validate modification in ajax on a h:selectOneListbox

Posted on 2009-06-29
5
361 Views
Last Modified: 2013-11-24
Hi!

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?

OR

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?
0
Comment
Question by:Nargzul
  • 3
  • 2
5 Comments
 
LVL 59

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.

http://livedemo.exadel.com/richfaces-demo/richfaces/ajaxValidator.jsf?c=ajaxValidator&tab=usage
0
 
LVL 1

Author Comment

by:Nargzul
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
0
 
LVL 59

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.
0
 
LVL 1

Author Comment

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

I've found this:
http://www.jroller.com/a4j/entry/ajax_updates_inside_jsf_complex1
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}"/>

   </h:selectOneListbox>

</a4j:outputPanel>

Open in new window

0
 
LVL 1

Accepted Solution

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

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

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 first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
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.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now