Book Image

ADempiere 3.6 Cookbook

Book Image

ADempiere 3.6 Cookbook

Overview of this book

Table of Contents (16 chapters)
ADempiere 3.6 Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface

Creating a callout


Callout is mainly used to perform some dynamic actions when a value in a particular field is changed. Each field in ADempiere maps to a column in a particular table, so callout is configured at column level. Callout is a Java method that gets invoked when there is a change in the field data in a tab.

Getting ready

Launch Eclipse and open the adempiere_360 project in it.

How to do it...

  1. 1. Create a class, say, CalloutMom, in the org.compiere.model package.

    package org.compiere.model;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.Properties;
    import java.util.logging.Level;
    import org.compiere.util.DB;
    import org.compiere.util.Env;
    /**
    *
    * @author Ajit Kumar ([email protected])
    *
    */
    public class CalloutMom extends CalloutEngine {
    /**
    * Return the next item number available for a MOM
    * @param ctx Context
    * @param WindowNo current Window No
    * @param mTab Model Tab
    * @param mField Model Field
    * @param value The...