Skip to content

setDisabledProperties not reset after operation #142

@joao-sdx

Description

@joao-sdx

Current Form Behavior Configuration:

var crudFormFactory = gridCrud.getCrudFormFactory();
crudFormFactory.setUseBeanValidation(true);

crudFormFactory.setVisibleProperties("propertyKey", "displayOrder", "visible");

crudFormFactory.setDisabledProperties(CrudOperation.UPDATE, "propertyKey");
crudFormFactory.setDisabledProperties(CrudOperation.DELETE, "propertyKey", "displayOrder", "visible");

Steps to Reproduce:

  1. Select an item (READ mode).
  2. Click UpdatepropertyKey is disabled (✅ expected).
  3. Click CreatepropertyKey should be editable but remains disabled (❌ issue).

Expected Process Flow:

  1. Select an item → READ mode
  2. Click UpdatepropertyKey is disabled
  3. Back to READ mode → propertyKey back to enabled
  4. Click CreatepropertyKey is enabled → ❌ Unexpected behavior.

Issue Description:

After clicking Update, the propertyKey field remains disabled even when switching to Create mode, where it should be editable. It appears that the disabled state persists across operations unexpectedly.

Expected Behavior:

  • propertyKey should only be disabled in Update and Delete operations.
  • In Create mode, propertyKey should be editable again.

Possible Cause:

It seems like the disabled property configuration is persisting across form states, potentially requiring an explicit reset when switching to Create mode.

Environment Details:

  • Java 21
  • Quarkus 3.19.1
  • Vaadin 24.6.5
  • crudui 7.2.0

Let me know if you need more details! 🚀

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions