Package com.nexirius.jnex.example.datamodel

Examples of com.nexirius.jnex.example.datamodel.MainModel


    public String getApplicationName() {
        return "MediaApplication";
    }

    public void preInit() {
        mainModel = new MainModel();

        file = new DataModelFile(mainModel.getMediaArray());

        file.setDirectory("c:\\temp");
        file.setExtension(".txt");
View Full Code Here


    /**
     * Method that returns the main model in its initial state
     */
    public DataModel createHomeModel() {
        MainModel mainModel;

        mainModel = new MainModel();

        XFile textFile = getTextFile();

        if (textFile.exists()) {
            try {
                mainModel.dropData(new String(textFile.getBytes()));
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

View Full Code Here

    }

    //Method that defines that actual command and should return true if the transition
    //it could be mapped into should take place.
    public boolean execute(HTMLSessionVariable sessionVariable) throws Exception {
        MainModel mainModel = (MainModel) sessionVariable.getApplicationModel();

        if (sessionVariable.getActModel().isValid()) {
            sessionVariable.getActState().finishDuplicatePopup();
            mainModel.getPersonArray().sort();

            return true;
        }

        return false;
View Full Code Here

    public boolean execute(HTMLSessionVariable sessionVariable) throws Exception {
        DataModelVector selectedChildren = sessionVariable.getSelectedChildren();
        DataModelEnumeration en = selectedChildren.getEnumeration();

        while (en.hasMore()) {
            MainModel mainModel = ((MainModel) sessionVariable.getApplicationModel());

            DataModel model = en.next();
            mainModel.getPersonArray().removeItem(model);
        }

        return true;
    }
View Full Code Here

        return false;
    }

    public boolean execute(HTMLSessionVariable sessionVariable) throws Exception {
        String attr = sessionVariable.getRequestParameter("sortAttribute");
        MainModel mainModel = (MainModel) sessionVariable.getApplicationModel();

        mainModel.getPersonArray().sortByAttribute(attr);

        return true;
    }
View Full Code Here

TOP

Related Classes of com.nexirius.jnex.example.datamodel.MainModel

Copyright © 2018 www.massapicom. 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.