Back to project page android-mvc-framework.
The source code is released under:
Apache License
If you think the Android project android-mvc-framework listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.android_mvc.sample_project.controller; //from w w w.ja va 2s . c om import com.android_mvc.sample_project.activities.func_net.HttpNetActivity; import com.android_mvc.sample_project.domain.HttpNetAction; import com.android_mvc.framework.controller.BaseController; import com.android_mvc.framework.controller.ControlFlowDetail; import com.android_mvc.framework.controller.action.ActionResult; import com.android_mvc.framework.controller.action.BLExecutor; import com.android_mvc.framework.controller.validation.ValidationResult; import com.android_mvc.framework.controller.validation.ValidationExecutor; /** * ????????????????? * @author id:language_and_engineering * */ public class FuncNetController extends BaseController { /** * HTTP?????????????????? */ public static void submit(final HttpNetActivity activity) { new ControlFlowDetail<HttpNetActivity>( activity ) .setValidation( new ValidationExecutor(){ @Override public ValidationResult doValidate() { // ???????????? return new FuncNetValidation().validate( activity ); } @Override public void onValidationFailed() { showErrMessages(); // ??????????????????? stayInThisPage(); } }) .setBL( new BLExecutor(){ @Override public ActionResult doAction() { // BL return new HttpNetAction( activity ).exec(); } }) .onBLExecuted( // BL??????????? STAY_THIS_PAGE_ALWAYS ) .startControl(); ; } }