Difference between pages "DevGuide ID-Number ranges" and "DevGuide When to use"

From ADempiere
(Difference between pages)
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
 
(Process)
 
Line 1: Line 1:
== What and Why? ==
+
== Application Dictionary ==
Here you can register IDs for enhancements that you plan to commit into trunk to avoid conflicts with other developers. Please enter the needed id range (IDs from 50000+), your username and a link to the corresponding sf.net feature request. Please add missing tables if needed. And Please, do not just assign 999 numbers to yourself, suit yourself with a small range, and then if you need, come back here for more! The first line (Karsten) is just an example!
+
* Add new fields, tabs or even windows without business logic (see [[NewWindow]], [[Virtual_Colums]])
 +
* Change/add validation rules for fields
 +
* Change/set default values for fields
 +
* Change/set read only logic for fields
 +
* Change/set visibility logic for fields
 +
* Change/set mandatory logic for fields
 +
* Change the layout (field order) of tabs
 +
* Translate or rename GUI elements
 +
*You may find this useful about Application Dictionary
 +
**[[User:Ivanceras#The_AD_in_ADempiere]]
  
== AD_Column ==
+
== [[Callout]] ==
50xxx - 50yyy - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1670034&group_id=176962&atid=879335]
+
A callout is a java method that is executed after a field value is changed.
 +
* Data entry consequences like calculate totals that need direct feedback at the GUI
 +
If you do calculations in callouts you have to repeat them in the related PO classes (using model validator) to allow the access via a different UI like HTML interface
 +
* Not for data validation - use dynamic validation (AD) instead
 +
* Define in Table Column, if you need more than one to the same column, define separated them by ''';'''
 +
* see [[Callout]] and [[Tutorials#FAQ]] also
  
51xxx - 51yyy - [[user:juddm|Michael Judd]] - [https://sourceforge.net/tracker/index.php?func=detail&atid=879335&aid=1741222&group_id=176962]
+
== Process ==
 +
A process is a java class that extends org.compiere.process.SvrProcess. It is linked to a button in the ADempiere client and executed when the user hits this button or to a menu entry. It has two methods prepare() - to check process parameters - and doIt() - to do the work.
 +
* For complex logic that may take some time
 +
Look at[[Howto_write_an_Adempiere_process | this template]] for an example.
  
52xxx - 52yyy - [[User:Fredtsang|Fredtsang]]
+
== [[ModelValidator|Validators]] ==
 +
Define in your Client the field ModelValidationClasses with your validation classes. They must
 +
implement org.compiere.model.ModelValidator.
 +
Look at example MyValidator. The main methods are modelChange which is called after PO.beforeSave/PO.beforeDelete and docValidate which is called as first step of DocAction.prepareIt.
 +
* For business logic like validation - all kind of logic you would otherwise put direct into the mentioned methods
  
53000 - 53001 - [[user:fer_luck|Fernando Lucktemberg]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1756931&group_id=176962&atid=879335]
+
MClasses and ModelValidator both are used to do data validation and business logic. Callouts should not be used for complex logic since they are triggerd from the UI only and their logic has to be duplicated in the MClass/Validator to make sure that it is applied if you create an object from the java code.
  
53002 - 53002 - [[user:fer_luck|Fernando Lucktemberg]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1757088&group_id=176962&atid=879335]
+
The main difference between MClass and validator is that the existing MClasses are part of the ADempiere core and the validators are ment to enhance the core (to allow customizations). Note: this belongs to the standard ADempiere tables - if you create your own table you can put all logic in the MClass since it is a customisation itself..
  
53003 - 53042 - [[user:fer_luck|Fernando Lucktemberg]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1756931&group_id=176962&atid=879335]
+
If you need to change or enhance the business logic of an order(e.g. check if the selected shipping type is available for the selected destination) you shouldn't do it in the standard MClass MOrder. If you do so, you need to merge your customized MOrder-Class by hand everytime you upgrade ADempiere. If you use your own validator class for this the upgrade will be much easier.
  
53100 - 53199 - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1760938&group_id=176962&atid=879335]
+
== Custom Forms ==
 
+
A custom form is a swing window that is not generated from the AD. It has to implement the org.compiere.apps.form.FormPanel interface. If you use custom forms you have to rebuild their logic for other GUI (HTML, WebServices...)
53200 - 53220 - [[user:armenrz|Armen Rizal]] - [https://sourceforge.net/tracker/?func=detail&atid=883808&aid=1648920&group_id=176962]
+
* For complex GUI windows where the AD generated standard windows are not flexible enough
 
+
53221 - 53240 - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1782412&group_id=176962&atid=879335]
+
 
+
53241 - 53244 - [[user:CarlosRuiz|Carlos Ruiz]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1789836&group_id=176962&atid=879335]
+
 
+
53245 - 53245 - [[user:Teo_sarca|Teo Sarca]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1795398&group_id=176962&atid=879335]
+
 
+
53246 - 53247 - [[user:kthiemann|Karsten]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1799601&group_id=176962&atid=879335]
+
 
+
53248 - 53249 - [[user:kthiemann|Karsten]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1804068&group_id=176962&atid=879335]
+
 
+
53250 - 53250 - [[user:Teo_sarca|Teo Sarca]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1810133&group_id=176962&atid=879335]
+
 
+
== AD_Element ==
+
50xxx - 50yyy - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1670034&group_id=176962&atid=879335]
+
 
+
51xxx - 51yyy - [[user:juddm|Michael Judd]] - [https://sourceforge.net/tracker/index.php?func=detail&atid=879335&aid=1741222&group_id=176962]
+
 
+
52xxx - 52yyy - [[User:Fredtsang|Fredtsang]]
+
 
+
53000 - 53001 - [[user:fer_luck|Fernando Lucktemberg]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1756931&group_id=176962&atid=879335]
+
 
+
53002 - 53002 - [[user:fer_luck|Fernando Lucktemberg]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1757088&group_id=176962&atid=879335]
+
 
+
53003 - 53030 - [[user:fer_luck|Fernando Lucktemberg]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1757088&group_id=176962&atid=879335]
+
 
+
53100 - 53199 - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1760938&group_id=176962&atid=879335]
+
 
+
53200 - 53220 - [[user:armenrz|Armen Rizal]] - [https://sourceforge.net/tracker/?func=detail&atid=883808&aid=1648920&group_id=176962]
+
 
+
53221 - 53221 - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1782412&group_id=176962&atid=879335]
+
 
+
53222 - 53222 - [[user:CarlosRuiz|Carlos Ruiz]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1789836&group_id=176962&atid=879335]
+
 
+
53223 - 53223 - [[user:kthiemann|Karsten]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1799601&group_id=176962&atid=879335]
+
 
+
53224 - 53224 - [[user:kthiemann|Karsten]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1804068&group_id=176962&atid=879335]
+
 
+
== AD_Field ==
+
50xxx - 50yyy - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1670034&group_id=176962&atid=879335]
+
 
+
51xxx - 51yyy - [[user:juddm|Michael Judd]] - [https://sourceforge.net/tracker/index.php?func=detail&atid=879335&aid=1741222&group_id=176962]
+
 
+
52xxx - 52yyy - [[User:Fredtsang|Fredtsang]]
+
 
+
53000 - 53001 - [[user:fer_luck|Fernando Lucktemberg]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1756931&group_id=176962&atid=879335]
+
 
+
53002 - 53002 - [[user:fer_luck|Fernando Lucktemberg]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1757088&group_id=176962&atid=879335]
+
 
+
53100 - 53199 - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1760938&group_id=176962&atid=879335]
+
 
+
53200 - 53220 - [[user:armenrz|Armen Rizal]] - [https://sourceforge.net/tracker/?func=detail&atid=883808&aid=1648920&group_id=176962]
+
 
+
53221 - 53250 - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1782412&group_id=176962&atid=879335]
+
 
+
53251 - 53254 - [[user:CarlosRuiz|Carlos Ruiz]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1789836&group_id=176962&atid=879335]
+
 
+
53255 - 53255 - [[user:Teo_sarca|Teo Sarca]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1795398&group_id=176962&atid=879335]
+
 
+
53256 - 53257 - [[user:kthiemann|Karsten]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1799601&group_id=176962&atid=879335]
+
 
+
53258 - 53259 - [[user:kthiemann|Karsten]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1804068&group_id=176962&atid=879335]
+
 
+
53250 - 53250 - [[user:Teo_sarca|Teo Sarca]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1810133&group_id=176962&atid=879335]
+
 
+
53260 - 53270 - [[user:fer_luck|Fernando Lucktemberg]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1756931&group_id=176962&atid=879335]
+
 
+
== AD_Form ==
+
50xxx - 50yyy - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1670034&group_id=176962&atid=879335]
+
 
