Hi
I am using Jdev 12.1.3.0.0 and I am trying to get a value of selectOnechoice dropdown (based on Locations1VO) programmatically. Here is the snippet I am using in the AppModuleImpl.java
The error I get is package javax.faces.context does not exist.
When I remove the import of javax.faces.context library, I get the error cannot find symbol; symbol: FacesContext;
Could you please help me resolve this issue?
public void processRows (){
FacesContext fctx = FacesContext.getCurrentInstance();
Application app = fctx.getApplication();
ExpressionFactory elFactory = app.getExpressionFactory();
ELContext elContext = fctx.getELContext();
ValueExpression valueExp = elFactory.createValueExpression(elContext, "#{bindings.Locations1.attributeValue}", Object.class);
String vToLoc = null;
Object obj = valueExp.getValue(elContext);
if (obj != null) {
vToLoc = obj.toString();
}
System.out.println("To Loc: "+vToLoc);
DCBindingContainer bindings = this.getDCBindingsContainer();
DCIteratorBinding iterer = bindings.findIteratorBinding("VehiclesHistIterator");
ViewObject vo = iterer.getViewObject();
Row[] selectedVehRows = vo.getFilteredRows("Select", true);
System.out.println("No of assets selected: "+selectedVehRows.length);
System.out.println("MoveGrpID ## VehNum ## VehGroup");
for (Row row : selectedAssetRows) {
System.out.println(row.getAttribute("GroupId")+" ## "+row.getAttribute("VehSlNumber")+" ## "+row.getAttribute("VehGroup"));
// callStoredProcedure("Vehicles_pkg.move_veh_prc(?,?,?,?)",
// new Object[]{vToLoc,vGrpId,vVehSlNum,vVehGrp});
}
iterer.executeQuery();
}
Thanks