troubleshooting Question

validation not working

Avatar of chalie001
chalie001 asked on
Oracle DatabaseJavaJava EEProgrammingSoftware
22 Comments1 Solution1353 ViewsLast Modified:
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);
    }
   
this is how i call my procedure
procedure SignId(p_signid varchar2, proc_err_msg varchar2) is
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 22 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 22 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros