Originally posted by tomasrotek
View Post
Announcement
Collapse
No announcement yet.
Issue with Refreshing Detail View
Collapse
X
-
-
Did you add an event handler to this.model to listen to changes and hide/show field depending on conditions. If not, consider this approach. No need to call reRender then.
Leave a comment:
-
Couldn`t you achieve this by conditional logic on field level in the admin GUI?
Leave a comment:
-
Issue with Refreshing Detail View
Hello,
We are currently encountering a challenge in our project where we need to refresh the complete detail view for the Contact entity.
In our project, we have implemented custom ACL (Access Control Logic). All users have access to view all contacts, but some users, based on certain criteria, can only view (not edit) certain fields. These restricted fields are filtered out using OutputFilter on the backend and hidden in the frontend within the record/detail.js file using the hideField function.
When a user is unable to edit the entity due to restrictions, an "Unlock" button appears. Clicking this button adds the user to the unlockedByUsers field, which grants them access to view and edit all fields of that entity.
The issue arises after pressing the "Unlock" button — we need to refresh the entire view. On the backend, after the unlock action occurs, we attempt to refresh on the frontend with the following code:
PHP Code:this.model.fetch();
this.reRender();
We attempted to manually manage this logic using showField, but this approach is not working.
Currently, our workaround is to use location.reload();, but we are eager to implement a more appropriate solution.
Could someone please assist us with potential solutions?Tags: None
Leave a comment: