Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

package javax.faces.context does not exist

udysApr 29 2015 — edited Apr 29 2015

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

This post has been answered by Ashish Awasthi on Apr 29 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 27 2015
Added on Apr 29 2015
8 comments
1,834 views