+
52xxx - 52yyy - [[User:Fredtsang|Fredtsang]]
+
 
+
== AD_Menu ==
+
50xxx - 50yyy - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1670034&group_id=176962&atid=879335]
+
 
+
52xxx - 52yyy - [[User:Fredtsang|Fredtsang]]
+
 
+
53000 - 53010 - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1760938&group_id=176962&atid=879335]
+
 
+
53011 - 53011 - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1782412&group_id=176962&atid=879335]
+
 
+
== AD_Message ==
+
50xxx - 50yyy - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1670034&group_id=176962&atid=879335]
+
 
+
52xxx - 52yyy - [[User:Fredtsang|Fredtsang]]
+
 
+
53000 - 53001 - [[user:fer_luck|Fernando Lucktemberg]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1756931&group_id=176962&atid=879335]
+
 
+
53002 - 53002 - [[user:teo_sarca|Teo Sarca]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1757535&group_id=176962&atid=879335]
+
 
+
53003 - 53004 - [[user:teo_sarca|Teo Sarca]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1763523&group_id=176962&atid=879332]
+
 
+
== AD_Process ==
+
50xxx - 50yyy - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1670034&group_id=176962&atid=879335]
+
 
+
52xxx - 52yyy - [[User:Fredtsang|Fredtsang]]
+
 
