Examples of OptionValue


Examples of org.spw.model.OptionValue

        optionName.setSelected(event.getNewValue());
    }
   
    public String buttonAdd_action() {
        String option = getSessionBean1().getOptionValue().getOptionName();
        getSessionBean1().setOptionValue(new OptionValue());
        getSessionBean1().getOptionValue().setOptionName(
                option);
        return "new";
    }
View Full Code Here

Examples of org.spw.model.OptionValue

   
    public String buttonDelete_action() {
        RowKey rk = tableRowGroup1.getRowKey();
        if (rk != null) {
            OptionValueController  ctrl = new OptionValueController();
            OptionValue optionValue = (OptionValue)list.getObject(rk);
            ctrl.delete(optionValue);
        }
        list.refreshList((String) optionName.getSelected());

        return null;
View Full Code Here

Examples of org.spw.model.OptionValue

    }
   
    public String buttonEdit_action() {
        RowKey rk = tableRowGroup1.getRowKey();
        if (rk != null) {
            OptionValue optionValue = (OptionValue)list.getObject(rk);
            getSessionBean1().setOptionValue(optionValue);
        }
        return "edit";
    }
View Full Code Here

Examples of org.spw.model.OptionValue

    }

    public String buttonAdd_action() {
        // Persist the new object
        OptionValueController ctrl = new OptionValueController();
        OptionValue object = getSessionBean1().getOptionValue();
        ctrl.create(object);
       
        return "success";
    }
View Full Code Here

Examples of org.spw.model.OptionValue

    }

    public String buttonChange_action() {
        // Persist the new object
        OptionValueController ctrl = new OptionValueController();
        OptionValue object = getSessionBean1().getOptionValue();
        ctrl.update(object);
       
        return "success";
    }
View Full Code Here

Examples of org.spw.model.OptionValue

    /**
     * Creates a new instance of OptionValueDataProvider
     */
    public OptionValueDataProvider() {
        // Put in dummy data for design time
        aList.add(new OptionValue());

        // Wrap the list
        setList(aList);       
    }
View Full Code Here

Examples of org.spw.model.OptionValue

       
        String option = OptionValueController.CONTRACT_TYPES;;
        String key = "Full time";
        OptionValueController instance = new OptionValueController();
       
        OptionValue result = instance.getOptionValueByLabel(option, key);
        assertNotNull(result);
    }
View Full Code Here

Examples of org.spw.model.OptionValue

     * @param key key of the option
     * @return The corresponding object
     */
    public OptionValue getOptionValueByLabel(String option, String key) {
        EntityManager em = emf.createEntityManager();
        OptionValue retValue = null;
        try {
            Query query = em.createNamedQuery("OptionValue.findByLabel");
            query.setParameter("name", option);
            query.setParameter("label", key);
            retValue = (OptionValue) query.getSingleResult();
View Full Code Here

Examples of org.spw.model.OptionValue

        }
    }
   
    public OptionValue read(OptionValuePK key) {
        EntityManager em = emf.createEntityManager();
        OptionValue retValue = null;
        try {
            retValue = em.find(OptionValue.class, key);
        } catch (Exception e) {
            Logger.getLogger(OptionValueController.class.getName()).log(Level.SEVERE, "Error reading " + key, e);
        } finally {
View Full Code Here

Examples of org.spw.model.OptionValue

        }
        return retValue;
    }
   
    public OptionValue update(OptionValue object) {
        OptionValue result = null;
        EntityManager em = emf.createEntityManager();
        em.getTransaction().begin();
        try {
            result = em.merge(object);
            em.getTransaction().commit();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.