Skip to content

Conversation

@dukke
Copy link
Contributor

@dukke dukke commented Aug 5, 2025

Fixes: https://ikmdev.atlassian.net/browse/IIA-2521


This ticket also ended up fixing:

  • A bug where if you fill out the form and leave the name for last the submit button will still be disabled even though you filled out everything.
  • Grayd out prompt text in name textfield so that it doesn't look like an entered value
  • Switch ComboBox types from using ConceptProxy to EntityFacade
image

@dukke
Copy link
Contributor Author

dukke commented Aug 6, 2025

@carldea did what you suggested and fixed another bug. So now besides fixing the ticket this PR is fixing:

  • A bug where if you fill out the form and leave the name for last the submit button will still be disabled even though you filled out everything.
  • Grayd out prompt text in name textfield so that it doesn't look like an entered value
  • Switch ComboBox types from using ConceptProxy to EntityFacade

Thanks!


// Set UI to default values
caseSignificanceComboBox.setValue(TinkarTerm.DESCRIPTION_NOT_CASE_SENSITIVE);
statusComboBox.setValue(Entity.getFast(State.ACTIVE.nid()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use the State.ACTIVE instead of calling getFast()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

State is an enum. We can only get the nid and so we’ll need to do getFast

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The statusComboBox items should contain all states as a State objects(enum). setValue(ACTIVE)
We should look at how we did this for the new StampAddController.java as it relates to the following:

  • converter
  • buttoncell
  • cellfactory

Copy link
Contributor Author

@dukke dukke Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@carldea
I was able to do the refactoring of the StampAddController and created the utility class like we discussed in the dev sync (also took the oportunity to correct some minor issues with the old code).

Regarding the FQN Controller and changing the combobox to use State instances, what I was afraid of ended up happening, unfortunately... when we change the ComboBox to have a collection of State objects rather than what we had, this change ends up trickling down to a bunch of other classes.
Let me explain, the AddFullyQualifiedNameController uses DescrNameViewModel which expects a ConceptEntity for the state. The DescrNameViewModel is then used in other name controller, edit FQN controller, edit other name controller, pattern controller, ConceptViewModel.

In conclusion if we change it to State, unfortunately we'll need to change in a lot of other places because it's all connected... With any change it will also bring with it the possibility of breaking Pattern and Concept editing/creation...
We might possibly want to create another ticket for this effort (using State enum for all these classes)?

Copy link
Contributor

@carldea carldea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@dukke dukke merged commit 76ba67c into ikmdev:main Aug 8, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants