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!

navigating to another page in a bean

Tony007May 19 2016 — edited May 23 2016

hi am in jdeveloper 11.1.1.9  I have a situation where I have to navigate to next page based on the condition how can I do that

this is what I have done so far

hi in my AppModuleTstImpl class the have this

    protected Object callStoredFunction(int sqlReturnType, String stmt, Object[] bindVars) {

            CallableStatement cst = null;

            try {

                //Creating sql statement

                cst = this.getDBTransaction().createCallableStatement("begin ? := " + stmt + ";end;", 0);

                //Register dataType for return value

                cst.registerOutParameter(1, sqlReturnType);

                //Pass input parameters value

                if (bindVars != null) {

                    //for (int z = 0; z < bindVars.length; z++) {

                    for (int z = 0; z < bindVars.length; z++){                                              

                        cst.setObject(z + 2, bindVars[z]);

                    }

                }

                cst.executeUpdate();

                //Finally get returned value

                return cst.getObject(1);

            } catch (SQLException e) {

                throw new JboException(e.getMessage());

            } finally {

                if (cst != null) {

                    try {

                        cst.close();

                    } catch (SQLException e) {

                        e.printStackTrace();

                    }

                }

            }

        }

public String getUsrStstus(String UsrId) {

            String UserSts = "No Status found";

            Object UsrStatus = callStoredFunction(Types.VARCHAR, "Cal.Usr_status(?)", new Object[] { UsrId });

            if (UsrStatus != null) {

                UserSts = UsrStatus.toString();

            }

            return UserSts;

       public String ExecUsrPswd(String SignId,String Spswd) {

        DBTransactionImpl dbti = (DBTransactionImpl)getDBTransaction();

        CallableStatement statement =

          dbti.createCallableStatement(("BEGIN "+"cal.Pswd(?,?);" +

                                        "END;"), 0);

        try {

            statement.setString(1,SignId);

            statement.setString(2,Spswd);

            statement.registerOutParameter(2, Types.VARCHAR);

            statement.execute();

            return statement.getString(2);

        } catch (SQLException sqlerr) {

            throw new JboException(sqlerr);

        } finally {

            try {

                if (statement != null) {

                    statement.close();

                }

            } catch (SQLException closeerr) {

                throw new JboException(closeerr);

            }

        }

    }

in my bean i have this

     public void PswdValidator(FacesContext facesContext, UIComponent uIComponent,

                                  Object object) {

          //   String msg =null;

                OperationBinding oBindings = getOperationBinding("ExecUsrPswd");calling a procedure

                OperationBinding oBindingsUsr = getOperationBinding("getUsrStstus");//calling a function

                oBindings.getParamsMap().put("signid",object);

                oBindings.execute();

             

        Object o = oBindings.getResult(); //if the validation paase i what navigate to next inputtext and able to navigate to othe page

                                    //i what to call another screen if the function return status Open this screen is diffirent from the sccren if validation paased

        if(o != null) {

           String msg = o.toString();

                          FacesMessage fm = new FacesMessage(msg);

                          throw new ValidatorException(fm);

              }

                                  }

<af:inputText value="#{bindings.Password.inputValue}"

                                label="Password:"

                                columns="#{bindings.Password.hints.displayWidth}"

                                maximumLength="#{bindings.Password.hints.precision}"

                                shortDesc="#{bindings.Password.hints.tooltip}"

                                id="it1" styleClass="CriticalInputLabelStyle"

                                required="true"

                                autoSubmit="true" secret="true"

                                validator="#{pageFlowScope.SignOnValidation.PswdValidator}">

                    <f:validator/>

                  </af:inputText>

This post has been answered by Ashish Awasthi on May 20 2016
Jump to Answer

Comments

karianna

This Q should be moved to the Java Security community, but it looks like you have a classpath issue where that class/method is not being loaded.

Pankaj Shakya

Thanks @"karianna", but while i type complete path in url, all jars are being accessed.

e.g http://10.25.85.74:8080/PIMS/applet/dsc-1.0.jar

Is there any problem with my JNLP file?

karianna

I'm not familiar with JNLP - perhaps it needs download="eager" on the bouncy castle lib and you should also check that the bouncy castle JARs actually contain the method you're invoking.

Pankaj Shakya

I have already tried it with eager...but no change and  checked all jars, they are containing all methods and classes which are being invoked. I have been working on this problem since last 3 days, all the solutions which i found weren't helpful. Also tried oracle demo of Java Web Start, i am doing the same as mentioned.

I have also got a ref site, downloaded jnlp and when tried to execute - The same problem was there.

https://www.qoppa.com/files/pdfnotes/demo/jPDFNotes_savetoweb.jnlp

Pankaj Shakya

I have already tried it with eager...but no change and  checked all jars, they are containing all methods and classes which are being invoked. I have been working on this problem since last 3 days, all the solutions which i found weren't helpful. Also tried oracle demo of Java Web Start, i am doing the same as mentioned.

I have also got a ref site, downloaded jnlp and when tried to execute - The same problem was there.

https://www.qoppa.com/files/pdfnotes/demo/jPDFNotes_savetoweb.jnlp

user13654132

Do you still solve dthis problem? cause im having the same issues here. Webutil function works fine when using browser but problem when using webstart.

1 - 6
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 20 2016
Added on May 19 2016
18 comments
814 views