Difference between revisions of "ADempiere Multiple Record Action Field"

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
(ADempiere Multiple Record Action Field)
(ADempiere Multiple Record Action Field)
Line 3: Line 3:
 
=ADempiere Multiple Record Action Field=
 
=ADempiere Multiple Record Action Field=
 
==The Output==
 
==The Output==
 +
 +
*The below image is the window showing the Single Row View
 
[[Image:Student single.png]]
 
[[Image:Student single.png]]
*The above image is the window showing the Single Row View
+
 
 +
*Below, the window is viewed in Multi-Row View. Notice the fields situated at the Header(Upper part of the Window) and also the fields at the Footer( at the bottom part of the window)
 
[[Image:Student multirow.png]]
 
[[Image:Student multirow.png]]
*The window is viewed in Multi-Row View. Notice the fields situated at the Header(Upper part of the Window) and also the fields at the Footer( at the bottom part of the window)
+
 
[[Image:Selectall.png]]
+
 
*When clicking on the "Select All" button, all the records will be marked as selected reflected by the checkbox under "Select" column. The callout logic will be explain later
 
*When clicking on the "Select All" button, all the records will be marked as selected reflected by the checkbox under "Select" column. The callout logic will be explain later
[[Image:Unselectall.png]]
+
[[Image:Selectall.png]]
 +
 
 
*When the "Unselect All" button will be clicked, all the records will cleared as unselected, in which all of the "Select" checkbox will unchecked.
 
*When the "Unselect All" button will be clicked, all the records will cleared as unselected, in which all of the "Select" checkbox will unchecked.
[[Image:Normal select.png]]
+
[[Image:Unselectall.png]]
 +
 
 
*User could do normal selection of the records by clicking on the "Select" checkbox in the same to other windows with checkbox
 
*User could do normal selection of the records by clicking on the "Select" checkbox in the same to other windows with checkbox
[[Image:Invert selection.png]]
+
[[Image:Normal select.png]]
 +
 
 
*Alternately, User could also use the "Invert Selection" button to invert the selection
 
*Alternately, User could also use the "Invert Selection" button to invert the selection
[[Image:DoAction.png]]
+
[[Image:Invert selection.png]]
 +
 
 
*I also created a sample button at the footer which will may do actions.
 
*I also created a sample button at the footer which will may do actions.
 +
[[Image:DoAction.png]]
 +
 
*Note: Those fields mentioned above are not built-in fields. I just created them just for a sample, in fact that window is not meaningful nor usable.
 
*Note: Those fields mentioned above are not built-in fields. I just created them just for a sample, in fact that window is not meaningful nor usable.
  
Line 30: Line 38:
 
**doAction
 
**doAction
 
**total_selected
 
**total_selected
[[Image:Table column select all.png]]
+
 
 
*Remember the "Select All" button above, this is where that button is derived, take note of the callout specified, which will be created later
 
*Remember the "Select All" button above, this is where that button is derived, take note of the callout specified, which will be created later
[[Image:Table column unselect all.png]]
+
[[Image:Table column select all.png]]
 +
 
 
*Of course this is the "Unselect All" button, again take notice of the callout specified
 
*Of course this is the "Unselect All" button, again take notice of the callout specified
[[Image:Table column invert selection.png]]
+
[[Image:Table column unselect all.png]]
 +
 
 
*This one is for the "Invert Selection" button, so with its callout script
 
*This one is for the "Invert Selection" button, so with its callout script
 +
[[Image:Table column invert selection.png]]
 +
 +
*This column is just a predefined Element which I just reused. This will determine if the record is selected or not. This will be the subject for the callouts, which most of the sample callouts I have created will stir up this column.
 
[[Image:Table column is selected.png]]
 
[[Image:Table column is selected.png]]
*This column is just a predefined Element which I just reused. This will determine if the record is selected or not. This will be the subject for the callouts, which most of the sample callouts I have created will stir up this column. Notice that this column will not be shown when the window is viewed in Multi-Row Presentation, since this in intended for that view only, on the other hand, the other fields which are shown on the Header and Footer of the Window will only be visible when the window is viewed in Multi-Row Presentation, since it is what they are inteded ( to do actions on the Multiple Records Selected")
+
*Notice that this column will not be shown when the window is viewed in Multi-Row Presentation, since this in intended for that view only, on the other hand, the other fields which are shown on the Header and Footer of the Window will only be visible when the window is viewed in Multi-Row Presentation, since it is what they are inteded ( to do actions on the Multiple Records Selected")
[[Image:Table column doAction.png]]
+
 
 
*This is the button at the bottom of the page which we could relate it to buttons on common wizards window of some applications which does actions such as "Next, Finish, etc".
 
*This is the button at the bottom of the page which we could relate it to buttons on common wizards window of some applications which does actions such as "Next, Finish, etc".
[[Image:Table column total selected.png]]
+
[[Image:Table column doAction.png]]
 +
 
 
*This is a sample summary field which will display the summary of the records, in this case, the total record selected
 
*This is a sample summary field which will display the summary of the records, in this case, the total record selected
 +
[[Image:Table column total selected.png]]
  
 
==Creating new FieldGroupTypes==
 
==Creating new FieldGroupTypes==
Line 53: Line 68:
  
 
==The Window Fields Definition==
 
==The Window Fields Definition==
 +
*The here comes the window definition, as usual, aside from table, this will also defined the appearance, location and behaviour of the fields in the window
 +
*Below is the Field definition of my sample button "Select All". Take notice the Field Group which is "Header" in turn display it as the first button on the header area of the window. It is the first in the header area since it also observed the Field Order definition of the "Window Tab & Fields"
 
[[Image:Window select all.png]]
 
[[Image:Window select all.png]]
 +
 +
*Just as "Select All", the "Unselect All" is also defined as "Header" field Group, but with the addition that we specify that this field is "SameLine" which will align to the first field specified.
 +
*Note: if the "SameLine" is unchecked, this will cause the field to be created at the next line, just below the first field("Select All").
 
[[Image:Window unselect all.png]]
 
[[Image:Window unselect all.png]]
 +
 +
*In the same way as "Select All", this "Invert Selection" field is also of "Header" field Group, and "SameLine", hence, as you could observe, the three fields are lining up at the upper part of the window.
 
[[Image:Window invert selection.png]]
 
[[Image:Window invert selection.png]]
 +
 
[[Image:Window is selected.png]]
 
[[Image:Window is selected.png]]
 
[[Image:Window footer.png]]
 
[[Image:Window footer.png]]

Revision as of 11:57, 28 April 2009

This is a documentation showing about my feature request for ADempiere Multiple Record Action Field [1] [2] which nobody ever responded. Anyways I just thought I am too ambigous, So now I will explain.

ADempiere Multiple Record Action Field

The Output

  • The below image is the window showing the Single Row View

Student single.png

  • Below, the window is viewed in Multi-Row View. Notice the fields situated at the Header(Upper part of the Window) and also the fields at the Footer( at the bottom part of the window)

Student multirow.png

  • When clicking on the "Select All" button, all the records will be marked as selected reflected by the checkbox under "Select" column. The callout logic will be explain later

Selectall.png

  • When the "Unselect All" button will be clicked, all the records will cleared as unselected, in which all of the "Select" checkbox will unchecked.

Unselectall.png

  • User could do normal selection of the records by clicking on the "Select" checkbox in the same to other windows with checkbox

Normal select.png

  • Alternately, User could also use the "Invert Selection" button to invert the selection

Invert selection.png

  • I also created a sample button at the footer which will may do actions.

DoAction.png

  • Note: Those fields mentioned above are not built-in fields. I just created them just for a sample, in fact that window is not meaningful nor usable.

The Table Definition

  • To achieve the sample window above, we need to define first the table

Table definition.png

  • The table is just like common tables, ( I have copied it from "M_Freight_Category" )
  • Aside from those standard column,I added 6 columns, in which they are the center of this discussion:
    • select_all
    • unselect_all
    • invert_selection
    • IsSelected
    • doAction
    • total_selected
  • Remember the "Select All" button above, this is where that button is derived, take note of the callout specified, which will be created later

Table column select all.png

  • Of course this is the "Unselect All" button, again take notice of the callout specified

Table column unselect all.png

  • This one is for the "Invert Selection" button, so with its callout script

Table column invert selection.png

  • This column is just a predefined Element which I just reused. This will determine if the record is selected or not. This will be the subject for the callouts, which most of the sample callouts I have created will stir up this column.

Table column is selected.png

  • Notice that this column will not be shown when the window is viewed in Multi-Row Presentation, since this in intended for that view only, on the other hand, the other fields which are shown on the Header and Footer of the Window will only be visible when the window is viewed in Multi-Row Presentation, since it is what they are inteded ( to do actions on the Multiple Records Selected")
  • This is the button at the bottom of the page which we could relate it to buttons on common wizards window of some applications which does actions such as "Next, Finish, etc".

Table column doAction.png

  • This is a sample summary field which will display the summary of the records, in this case, the total record selected

Table column total selected.png

Creating new FieldGroupTypes

  • I added new FieldGroupTypes which are "Header - H" and "Footer - F"

FieldGroupType.png

  • I then create a FieldGroup "Header" of type "Header". We could use another name, but in any case the fields will still be shown in one area, and that is in the header since there are no other header area on the window
  • Fields that is specified to have this Field Group("Header") will be shown at the upper part of the window, just above any other fields, below the toolbar.

Fieldgroup header.png

  • Next is the "Footer" Field Group which is of type "Footer" also, the same way as "Header" field group, fields that are specified to "Footer" will be show at the bottom part of the window, just below all any other ordinary fields.

Fieldgroupfooter.png

The Window Fields Definition

  • The here comes the window definition, as usual, aside from table, this will also defined the appearance, location and behaviour of the fields in the window
  • Below is the Field definition of my sample button "Select All". Take notice the Field Group which is "Header" in turn display it as the first button on the header area of the window. It is the first in the header area since it also observed the Field Order definition of the "Window Tab & Fields"

Window select all.png

  • Just as "Select All", the "Unselect All" is also defined as "Header" field Group, but with the addition that we specify that this field is "SameLine" which will align to the first field specified.
  • Note: if the "SameLine" is unchecked, this will cause the field to be created at the next line, just below the first field("Select All").

Window unselect all.png

  • In the same way as "Select All", this "Invert Selection" field is also of "Header" field Group, and "SameLine", hence, as you could observe, the three fields are lining up at the upper part of the window.

Window invert selection.png

Window is selected.png Window footer.png Window total selected.png

The Callout Rules

Rule selectAll.png Rule UnselectAll.png Rule InvertSelection.png Rule DoAction.png Rule CountSelected.png