openanthem / nimbus-core

Getting Starting with NIMBUS-CORE
https://anthemopensource.atlassian.net/wiki/spaces/OSS/pages/157024674/Quickstart+Guide
Apache License 2.0
10 stars 49 forks source link

Unable to refresh the Section of UI Page from Handler class #746

Open amitkumargne opened 3 years ago

amitkumargne commented 3 years ago

Issue Details

Type of Issue (check one with "X")

[ ] Bug Report => Please search GitHub for a similar issue or PR before submitting
[ ] Feature Request => Please ensure feature is not already in progress
[ ] Support Request => Please do not submit support requests here, instead see: https://discourse.oss.antheminc.com/

Current Behavior

When we are trying to refresh one variable of CardDetail or complete card using executor's execute method by passing commandMessage. we are creating CommandMessage using CommandBuilder.withUri method and passed parameters are (resolvedCommandUrl.toString()).getCommand()

The value for that label in the UI is being displayed using ConfigUrl because variable does not belong to associated collection with that section.

Expected Behavior

That value or complete section should be refreshed which we are calling from our handler class.

How to Reproduce the Issue

Steps to Reproduce

Create one static inner class in any page using @CardDetail and create one variable with below properties:- @Path(linked=false) @FieldValue @Label(value = "ABC") private String abc;

Update the value of this variable from another section and that section should be linked to the collection from which we want to fetch this value from the database.

Now create one Handler class and call it in the config of the above created section not on the variable. Once the page is loaded Make a call to any service which is changing the value of the above mentioned variable. Fetch the updated value from DB. Update the latest value coming from the DB on UI using executorGateway.execute method.

Code Snippet

Below variable is in CardDetailInfo

@Path(linked=false) @FieldValue @Label(value = "ABC") private String abc;

@Model @Getter @Setter @MapsTo.Type(ACollection.class) public static class OverviewTile {

    @Section
    @Initialize
    @Config(url = "<!#this!>/../abc/_process?fn=_set&url=/p/ACollection:<!/.d/.m/acollection/acollectionId!>/abc/_get?b=$state")
    })
    private OverviewSection overviewSection;

Environment Details

Google Chrome