+
53000 - 53001 - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1760938&group_id=176962&atid=879335]
+
 
+
 
+
== AD_Process_Para ==
+
50xxx - 50yyy - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1670034&group_id=176962&atid=879335]
+
 
+
52xxx - 52yyy - [[User:Fredtsang|Fredtsang]]
+
 
+
53000 - 53010 - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1760938&group_id=176962&atid=879335]
+
 
+
53011 - 53011 - [[user:kthiemann|Karsten]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1804068&group_id=176962&atid=879335]
+
 
+
== AD_Reference ==
+
50xxx - 50yyy - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1670034&group_id=176962&atid=879335]
+
 
+
51xxx - 51yyy - [[user:juddm|Mike J]] - Various incl. Discount Reason,
+
 
+
52xxx - 52yyy - [[User:Fredtsang|Fredtsang]]
+
 
+
53000 - 53000 - [[user:fer_luck|Fernando Lucktemberg]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1757088&group_id=176962&atid=879335]
+
 
+
53001 - 53002 - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1760938&group_id=176962&atid=879335]
+
 
+
53200 - 53220 - [[user:armenrz|Armen Rizal]] - [https://sourceforge.net/tracker/?func=detail&atid=883808&aid=1648920&group_id=176962]
+
 
+
53221 - 53221 - [[user:kthiemann|Karsten]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1804068&group_id=176962&atid=879335]
+
 
+
== AD_Ref_List ==
+
50xxx - 50yyy - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1670034&group_id=176962&atid=879335]
+
 
+
51xxx - 51yyy - [[user:juddm|Mike J]] - Various incl. Discount Reason
+
 
+
52xxx - 52yyy - [[User:Fredtsang|Fredtsang]]
+
 
+
53000 - 53002 - [[user:fer_luck|Fernando Lucktemberg]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1757088&group_id=176962&atid=879335]
+
 
+
53003 - 53005 - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1760938&group_id=176962&atid=879335]
+
 
+
53006 - 53006 - [[user:fer_luck|Fernando Lucktemberg]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1756931&group_id=176962&atid=879335]
+
 
+
53200 - 53220 - [[user:armenrz|Armen Rizal]] - [https://sourceforge.net/tracker/?func=detail&atid=883808&aid=1648920&group_id=176962]
+
 
+
== AD_Ref_Table ==
+
50xxx - 50yyy - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1670034&group_id=176962&atid=879335]
+
 
+
52xxx - 52yyy - [[User:Fredtsang|Fredtsang]]
+
 
+
53000 - 53000 - [[user:kthiemann|Karsten]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1804068&group_id=176962&atid=879335]
+
 
+
== AD_ReportView ==
+
50xxx - 50yyy - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1670034&group_id=176962&atid=879335]
+
 
+
52xxx - 52yyy - [[User:Fredtsang|Fredtsang]]
+
 
+
== AD_Sequence ==
+
50xxx - 50yyy - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1670034&group_id=176962&atid=879335]
+
 
+
52xxx - 52yyy - [[User:Fredtsang|Fredtsang]]
+
 
+
53000 - 53010 - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1760938&group_id=176962&atid=879335]
+
 
+
53011 - 53011 - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1782412&group_id=176962&atid=879335]
+
 
+
 
+
== AD_Tab ==
+
50xxx - 50yyy - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1670034&group_id=176962&atid=879335]
+
 
+
52xxx - 52yyy - [[User:Fredtsang|Fredtsang]]
+
 
+
53000 - 53010 - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1760938&group_id=176962&atid=879335]
+
 
+
53011 - 53012 - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1782412&group_id=176962&atid=879335]
+
 
