oracle adf - How does this selectItems field get saved into the database -


i reading blog: http://andrejusb.blogspot.ca/2015/06/select-one-choice-with-select-items-tag.html

he creates custom selectitems has list of values in bean. other fields bound view corresponds table in database. when user clicks save these fields saved, not understand how new custom selectitems saved. isn't binding table in database. how work? how can save custom list of values database?

he demonstrating how create bean-based selectitems. when user selects, need capture index of selection in backing code:

<af:selectonechoice label="select search" id="socsrch" autosubmit="true" valuechangelistener="#pageflowscope.wci.handleselectsearch}"                                                        contentstyle="width:250px">    <f:selectitems id="si1" value="#{pageflowscope.wci.searchnames}"/> </af:selectonechoice>  public void handleselectsearch(valuechangeevent valuechangeevent) {           if (valuechangeevent.getnewvalue() == null) {                 return;   }        int selsearch = (integer) valuechangeevent.getnewvalue();    //...now write db via code handle view , field if desired            } 

at point can decide if want write out index (the value) of selected item database via backing bean code handle view, or can label of select item backing arraylist of select items further coding, , populate view, commit. view have field receive wanted put it.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -