Return to Snippet

Revision: 4950
at January 30, 2008 11:42 by Dio83


Updated Code
/** 
* NOTAS: 
* 
* STRING -> ES UN BINDING.
* CORE -> es un FROM - TO.
* TODOS STATIC para que al actualizar la pantalla se mantengan 
* los valores de los atributos del bean.
* */    
    public static String codigo; 
    public static String descripcion;
   
    private static CoreInputText direccion;

 


public String alta(){
        ApplicationModule inspDenAMDataControl = 
            ADFUtils.getApplicationModuleForDataControl("APPLICATION_MODULE");

        DCBindingContainer bindcont = ADFUtils.getDCBindingContainer();
        DCIteratorBinding iterador= bindcont.findIteratorBinding("ITERADOR");
        ViewObject vistaAux = iterador.getViewObject();

        //creamos una nueva row...
        Row row = vistaAux.createRow();
        
        //llenamos cada row..
        row.setAttribute("Codigo", codigo);
        row.setAttribute("Descripcion", descripcion);.
        row.setAttribute("Direccion", direccion.getValue().toString());
        
       
         /** insertamos la row**/
        vistaAux.insertRow(row);


        /**Commit*/
        inspDenAMDataControl.getTransaction().commit();

        return null;
    }

Revision: 4949
at January 30, 2008 11:36 by Dio83


Updated Code
/** 
* NOTAS: 
* 
* STRING -> ES UN BINDING.
* CORE -> es un FROM - TO.
* TODOS STATIC para que al actualizar la pantalla se mantengan 
* los valores de los atributos del bean.
* */    
    public static String cddepges; 
    public static String dsdepges;
    
    public static String dsdeppatri;
    public static String cddeppatri;
    
    public static String dstiponorm;
    public static String cdtiponorm;
    
    private static CoreInputText dscentro;
    private static CoreSelectOneChoice cdtipofun;
    private static CoreInputText direccion;
    private static CoreSelectOneChoice estado;
    private static CoreSelectOneChoice cdtipofinanc;
    private static CoreSelectOneChoice cdtipoauto;
    
    private static String cdcargo;
    private static String desmasculina;
    private static String desfemenina;    


public String alta(){
        ApplicationModule inspDenAMDataControl = 
            ADFUtils.getApplicationModuleForDataControl("DBA_RCSDataControl");

        DCBindingContainer bindcont = ADFUtils.getDCBindingContainer();
        DCIteratorBinding cargosIterator = 
            bindcont.findIteratorBinding("VistaCentros_VO1Iterator");
        ViewObject centrosView = cargosIterator.getViewObject();

        //creamos una nueva row...
        Row row = centrosView.createRow();
        
        //llenamos cada row...
        row.setAttribute("Dscentro",dscentro.getValue().toString());
        row.setAttribute("Cdcargo", cdcargo);
        row.setAttribute("Direccion", direccion.getValue().toString());
        
        row.setAttribute("Cdtipofun", cdtipofun.getValue().toString());
        row.setAttribute("Estado", estado.getValue().toString());
        row.setAttribute("Cdtipofinanc", cdtipofinanc.getValue().toString());
        row.setAttribute("Cddepges", cddepges);
        row.setAttribute("Cddeppatri", cddeppatri);
        row.setAttribute("Cdtiponorm", cdtiponorm);
        row.setAttribute("Tipoautorizacion", cdtipoauto.getValue().toString());
        row.setAttribute("Fcalta", "2002-12-12");
        row.setAttribute("Usualta", "asdfasdfasdfasdf");

         /** insertamos la row**/
        centrosView.insertRow(row);


        /**Commit*/
        inspDenAMDataControl.getTransaction().commit();

        return null;
    }

Revision: 4948
at January 30, 2008 11:36 by Dio83


Initial Code
/** 
* NOTAS: 
* 
* STRING -> ES UN BINDING.
* CORE -> es un FROM - TO.
* TODOS STATIC para que al actualizar la pantalla se mantengan los valores de * * los +atributos del bean.
* */    
    public static String cddepges; 
    public static String dsdepges;
    
    public static String dsdeppatri;
    public static String cddeppatri;
    
    public static String dstiponorm;
    public static String cdtiponorm;
    
    private static CoreInputText dscentro;
    private static CoreSelectOneChoice cdtipofun;
    private static CoreInputText direccion;
    private static CoreSelectOneChoice estado;
    private static CoreSelectOneChoice cdtipofinanc;
    private static CoreSelectOneChoice cdtipoauto;
    
    private static String cdcargo;
    private static String desmasculina;
    private static String desfemenina;    


public String alta(){
        ApplicationModule inspDenAMDataControl = 
            ADFUtils.getApplicationModuleForDataControl("DBA_RCSDataControl");

        DCBindingContainer bindcont = ADFUtils.getDCBindingContainer();
        DCIteratorBinding cargosIterator = 
            bindcont.findIteratorBinding("VistaCentros_VO1Iterator");
        ViewObject centrosView = cargosIterator.getViewObject();

        //creamos una nueva row...
        Row row = centrosView.createRow();
        
        //llenamos cada row...
        row.setAttribute("Dscentro",dscentro.getValue().toString());
        row.setAttribute("Cdcargo", cdcargo);
        row.setAttribute("Direccion", direccion.getValue().toString());
        
        row.setAttribute("Cdtipofun", cdtipofun.getValue().toString());
        row.setAttribute("Estado", estado.getValue().toString());
        row.setAttribute("Cdtipofinanc", cdtipofinanc.getValue().toString());
        row.setAttribute("Cddepges", cddepges);
        row.setAttribute("Cddeppatri", cddeppatri);
        row.setAttribute("Cdtiponorm", cdtiponorm);
        row.setAttribute("Tipoautorizacion", cdtipoauto.getValue().toString());
        row.setAttribute("Fcalta", "2002-12-12");
        row.setAttribute("Usualta", "asdfasdfasdfasdf");

         /** insertamos la row**/
        centrosView.insertRow(row);


        /**Commit*/
        inspDenAMDataControl.getTransaction().commit();

        return null;
    }

Initial URL

                                

Initial Description
Función modelo para dar alta.

Initial Title
[FUNCIÓN] ALTA

Initial Tags

                                

Initial Language
Java