jsf 2 - communicatio between xhtml page and backend bean -


my question if have 1 xhtml page components , 1 of them on sample

<h:inputtext id="input" value="#{userbean.name}"             valuechangelistener="#{userbean.valuechanged}"/> 

and if have appropriate method in backend bean:

    public valusechanged(valuechangeevent e){          (uiinput)input=(uiinput)e.getsource; uiselectone listbox = (uiselectone)input.findcomponent("listbox");     ......         } 

what send back-and bean, object e of valuechanged class. bath objects properties in relation component made changes or on sample page? , input value represents, after that?and why have line input.findcomponent("id_of_anoder_component") on sample?

what send back-and bean,

username.name mapped name field of userbean provided setter method provided , method valuechanged gets called whenever value of name changed.

and input value represents

input value represents value of backing bean field called name. have class userbean , field name. represent name value.

and why have line input.findcomponent("id_of_anoder_component") on sample?

this method gets called when value of name changes , whenever happens, methods finds out compoent listbox


Comments

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -