We help IT Professionals succeed at work.
Get Started

validation not working

1,321 Views
Last Modified: 2015-12-16
hi am trying to do this validation https://mjabr.wordpress.com/2011/05/27/how-to-create-a-custom-jsf-validator/
but am geting this error
<oracle.adf.model> <DCJboDataControl> <initializeApplicationModule> <[677] (oracle.adf.model.bc4j.DataControlFactoryImpl.SyncMode = Immediate>
<oracle.adf.model> <DCBindingContainerState> <validateToken> <[678] Process BindingContainer state token(decompressed state):BCST:=0%V%=N%R=0%taskflowcal1=BCST:=0%V%=N%R=1%view_pageDefs_CalmainPageDef_WEB_INF_task_flow_cal_xml_task_flow_cal=BCST:=0%V%=NCalMain1Iterator=-D-,,,>
<oracle.adf.model> <DCBindingContainer> <internalRefreshControl> <[679] **** refreshControl() for BindingContainer :view_pageDefs_CalmainPageDef_WEB_INF_task_flow_cal_xml_task_flow_cal>
<oracle.adf.model> <DCBindingContainerState> <validateToken> <[680] Process BindingContainer state token(decompressed state):BCST:=0%V%=N%R=0%taskflowcal1=BCST:=0%V%=N%R=1%view_pageDefs_CalmainPageDef_WEB_INF_task_flow_cal_xml_task_flow_cal=BCST:=0%V%=NCalMain1Iterator=-D-,,,>
<oracle.adf.model> <DCExecutableBinding> <refreshIfNeeded> <[681] Invoke refresh for :CalMain1Iterator>
<oracle.adf.model> <DCIteratorBinding> <refresh> <[682] Executing and syncing on IteratorBinding.refresh from :CalMain1Iterator>
<oracle.adf.model> <DCUtil> <findSpelObject> <[683] DCUtil, returning:oracle.jbo.uicli.binding.JUApplication, for AppModuleTstDataControl>
<oracle.adf.model> <DCJboDataControl> <initializeApplicationModule> <[684] (oracle.adf.model.bc4j.DataControlFactoryImpl.SyncMode = Immediate>
<oracle.adf.model> <ApplicationPoolImpl> <reuseReferencedInstance> <[685] Reusing a cached session application module instance>
<oracle.adf.model> <DCIteratorBinding> <getViewObject> <[686] Resolving VO:CalMain1 for iterator binding:CalMain1Iterator>
<oracle.adf.model> <DebugDiagnostic> <print> <[687] DBG: beforeActionPerformed :signOnId>
<oracle.adf.model> <DCUtil> <findSpelObject> <[688] DCUtil, returning:oracle.jbo.uicli.binding.JUApplication, for AppModuleTstDataControl>
<oracle.adf.model> <JUCtrlActionBinding> <doIt> <[689] Invoke method Action:signOnId, fullname:data.view_erdlinkPageDef.taskflowcal1.view_pageDefs_CalmainPageDef_WEB_INF_task_flow_cal_xml_task_flow_cal.signOnId>
<oracle.adf.model> <DebugDiagnostic> <print> <[690] DBG: DataControl:Looking for :DataProvider>
<oracle.adf.model> <DCInvokeMethod> <invokeMethod> <[691] DCInvokeMethod:Invoking AppModuleTstDataControl.dataProvider.signOnId()>
<oracle.adf.model> <ViewObjectImpl> <createViewCriteriaManagerImpl> <[692] ViewObject:_LOCAL_VIEW_USAGE_model_CalMain_UntLov1 creating ViewCriteriaManager instance.>
<oracle.adf.model> <ViewObjectImpl> <createViewCriteriaManagerImpl> <[693] ViewObject:_LOCAL_VIEW_USAGE_model_CalMain_ViewU1 creating ViewCriteriaManager instance.>
<oracle.adf.model> <ViewObjectImpl> <createViewCriteriaManagerImpl> <[694] ViewObject:_LOCAL_VIEW_USAGE_model_CalMain_ViewLoc1 creating ViewCriteriaManager instance.>
<oracle.adf.model> <DebugDiagnostic> <print> <[695] DBG: afterActionPerformed :signOnId>
<oracle.adf.model> <DCBindingContainer> <internalRefreshControl> <[696] **** refreshControl() for BindingContainer :view_pageDefs_CalmainPageDef_WEB_INF_task_flow_cal_xml_task_flow_cal>
<oracle.adf.model> <DCUtil> <findSpelObject> <[697] DCUtil, returning:oracle.jbo.uicli.binding.JUFormBinding, for view_pageDefs_CalmainPageDef_WEB_INF_task_flow_cal_xml_task_flow_cal>
<oracle.adf.model> <DCIteratorBinding> <releaseDataInternal> <[698] Releasing iterator binding:CalMain1Iterator>
<oracle.adf.model> <DCIteratorBinding> <releaseDataInternal> <[699] Releasing iterator binding:CalMain1Iterator>
<oracle.adf.model> <DCIteratorBinding> <releaseDataInternal> <[700] Releasing iterator binding:CalMain1Iterator>



i put this in my java option
-Djbo.debugoutput=console


 /*public void validate1(FacesContext facesContext,UIComponent uIComponent,Object object)throws ValidatorException
 {
 //add your validation logic here
  String phone = object.toString();
  if (phone.length() < 9) {
  FacesMessage fm = new FacesMessage("Phone number should be at least 9 digits");
 throw new ValidatorException(fm);
  }
  }*/
}


package view;

import java.sql.PreparedStatement;
import java.sql.SQLException;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.validator.Validator;
import javax.faces.validator.ValidatorException;

import oracle.adf.model.BindingContext;

import oracle.binding.BindingContainer;
import oracle.binding.OperationBinding;

import oracle.jbo.JboException;
import oracle.jbo.Row;
import oracle.jbo.ViewObject;

import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

import java.util.HashMap;


import javax.faces.application.FacesMessage;

import model.common.AppModuleTst;

import oracle.jbo.JboException;
import oracle.jbo.Row;
import oracle.jbo.ViewObject;
import oracle.jbo.server.ApplicationModuleImpl;

import oracle.jbo.server.ViewObjectImpl;

//import sun.security.validator.ValidatorException;

import utils.system;

public class SignOnValidation implements Validator {
    public SignOnValidation() {
        super();
    }

    public void validate(FacesContext facesContext, UIComponent uIComponent,
                         Object object) throws ValidatorException {
        
        String inputString = object.toString().toUpperCase();
        
        
        OperationBinding oBindings = getOperationBinding("signOnId");
        
        oBindings.execute();
        FacesContext.getCurrentInstance().renderResponse();
    }
    public static OperationBinding getOperationBinding(String pOperationName) {
        BindingContainer bc =
            BindingContext.getCurrent().getCurrentBindingsEntry();
        return bc.getOperationBinding(pOperationName);
    }

Open in new window

   
this is how i call my procedure
procedure SignId(p_signid varchar2, proc_err_msg varchar2) is
Comment
Watch Question
CERTIFIED EXPERT
Distinguished Expert 2020
Commented:
This problem has been solved!
Unlock 1 Answer and 22 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant

An Experts Exchange subscription includes unlimited access to online courses.

Get Started
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE