Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- There are multiple ways to get the value of Selectonechoice's value,and the most simple way is using this method:
- public void reff(ValueChangeEvent valueChangeEvent) {
- DCBindingContainer dc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
- DCIteratorBinding iter=dc.findIteratorBinding("EmployeesView1Iterator");
- AttributeBinding attr = (AttributeBinding)dc.getControlBinding("deptid1");
- iter.getViewObject().setWhereClause("department_id=:maindeptid");
- iter.getViewObject().defineNamedWhereClauseParam("maindeptid", null, null);
- iter.getViewObject().setNamedWhereClauseParam("maindeptid", valueChangeEvent.getNewValue());
- System.out.println("Old value is"+attr);
- iter.executeQuery();
- My Selectonechoice component's source:
- <af:selectOneChoice value="#{bindings.deptid1.inputValue}"
- label="#{bindings.DepartmentId.label}"
- required="#{bindings.DepartmentId.hints.mandatory}"
- shortDesc="#{bindings.DepartmentId.hints.tooltip}" id="soc1"
- autoSubmit="true" valueChangeListener="#{refresh.reff}">
- <f:selectItems value="#{bindings.DepartmentId.items}" id="si1"/>
- </af:selectOneChoice>
Add Comment
Please, Sign In to add comment