Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow getting forms from db without appending locale #586

Merged
merged 4 commits into from
Jul 26, 2021

Conversation

LZRS
Copy link
Contributor

@LZRS LZRS commented Jul 8, 2021

allow configurability of different strategies of form identity naming

The Reveal client app saves forms and form rules to db, with just the filename and no locale appended. This would allow for similar apps to be able to retrieve forms and form rules from db, with no locale appended.

resolving #583
resolving #585

allow configurability of different strategies of form identity naming
Comment on lines 16 to 32
@Override
public void writeValue(String stepName, String key, String value, String openMrsEntityParent, String openMrsEntity, String openMrsEntityId) throws JSONException {
callSuperWriteValue(stepName, key, value, openMrsEntityParent, openMrsEntity, openMrsEntityId);
}

@Override
public void onFormFinish() {
callSuperFinish();
}

protected void callSuperFinish(){
super.onFormFinish();
}

protected void callSuperWriteValue(String stepName, String key, String value, String openMrsEntityParent, String openMrsEntity, String openMrsEntityId) throws JSONException {
super.writeValue(stepName, key, value, openMrsEntityParent, openMrsEntity, openMrsEntityId);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that these four methods were redundant? What do you think?

I think that they each call the super and therefore no need to override and only call super with the exactly same params

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For these I wasn't sure, may be other libraries using native-forms may have had them overridden, because they'd been marked as protected.

LZRS added a commit to opensrp/opensrp-client-reveal that referenced this pull request Jul 23, 2021
LZRS added a commit to opensrp/opensrp-client-reveal that referenced this pull request Jul 23, 2021
LZRS added a commit to opensrp/opensrp-client-reveal that referenced this pull request Jul 23, 2021
@LZRS LZRS merged commit f6553e6 into master Jul 26, 2021
@LZRS LZRS deleted the 585-get-from-db-no-locale branch July 26, 2021 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update FormConfigurationJsonFormActivity to get forms from db without locale
3 participants