| 1 | |
package org.jtheque.primary.view.impl.actions.borrower; |
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
|
| 17 | |
|
| 18 | |
|
| 19 | |
import org.jtheque.core.managers.view.impl.actions.JThequeAction; |
| 20 | |
import org.jtheque.core.utils.CoreUtils; |
| 21 | |
import org.jtheque.primary.controller.able.IBorrowerController; |
| 22 | |
import org.jtheque.primary.view.able.IBorrowerView; |
| 23 | |
|
| 24 | |
import java.awt.event.ActionEvent; |
| 25 | |
|
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
public final class AcValidateBorrowerView extends JThequeAction { |
| 32 | |
|
| 33 | |
|
| 34 | |
|
| 35 | |
public AcValidateBorrowerView(){ |
| 36 | 0 | super("borrower.actions.ok"); |
| 37 | 0 | } |
| 38 | |
|
| 39 | |
@Override |
| 40 | |
public void actionPerformed(ActionEvent event){ |
| 41 | 0 | IBorrowerController borrowerController = CoreUtils.getBean("borrowerController"); |
| 42 | 0 | IBorrowerView borrowerView = (IBorrowerView)borrowerController.getView(); |
| 43 | |
|
| 44 | 0 | if (borrowerView.validateContent()){ |
| 45 | 0 | borrowerController.save( |
| 46 | |
borrowerView.getFieldFirstName().getText(), |
| 47 | |
borrowerView.getFieldNom().getText(), |
| 48 | |
borrowerView.getFieldEmail().getText()); |
| 49 | |
|
| 50 | 0 | borrowerView.closeDown(); |
| 51 | |
} |
| 52 | 0 | } |
| 53 | |
} |