Package org.spw.model

Examples of org.spw.model.Contact


    public String buttonEmail_action() {
        int added = 0;
        int selectedRows = getTableRowGroup1().getSelectedRowsCount();
        RowKey[] selectedRowKeys = getTableRowGroup1().getSelectedRowKeys();
        for(RowKey rk : selectedRowKeys){
            Contact contact = (Contact)list.getObject(rk);
            if (getSessionBean1().getEmailChoices().add(contact)) added++;
        }
        info (added + " added to the email selection.");
       
        return null;
View Full Code Here


    public String buttonMail_action() {
        int added = 0;
        int selectedRows = getTableRowGroup1().getSelectedRowsCount();
        RowKey[] selectedRowKeys = getTableRowGroup1().getSelectedRowKeys();
        for(RowKey rk : selectedRowKeys){
            Contact contact = (Contact)list.getObject(rk);
            if (getSessionBean1().getMailChoices().add(contact)) added++;
        }
        info (added + " added to the mail selection.");
       
        return null;
View Full Code Here

        }
    }
   
    public String buttonPreview_action() {
        if (!getSessionBean1().getEmailChoices().isEmpty()) {
            Contact contact = (Contact) getSessionBean1().
                    getEmailChoices().iterator().next();
            MailMerger merger = new MailMerger();
            merger.setContent((String) content.getText());
            try {
                merger.setModel(contact);
View Full Code Here

   
    public String buttonTokens_action() {
        MailMerger merger = new MailMerger();
        StringBuffer buffer= new StringBuffer();
        try {
            merger.setModel(new Contact());
            List<String> tokenList = merger.getTokensNames();
            for (String aToken : tokenList) {
                buffer.append(aToken);
                buffer.append("\n");
            }
View Full Code Here

        response.setHeader("Content-Disposition", "attachment;filename=\"export.csv\"");
        //TODO: generate the lenght
        response.setContentType("application/x-download");
        try {
           
            MailExporter exporter = new MailExporter(new Contact());
            OutputStream out = response.getOutputStream();
            out.write(exporter.getHeaders().getBytes());
            for (Object contact : getSessionBean1().getMailChoices()) {
                exporter.setModel(contact);
                out.write('\n');
View Full Code Here

    public String buttonEditCommunication_action() {
        RowKey rk = tableRowGroup1.getRowKey();
        if (rk != null) {
            Communication communication = (Communication) actionsNotCompletedList.getObject(rk);
            if (! communication.getParticipants().isEmpty()) {
                Contact contact = communication.getParticipants().get(0);
                if (contact instanceof Partnership) {
                    getSessionBean1().setPartnership((Partnership) contact);
                    return "infoPartnership";
                } else if (contact instanceof Person) {
                    getSessionBean1().setPerson((Person) contact);
View Full Code Here

       
        return "success";
    }

    private void persistDonation() {
        Contact contact = getContact();
        Donation donation = getDonation();
        donation.setDonor(contact);
        donation = new ContactController().addDonation(donation);
       
        setDonation(donation);
View Full Code Here

    public String buttonEmail_action() {
        int added = 0;
        int selectedRows = getTableRowGroup1().getSelectedRowsCount();
        RowKey[] selectedRowKeys = getTableRowGroup1().getSelectedRowKeys();
        for(RowKey rk : selectedRowKeys){
            Contact contact = (Contact)getSessionBean1().
                    getContactDataProvider().getObject(rk);
            if (getSessionBean1().getEmailChoices().add(contact)) added++;
        }
        info (added + " added to the email selection.");
       
View Full Code Here

    public String buttonMail_action() {
        int added = 0;
        int selectedRows = getTableRowGroup1().getSelectedRowsCount();
        RowKey[] selectedRowKeys = getTableRowGroup1().getSelectedRowKeys();
        for(RowKey rk : selectedRowKeys){
            Contact contact = (Contact)getSessionBean1().
                    getContactDataProvider().getObject(rk);
            if (getSessionBean1().getMailChoices().add(contact)) added++;
        }
        info (added + " added to the mail selection.");
        return null;
View Full Code Here

        }
    }
   
    public String buttonAdd_action() {
        // check contact
        Contact contactToAdd = null;
        if (contact.getText().length() > 0) {
            contactToAdd = contactCtl.parse((String) contact.getValue());
            if (contactToAdd == null) {
                error("Cannot find this contact.");
                return null;
View Full Code Here

TOP

Related Classes of org.spw.model.Contact

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.