Hi all,

I´m using JSF Tomahawk and ajax, but something happens.

I have a <t:inputText that is where the user enters the ID of a person and
next to that input I have a <t:commanLink for search the info of the person
after the id is typed. Also in that same form, i have some <h:selectOneMenu
controls that uses ajax to fill one from other, for example if the value of
the <h:selectOneMenu1 changes it changes the values of the <h:selectOneMenu2
using Ajax:

<a4j:support event="onchange" action="#{PatientBean.updateCountry}"
reRender="*cities*" /> ....

This is the problem, for some reason if I typed the id of the user and click
on the <t:commandLink nothing happens, then I put an <h:messages to see what
was going on and I recived a message that says that the *cities *variable
was null so the action was never called....

Then I select the values of the <h:selectOneMenu1 and then select the value
<h:selectOneMenu2 and then I enter the ID int the input and click the
<t:commanLink and the action of the backing bean was called sucesfully, but
because the cities variable was not null...

Then to try to resolve the problem I put an inmediate="true" attribute in
the <t:commanLink. Then I enter ther person ID and then I click
<t:commanLink  and it calls the method of the backing bean, but the ID comes
empty...

What is going on?? Why I have to fill the <h:selectOneMenus first to then
call the action, I not use a requiered attribute for them?? Why the
inmediate="true" works but the <t:inputText is null?? All works if I first
fill the <h:selectOneMenu that uses ajax and are in an ajax:region and then
call the action method, but don´t need that, I can first search the id if I
want and then fill the <h:selectOneMenus.

Do anyone knows why this happen and which is the solution?  Thanks!!

Regards,

Reply via email to