...
- Permission or Role : Which permission or role of user should be checked to allow him see this view. TBD role
- Container Id : The id of register main Layout or container. This is to control visibility of register
- Register Button Id : The id on button which implements the navigation on click event. This allows forwarding all onclick events to custom listener
- Register Click Listener : The onClickListener for this register
- Register Count Views : The badges which display counts for registers
- Each Register count view has following components
- View Id : This is the id of TextView which is display for count
- Table : Which table it displays data from. This is the bindtype where data is managed for given beneficiary. Read more about Bind Types.
- Filter : Any custom filter to be applied to count query
- Postfix : Any post fix to add to badge incase there are multiple badges for one register. This is to distinguish count type
- Count Method : Should app automatically calculates count or developer want to provide count using a custom complex query. Possible values AUTO, MANUAL, NONE
Following is an example of how you initialize a Register with two badges
Code Block |
---|
language | java |
---|
theme | Eclipse |
---|
title | Example Register Initialization |
---|
|
Register myRegister = initRegister("View Permission For Register in OpenMRS", R.id.myRegisterContainer, R.id.btn_my_register, onRegisterStartListener,
new RegisterCountView[]{
new RegisterCountView(R.id.txt_my_count_type_1, "mybindType1", "", "B1", CountMethod.AUTO),
new RegisterCountView(R.id.txt_my_count_type_2, "mybindType2", "", "B2", CountMethod.AUTO),
}); |
Code Block |
---|
language | java |
---|
theme | Eclipse |
---|
title | Example Home Activity |
---|
|
|
...