You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UI field value is not update to null in Mongo DB collection at edit time once the field have value.UI shows the field with previous value.
Type of Issue (check one with "X")
Bug/Defect
Current Behavior
UI field value is not updating to null in DB collection at edit time .If the field value updated with null in UI still the field existed with previous value in DB collection.
Expected Behavior
UI field value should be update with null in DB collection at edit time if the field is setting to null from UI. The field should be come up with blank in UI.
How to Reproduce the Issue
Steps to Reproduce
Create a person Add form contains fields name.
Add personName as test123.Submit form.
3)Submit the form through function handler
Edit form field personName value test123 to null value and submit the form.
3)Again open form and see still personName is coming up with test123 in UI instead of empty .
4)Check DB person collection still personName value test123 instead of null value .
Code Snippet
Create a core entity @Domain(value = "person", includeListeners = { ListenerType.persistence }) @repo(alias = " person ", value = Database.rep_mongodb, cache = Cache.rep_device) @Getter@Setter@tostring(callSuper = true)
public class person extends AbstractEntity.IdLong {
private static final long serialVersionUID = 1L; @Audit(PersonAudit.class)
private String personName;
UI field value is updating to null in DB collection at edit time .If the field value updated with null in UI the field has present updated value in DB collection. Issue was replicated, as observed there was no issues.
Issue Details
UI field value is not update to null in Mongo DB collection at edit time once the field have value.UI shows the field with previous value.
Type of Issue (check one with "X")
Bug/Defect
Current Behavior
UI field value is not updating to null in DB collection at edit time .If the field value updated with null in UI still the field existed with previous value in DB collection.
Expected Behavior
UI field value should be update with null in DB collection at edit time if the field is setting to null from UI. The field should be come up with blank in UI.
How to Reproduce the Issue
Steps to Reproduce
3)Submit the form through function handler
3)Again open form and see still personName is coming up with test123 in UI instead of empty .
4)Check DB person collection still personName value test123 instead of null value .
Code Snippet
Create a core entity
@Domain(value = "person", includeListeners = { ListenerType.persistence })
@repo(alias = " person ", value = Database.rep_mongodb, cache = Cache.rep_device)
@Getter @Setter @tostring(callSuper = true)
public class person extends AbstractEntity.IdLong {
private static final long serialVersionUID = 1L;
@Audit(PersonAudit.class)
private String personName;
@Audit(MemberAudit.class)
private String personID;
}
Create Form
Form –
@model
@Getter
@Setter
@MapsTo.Type(Member.class)
public static class AddPersonForm {
@textbox
@Label("Person Name ")
@path
private String personName;
@textbox
@path
@Label("Person Id ")
private String personID;
@config(url="<!#this!>/.. /AddPersonForm/_process?fn=_addPerson&source=add")
@button(style = Button.Style.PRIMARY, type = Button.Type.submit)
@Label(value = "Add Person")
Environment Details
Nimbus Version:
1.3.2.M2
Browser:
All
The text was updated successfully, but these errors were encountered: