@Test public void simpleActionUpdateField() { final AtomicBoolean calledBack = new AtomicBoolean(false); setupLimitedEntryPatternAndCondition(); final LimitedEntryActionSetFieldCol52 asf = new LimitedEntryActionSetFieldCol52(); asf.setBoundName("$p"); asf.setFactField("name"); asf.setValue(new DTCellValue52("Michael")); asf.setUpdate(true); model.getActionCols().add(asf); when(dmo.getFieldType(eq("Person"), eq("name"))).thenReturn(DataType.TYPE_STRING); builder.generateDefinition(dtPresenter, asf, (String definition) -> { calledBack.set(true); assertEquals("modify( $p ) {<br/>" + "setName( \"Michael\" )<br/>" + "}", definition); }); assertTrue(calledBack.get()); }
@Override public void generateDefinition( final GuidedDecisionTableView.Presenter dtPresenter, final BaseColumn column, final Callback<String> afterGenerationCallback ) { if ( !( column instanceof LimitedEntryActionSetFieldCol52 ) ) { return; } generateActionColumn( dtPresenter, column, afterGenerationCallback ); }
LimitedEntryActionSetFieldCol52DefinitionBuilder extends BaseActionColumnDefinitionBuilder { @Override public void generateDefinition( final GuidedDecisionTableView.Presenter dtPresenter, final BaseColumn column, final Callback<String> afterGenerationCallback ) { if ( !( column instanceof LimitedEntryActionSetFieldCol52 ) ) { return; } generateActionColumn( dtPresenter, column, afterGenerationCallback ); } }
LimitedEntryActionSetFieldCol52DefinitionBuilder extends BaseActionColumnDefinitionBuilder { @Override public void generateDefinition( final GuidedDecisionTableView.Presenter dtPresenter, final BaseColumn column, final Callback<String> afterGenerationCallback ) { if ( !( column instanceof LimitedEntryActionSetFieldCol52 ) ) { return; } generateActionColumn( dtPresenter, column, afterGenerationCallback ); } @Inject  LimitedEntryActionSetFieldCol52DefinitionBuilder( final Caller<GuidedDecisionTableEditorService> service ); }
LimitedEntryActionSetFieldCol52DefinitionBuilder extends BaseActionColumnDefinitionBuilder { @Override public void generateDefinition( final GuidedDecisionTableView.Presenter dtPresenter, final BaseColumn column, final Callback<String> afterGenerationCallback ) { if ( !( column instanceof LimitedEntryActionSetFieldCol52 ) ) { return; } generateActionColumn( dtPresenter, column, afterGenerationCallback ); } @Inject  LimitedEntryActionSetFieldCol52DefinitionBuilder( final Caller<GuidedDecisionTableEditorService> service ); @Override Class getSupportedColumnType(); @Override void generateDefinition( final GuidedDecisionTableView.Presenter dtPresenter,
                                    final BaseColumn column,
                                    final Callback<String> afterGenerationCallback ); }
LimitedEntryActionSetFieldCol52DefinitionBuilder extends BaseActionColumnDefinitionBuilder { @Override public void generateDefinition( final GuidedDecisionTableView.Presenter dtPresenter, final BaseColumn column, final Callback<String> afterGenerationCallback ) { if ( !( column instanceof LimitedEntryActionSetFieldCol52 ) ) { return; } generateActionColumn( dtPresenter, column, afterGenerationCallback ); } @Inject  LimitedEntryActionSetFieldCol52DefinitionBuilder( final Caller<GuidedDecisionTableEditorService> service ); @Override Class getSupportedColumnType(); @Override void generateDefinition( final GuidedDecisionTableView.Presenter dtPresenter,
                                    final BaseColumn column,
                                    final Callback<String> afterGenerationCallback );  }