Matias
See my comments below,
> Have you tried "getComponent()" which is defined in FacesEvent?
> The getSource() comes from java.util.Event clazz.
I've tried. getSource() and getComponent() both return the same
component (see below).
> So can you tell us, what you get form a "getSource()" call?
It's returning the "equivalent" (???) UIComponent in the new object.
I mean, hope it's understandable, the component whose listener
will cause the event to be generated in the new
BakingBean (Page as I call it in my e-mail).
Tonio
> On 6/5/06, Tonio Caputo <[EMAIL PROTECTED]> wrote:
> > Hi everybody,
> >
> > I'm moving my application from sun's implementation
> > (it's working ok) to myfaces.
> >
> > I'm using:
> > jsf 1.1-01
> > myfaces 1.1.1
> >
> > I'm having a difference in behavior regarding
> > valueChangeEvent source.
> >
> > My application:
> > ~~~~~~~~~~~~~~~
> >
> > JSP - Jsp with standard JSF components,
> > all bound to components in a java Page
> >
> > Page - Java class with all components of the JSP page
> > - It adds ValueChangeListeners to the components
> > who need it.
> > - Request Scope
> >
> > My code for ValueChangeListener looks something like this:
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > public void processValueChange(ValueChangeEvent ev)
> > {
> > ......
> > Object src=ev.getSource();
> > if ( src.equals(_cmbCountry) ) do.......
> > else if ( src.equals(_cmbAnyCode) ) do........
> > else if ( src.equals(_cmbState) ) do......
> > else
> > do nothing .......
> > ........
> > }
> >
> > where _cmbXXX are HtmlSelectOneMenu components
> > defined in the Page class.
> >
> > The problem:
> > ~~~~~~~~~~~~
> >
> > In my faces, the event source does not match any of the
> > the components, in sun's implementation it does.
> >
> > If I change the equals function for ==, it doesn't work
> > either (as expected, there is a new Page for each request)
> >
> >
> > The question:
> > ~~~~~~~~~~~~~
> >
> > Is this OK, a myfaces problem, a bad implementation (as usual)
> > of sun's reference, or just worked by chance ?
> >
> > The solution of this problem is easy, I'm just checking to see
> > what goes on.
> >
> >
> > Thanks in advance
> > tonio
> >
> >
>
>