how to realize the function only a validator is fired when submit

Sorry for my question.

In a web Page here are a inputText of a code ,a search button Searching by the Code , others inputText sand a 'OK ' button.

the question is how to fired a only 'code' validator when searching

--

I made the search button immediate="true" ,So I wanted to fire the code validator by actionListener, the others validator were not fired .

But in this way i find i can't get the code's number not only by binding

but also by value. so What shall i do?

the actionListener is this:

public void commandButton_search(ActionEvent e){

UIViewRoot UIroot=FacesContext.getCurrentInstance().getViewRoot();

UIComponent uicomponent=UIroot;

String strCode= (String)this.inputText1.getValue();

MemberValidator aValidator=new MemberValidator();

aValidator.searchAddressCheck(uicomponent,strCode);

[891 byte] By [tomya] at [2007-9-24]
# 1

As I posted before a response for your post,

if you want to use the input value in an action,

you should not use immediate="true";

otherwise you need to do everything JSF will do.

The most simple way is to have two <h:form>s in the page.

One <h:form> includes the <h:inputText> of a code and the search button.

Another <h:form> includes other components.

If the OK button also use the seach code, you can use Javascript to copy the

code value from the <h:inputText> in the first form to some <h:inputHidden>

in the second form.

yuki.yoshidaa at 2007-7-16 > top of java,Enterprise & Remote Computing,Web Tier APIs...