To get the selected Value from selectOneChoice (LOV) in Bean
<af:selectOneChoice value="#{row.bindings.LevelType.inputValue}"
id="soc3"
label="#{row.bindings.LevelType.label}"
valueChangeListener="#{backingBeanScope.GroupingBean.onSubtypLvllTypValChnge}"
autoSubmit="true">
<f:selectItems value="#{row.bindings.LevelType.items}" id="si3"/>
<f:attribute name="rowIndexVal" value="#{row.bindings.LevelType.items[row.bindings.LevelType.inputValue].label}"/>
</af:selectOneChoice>
public void onSubtypLvllTypValChnge(ValueChangeEvent valueChangeEvent) {
valueChangeEvent.getComponent().processUpdates(FacesContext.getCurrentInstance());
Map p = ((UIComponent)valueChangeEvent.getSource()).getAttributes();
System.out.println("Selected Value"+p.get("rowIndexVal"));
}
One can find a different other approaches here..
http://mjabr.wordpress.com/2011/03/19/reading-the-selected-value-of-a-select-list-in-java/
http://myadfnotebook.blogspot.com/2010/09/getting-string-value-or-item-code-of.html
<af:selectOneChoice value="#{row.bindings.LevelType.inputValue}"
id="soc3"
label="#{row.bindings.LevelType.label}"
valueChangeListener="#{backingBeanScope.GroupingBean.onSubtypLvllTypValChnge}"
autoSubmit="true">
<f:selectItems value="#{row.bindings.LevelType.items}" id="si3"/>
<f:attribute name="rowIndexVal" value="#{row.bindings.LevelType.items[row.bindings.LevelType.inputValue].label}"/>
</af:selectOneChoice>
public void onSubtypLvllTypValChnge(ValueChangeEvent valueChangeEvent) {
valueChangeEvent.getComponent().processUpdates(FacesContext.getCurrentInstance());
Map p = ((UIComponent)valueChangeEvent.getSource()).getAttributes();
System.out.println("Selected Value"+p.get("rowIndexVal"));
}
One can find a different other approaches here..
http://mjabr.wordpress.com/2011/03/19/reading-the-selected-value-of-a-select-list-in-java/
http://myadfnotebook.blogspot.com/2010/09/getting-string-value-or-item-code-of.html
It was so nice article and useful to Informatica learners. we also provide oracle ADF course online training our Cubtraining is leader in providing Software Training
ReplyDeleteHi,
ReplyDeleteWe are really grateful for your blog post. You will find a lot of approaches after visiting your post. Oracle Financials training
Thank you.
How can we use same expression for MultiChoice
ReplyDelete#{row.bindings.LevelType.items[row.bindings.LevelType.inputValue].label}
??
Wonderful blog. Thanks for sharing informative Post. Its very useful to me.
ReplyDeleteOracle ADF Training in Hyderabad
Thank you so much for doing the impressive job here, everyone will surely like your post.
ReplyDeletefull stack web development course malaysia