Examples of OptionValue


Examples of org.spw.model.OptionValue

        EntityManager em = emf.createEntityManager();
        em.getTransaction().begin();
        try {
            OptionValuePK pk = new OptionValuePK(object.getOptionName(),
                    object.getOptionOrder());
            OptionValue entity = em.find(OptionValue.class, pk);
            em.remove(entity);
            em.getTransaction().commit();
        } catch (Exception e) {
            Logger.getLogger(OptionValueController.class.getName()).log(Level.SEVERE, "Error deleting " + object, e);
            if (em.getTransaction().isActive())
View Full Code Here

Examples of org.spw.model.OptionValue

        // Perform application initialization that must complete
        // *after* managed components are initialized
        list = getSessionBean1().getOptionValueDataProvider();
        // initialize the option in session been
        if (getSessionBean1().getOptionValue() == null) {
            getSessionBean1().setOptionValue(new OptionValue());
            // get the first option to initialize
            String option = (String) optionNameDefaultOptions.
                    getOptions()[0].getValue();
            // set the option as current option
            getSessionBean1().getOptionValue().
View Full Code Here

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

     * @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

Examples of org.spw.model.OptionValue

        EntityManager em = emf.createEntityManager();
        em.getTransaction().begin();
        try {
            OptionValuePK pk = new OptionValuePK(object.getOptionName(),
                    object.getOptionOrder());
            OptionValue entity = em.find(OptionValue.class, pk);
            em.remove(entity);
            em.getTransaction().commit();
        } catch (Exception e) {
            Logger.getLogger(OptionValueController.class.getName()).log(Level.SEVERE, "Error deleting " + object, e);
            if (em.getTransaction().isActive())
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.