+
53013 - 53013 - [[user:fer_luck|Fernando Lucktemberg]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1756931&group_id=176962&atid=879335]
+
 
+
== AD_Table ==
+
50xxx - 50yyy - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1670034&group_id=176962&atid=879335]
+
 
+
52xxx - 52yyy - [[User:Fredtsang|Fredtsang]]
+
 
+
53000 - 53010 - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1760938&group_id=176962&atid=879335]
+
 
+
53011 - 53011 - [[user:fer_luck|Fernando Lucktemberg]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1756931&group_id=176962&atid=879335]
+
 
+
53012 - 53012 - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1782412&group_id=176962&atid=879335]
+
 
+
53013 - 53013 - [[user:fer_luck|Fernando Lucktemberg]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1756931&group_id=176962&atid=879335]
+
 
+
== AD_Window ==
+
50xxx - 50yyy - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1670034&group_id=176962&atid=879335]
+
 
+
52xxx - 52yyy - [[User:Fredtsang|Fredtsang]]
+
 
+
53000 - 53001 - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1760938&group_id=176962&atid=879335]
+
 
+
53002 - 53002 - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1782412&group_id=176962&atid=879335]
+
 
+
== AD_Val_Rule ==
+
51000 - 51001 - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1760938&group_id=176962&atid=879335]
+
 
+
51002 - 51002 - [[user:kthiemann|Karsten]] - [https://sourceforge.net/tracker/index.php?func=detail&aid=1782412&group_id=176962&atid=879335]
+
 
+
51003 - 51003 - [[user:kthiemann|Karsten]] - [http://sourceforge.net/tracker/index.php?func=detail&aid=1804068&group_id=176962&atid=879335]
+
  
 +
== Core Class Changes ==
 +
Don't do this if you are not sure that you really need it :)
 +
* GUI enhancements
  
 
[[Category:Developer documentation]]
 
[[Category:Developer documentation]]

Latest revision as of 02:48, 11 February 2011

Application Dictionary

  • Add new fields, tabs or even windows without business logic (see NewWindow, Virtual_Colums)
  • Change/add validation rules for fields
  • Change/set default values for fields
  • Change/set read only logic for fields
  • Change/set visibility logic for fields
  • Change/set mandatory logic for fields
  • Change the layout (field order) of tabs
  • Translate or rename GUI elements
  • You may find this useful about Application Dictionary

Callout

A callout is a java method that is executed after a field value is changed.

  • Data entry consequences like calculate totals that need direct feedback at the GUI

If you do calculations in callouts you have to repeat them in the related PO classes (using model validator) to allow the access via a different UI like HTML interface

  • Not for data validation - use dynamic validation (AD) instead
  • Define in Table Column, if you need more than one to the same column, define separated them by ;
  • see Callout and Tutorials#FAQ also

Process

A process is a java class that extends org.compiere.process.SvrProcess. It is linked to a button in the ADempiere client and executed when the user hits this button or to a menu entry. It has two methods prepare() - to check process parameters - and doIt() - to do the work.

  • For complex logic that may take some time

Look at this template for an example.

Validators

Define in your Client the field ModelValidationClasses with your validation classes. They must implement org.compiere.model.ModelValidator. Look at example MyValidator. The main methods are modelChange which is called after PO.beforeSave/PO.beforeDelete and docValidate which is called as first step of DocAction.prepareIt.

  • For business logic like validation - all kind of logic you would otherwise put direct into the mentioned methods

MClasses and ModelValidator both are used to do data validation and business logic. Callouts should not be used for complex logic since they are triggerd from the UI only and their logic has to be duplicated in the MClass/Validator to make sure that it is applied if you create an object from the java code.

The main difference between MClass and validator is that the existing MClasses are part of the ADempiere core and the validators are ment to enhance the core (to allow customizations). Note: this belongs to the standard ADempiere tables - if you create your own table you can put all logic in the MClass since it is a customisation itself..

If you need to change or enhance the business logic of an order(e.g. check if the selected shipping type is available for the selected destination) you shouldn't do it in the standard MClass MOrder. If you do so, you need to merge your customized MOrder-Class by hand everytime you upgrade ADempiere. If you use your own validator class for this the upgrade will be much easier.

Custom Forms

A custom form is a swing window that is not generated from the AD. It has to implement the org.compiere.apps.form.FormPanel interface. If you use custom forms you have to rebuild their logic for other GUI (HTML, WebServices...)

  • For complex GUI windows where the AD generated standard windows are not flexible enough

Core Class Changes

Don't do this if you are not sure that you really need it :)

  • GUI enhancements