Tuesday, 25 March 2014

                                                   Dyanmical Partial Fire Action TO The DFF




          OADescriptiveFlexBean dff=(OADescriptiveFlexBean)webBean.findChildRecursive("HrQuaFlex");
          dff.processFlex(pageContext);
          RenderingContext con = (RenderingContext) pageContext.getRenderingContext();
          if(dff!=null)
          {
               pageContext.writeDiagnostics(this,"SS Inside the DFF--->",OAFwkConstants.STATEMENT); 
              OAMessageTextInputBean mti1=(OAMessageTextInputBean)dff.findChildRecursive("HrQuaFlex1");
              if(mti1!=null)
              {
                   pageContext.writeDiagnostics(this,"In side the MTI--->",OAFwkConstants.STATEMENT); 
                   FireAction firePartialAction = new FirePartialAction(); 
                   pageContext.writeDiagnostics(this,mti1.getPrompt(),1);
                   firePartialAction.setEvent("Address");
                   firePartialAction.setUnvalidated(true);
                   mti1.setPrimaryClientAction(firePartialAction);
                   mti1.setFireActionForSubmit("Address",null,null,true);
             
               }else
                {
                   pageContext.writeDiagnostics(this,"bean is Null",1);
               }
        
          }
      }
        public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    {
        super.processFormRequest(pageContext,webBean);
        QualificationAMImpl am = (QualificationAMImpl)pageContext.getApplicationModule(webBean);
      // OAApplicationModule am = (OAApplicationModule)pageContext.getApplicationModule(webBean);
          OAViewObject vo =(OAViewObject)am.findViewObject("QualificationDetailsVO");
        
            
        if (pageContext.isLovEvent())
            {  
                 pageContext.writeDiagnostics(this,"SS Enters inside lov",OAFwkConstants.STATEMENT); 
                       String lovInputSourceId = pageContext.getLovInputSourceId();
                       if ("HrQuaQualificationTypeId".equals(lovInputSourceId))
                       { 
        
                    OAMessageLovInputBean lovInputBean6=(OAMessageLovInputBean)webBean.findIndexedChildRecursive("HrQuaQualificationTypeId");
                        String Type =(String)lovInputBean6.getValue(pageContext);
                         pageContext.writeDiagnostics(this,"SS Type"+Type,OAFwkConstants.STATEMENT); 
                        pageContext.putSessionValue("OtherQual",Type);
                       
                 OADescriptiveFlexBean dff=(OADescriptiveFlexBean)webBean.findChildRecursive("HrQuaFlex");
                 dff.processFlex(pageContext);
                 //OAMessageChoiceBean FirstDff = (OAMessageChoiceBean)oaDFF.findIndexedChild("FlexField0");
                      
                Row row = vo.first(); 
               
                  if ("Others".equals(Type))                         
                  {
                       pageContext.writeDiagnostics(this,"SS Inside ",OAFwkConstants.STATEMENT);
                      
                         row.setAttribute("IsQualDetRenTr",Boolean.TRUE);
                       String SSqual=(String)pageContext.getSessionValueDirect("Qualification");
                       if(SSqual==null)
                       {
                           throw new OAException("Please Enter Other Qualification",OAException.ERROR);
                       }
                        
                 }
                 else  {
              pageContext.writeDiagnostics(this,"SS else paart ",OAFwkConstants.STATEMENT);
                 row.setAttribute("IsQualDetRenTr",Boolean.FALSE);
               
                
                      
                       }
             }
            }
          
                         String qualif = (String)pageContext.getSessionValue("OtherQual");
                         if ("Others".equals(qualif))
                        {
                            pageContext.writeDiagnostics(this,"Enter Inside Event others--->",1);
                            if("Address".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
                            {
                              pageContext.writeDiagnostics(this,"Enter Inside the Event--->",1);
                              OADescriptiveFlexBean dff=(OADescriptiveFlexBean)webBean.findChildRecursive("HrQuaFlex");
                              dff.processFlex(pageContext);
                              OAMessageTextInputBean mti1=(OAMessageTextInputBean)dff.findChildRecursive("HrQuaFlex1");
                              mti1.getValue(pageContext);
                              pageContext.writeDiagnostics(this,"PFR Value-->"+mti1.getValue(pageContext),1);
                              pageContext.putSessionValueDirect("Qualification",mti1.getValue(pageContext));
                           
                            }
 
                        }

No comments:

Post a Comment