Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
8041ee2f
by Tony Chemit at 2020-12-14T15:19:50+01:00
1 changed file:
Changes:
| ... | ... | @@ -69,7 +69,8 @@ public abstract class TripActionHelper implements WithClientUIContext { |
| 69 | 69 |
public static void disableCreateActionIfProgramDisabled(ContentListUI<?, ?, ?> ui, ProgramReference program) {
|
| 70 | 70 |
if (ui.getModel().getStates().isEditable()) {
|
| 71 | 71 |
if (program.isDisabled() && !ui.getModel().getClientUIContext().getClientConfig().isValidationUseDisabledReferential()) {
|
| 72 |
- JMenuItem createAction = (JMenuItem) ui.getClientProperty(ContentListUIHandler.CLIENT_PROPERTY_CREATE_ACTION);
|
|
| 72 |
+ String editorName = (String) ui.getClientProperty(ContentListUIHandler.CLIENT_PROPERTY_CREATE_ACTION);
|
|
| 73 |
+ JMenuItem createAction = (JMenuItem) ui.getObjectById(editorName);
|
|
| 73 | 74 |
createAction.setEnabled(false);
|
| 74 | 75 |
}
|
| 75 | 76 |
}
|