private boolean isValidFactType() { return !( editingCol.getFactType() == null || "".equals( editingCol.getFactType() ) ); }
private void doPatternLabel() { if ( this.editingCol.getFactType() != null ) { this.patternLabel.setText( this.editingCol.getFactType() + " [" + editingCol.getBoundName() + "]" ); } }
public InsertFactActionDetectorKey( ActionInsertFactCol52 actionCol ) { super( actionCol ); this.factType = actionCol.getFactType(); this.boundName = actionCol.getBoundName(); this.factField = actionCol.getFactField(); }
private ListBox loadPatterns() { Set<String> vars = new HashSet<String>(); ListBox patterns = new ListBox(); for ( Object o : model.getActionCols() ) { ActionCol52 col = (ActionCol52) o; if ( col instanceof ActionInsertFactCol52 ) { ActionInsertFactCol52 c = (ActionInsertFactCol52) col; if ( !vars.contains( c.getBoundName() ) ) { patterns.addItem( c.getFactType() + " [" + c.getBoundName() + "]", c.getFactType() + " " + c.getBoundName() ); vars.add( c.getBoundName() ); } } } return patterns; }
private ListBox loadPatterns() { Set<String> vars = new HashSet<String>(); ListBox patterns = new ListBox(); for ( Object o : model.getActionCols() ) { ActionCol52 col = (ActionCol52) o; if ( col instanceof ActionInsertFactCol52 ) { ActionInsertFactCol52 c = (ActionInsertFactCol52) col; if ( !vars.contains( c.getBoundName() ) ) { patterns.addItem( c.getFactType() + " [" + c.getBoundName() + "]", c.getFactType() + " " + c.getBoundName() ); vars.add( c.getBoundName() ); } } } return patterns; }
private void doValueList() { if ( model.getTableFormat() == TableFormat.LIMITED_ENTRY ) { return; } //Don't show a Value List if either the Fact\Field is empty final String factType = editingCol.getFactType(); final String factField = editingCol.getFactField(); boolean enableValueList = !( ( factType == null || "".equals( factType ) ) || ( factField == null || "".equals( factField ) ) ); //Don't show a Value List if the Fact\Field has an enumeration if ( enableValueList ) { enableValueList = !oracle.hasEnums( factType, factField ); } valueListWidget.setEnabled( enableValueList ); if ( !enableValueList ) { valueListWidget.setText( "" ); } }
private DecoratedGridCellValueAdaptor<? extends Comparable<?>> derieveCellFromAction( ActionInsertFactCol52 col ) { //Check if the column has a "Value List" or an enumeration. Value List takes precedence final String factType = col.getFactType(); final String fieldName = col.getFactField(); if ( utils.hasValueList( col ) ) { return makeValueListCell( col ); } else if ( oracle.hasEnums( factType, fieldName ) ) { return makeEnumCell( factType, fieldName ); } return derieveCellFromModel( col ); }
public void onClick( ClickEvent w ) { editingCol.setFactField( box.getItemText( box.getSelectedIndex() ) ); editingCol.setType( oracle.getFieldType( editingCol.getFactType(), editingCol.getFactField() ) ); makeLimitedValueWidget(); makeDefaultValueWidget(); doValueList(); doFieldLabel(); pop.hide(); } } );
final ActionInsertFactCol52 aif = (ActionInsertFactCol52) ac; if ( aif.getBoundName().equals( binding ) ) { if ( oracle.isDependentEnum( baseActionColumn.getFactType(), baseActionColumn.getFactField(), aif.getFactField() ) ) {
if ( ac instanceof ActionInsertFactCol52 ) { ActionInsertFactCol52 aifc = (ActionInsertFactCol52) ac; String factType = aifc.getFactType(); String binding = aifc.getBoundName(); if ( factType != null && factType.length() > 0 ) {
if ( !isEqualOrNull( origColumn.getFactType(), editColumn.getFactType() ) || !isEqualOrNull( origColumn.getFactField(), editColumn.getFactField() ) ) { } else if ( !isEqualOrNull( origColumn.getFactType(), editColumn.getFactType() ) || !isEqualOrNull( origColumn.getFactField(), editColumn.getFactField() ) ) {
final ActionInsertFactCol52 aif = (ActionInsertFactCol52) ac; if ( aif.getBoundName().equals( binding ) ) { if ( oracle.isDependentEnum( baseActionColumn.getFactType(), baseActionColumn.getFactField(), aif.getFactField() ) ) {
private void showFieldChange() { final FormStylePopup pop = new FormStylePopup(); pop.setModal( false ); String[] fields = this.oracle.getFieldCompletions( FieldAccessorsAndMutators.MUTATOR, this.editingCol.getFactType() ); final ListBox box = new ListBox(); for ( int i = 0; i < fields.length; i++ ) { box.addItem( fields[ i ] ); } pop.addAttribute( Constants.INSTANCE.Field(), box ); Button b = new Button( Constants.INSTANCE.OK() ); pop.addAttribute( "", b ); b.addClickHandler( new ClickHandler() { public void onClick( ClickEvent w ) { editingCol.setFactField( box.getItemText( box.getSelectedIndex() ) ); editingCol.setType( oracle.getFieldType( editingCol.getFactType(), editingCol.getFactField() ) ); makeLimitedValueWidget(); makeDefaultValueWidget(); doValueList(); doFieldLabel(); pop.hide(); } } ); pop.show(); }
private void populateModelColumn( final ActionInsertFactCol52 col, final ActionInsertFactCol52 editingCol ) { col.setBoundName( editingCol.getBoundName() ); col.setType( editingCol.getType() ); col.setFactField( editingCol.getFactField() ); col.setHeader( editingCol.getHeader() ); col.setValueList( editingCol.getValueList() ); col.setDefaultValue( editingCol.getDefaultValue() ); col.setHideColumn( editingCol.isHideColumn() ); col.setFactType( editingCol.getFactType() ); col.setInsertLogical( editingCol.isInsertLogical() ); if ( col instanceof LimitedEntryCol && editingCol instanceof LimitedEntryCol ) { ( (LimitedEntryCol) col ).setValue( ( (LimitedEntryCol) editingCol ).getValue() ); } }
value ); } else if ( oracle.hasEnums( column.getFactType(), column.getFactField() ) ) { final Context context = new Context( column ); final Map<String, String> currentValueMap = dropDownManager.getCurrentValueMap( context ); final DropDownData dd = oracle.getEnums( column.getFactType(), column.getFactField(), currentValueMap );
private ActionInsertFactCol52 cloneActionInsertColumn( ActionInsertFactCol52 col ) { ActionInsertFactCol52 clone = null; if ( col instanceof LimitedEntryActionInsertFactCol52 ) { clone = new LimitedEntryActionInsertFactCol52(); DTCellValue52 dcv = cloneLimitedEntryValue( ( (LimitedEntryCol) col ).getValue() ); ( (LimitedEntryCol) clone ).setValue( dcv ); } else { clone = new ActionInsertFactCol52(); } clone.setBoundName( col.getBoundName() ); clone.setType( col.getType() ); clone.setFactField( col.getFactField() ); clone.setFactType( col.getFactType() ); clone.setHeader( col.getHeader() ); clone.setValueList( col.getValueList() ); clone.setDefaultValue( new DTCellValue52( col.getDefaultValue() ) ); clone.setHideColumn( col.isHideColumn() ); clone.setInsertLogical( col.isInsertLogical() ); return clone; }
a1.getBoundName() ); assertEquals( "Cheese", a1.getFactType() ); assertEquals( "price", a1.getFactField() );
a1.getBoundName() ); assertEquals( "Cheese", a1.getFactType() ); assertEquals( "price", a1.getFactField() );
r[ 1 ] ); assertTrue( oracle.hasEnums( ins.getFactType(), ins.getFactField() ) ); assertFalse( utils.hasValueList( ins ) ); r = oracle.getEnums( ins.getFactType(), ins.getFactField(), currentValueMap ).getFixedList(); r[ 1 ] ); assertTrue( oracle.hasEnums( ins_.getFactType(), ins_.getFactField() ) ); assertTrue( utils.hasValueList( ins_ ) );