Francis Augusto Medeiros-Logeay
unread,Aug 18, 2025, 4:09:03 AMAug 18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Keycloak User
Hi,
I am using declarative UI - which is an amazing tool, btw.
My question is: is there a way to add computed values to the ComponentModel? For example, to have something on the onCreate or onUpdate methods that would put another value on the model?
I tried, but it didn’t get persisted, which gives me the impression that the values can only be updated via form submission, but not programatically.
For example:
@Override
public void onUpdate(KeycloakSession session, RealmModel realm, ComponentModel oldModel, ComponentModel newModel) {
MultivaluedHashMap<String, String> cfg = newModel.getConfig();
cfg.putSingle("user", "jones");
newModel.setConfig(cfg);
}
It doesn’t work. I tried that with and without creating the property first.
Best,
Francis