Examples of XDataBinding


Examples of net.xoetrope.xui.data.XDataBinding

  public void updateBindings()
  {
    // iterate over components and update their bindings
    int numBindings = modelBindings.size();
    for ( int i = 0; i < numBindings; i++ ) {
      XDataBinding binding = ( ( XDataBinding )modelBindings.elementAt( i ) );
      updateBinding( binding );
    }
  }
View Full Code Here

Examples of net.xoetrope.xui.data.XDataBinding

  {
    // iterate over components and update their values
    int numBindings = modelBindings.size();
    for ( int i = 0; i < numBindings; i++ ) {
      try {
        XDataBinding binding = ( ( XDataBinding )modelBindings.elementAt( i ) );
        binding.get();
      }
      catch ( Exception ex ) {
        if ( BuildProperties.DEBUG )
          DebugLogger.logError( "Unable to update the bindings: " + ex.getMessage() );
      }
View Full Code Here

Examples of net.xoetrope.xui.data.XDataBinding

  {
    // iterate over components and save their values
    int numBindings = modelBindings.size();
    for ( int i = 0; i < numBindings; i++ ) {
      try {
        XDataBinding binding = ( ( XDataBinding )modelBindings.elementAt( i ) );
        binding.set();
      }
      catch( Exception ex ) {
        if ( BuildProperties.DEBUG )
          DebugLogger.logError( "Unable to save the binding values: " + ex.getMessage() );
        ex.printStackTrace();
View Full Code Here

Examples of net.xoetrope.xui.data.XDataBinding

  public XDataBinding getBinding( Object targetComp )
  {
    // iterate over components
    int numBindings = modelBindings.size();
    for ( int i = 0; i < numBindings; i++ ) {
      XDataBinding binding = ((XDataBinding)modelBindings.elementAt( i ));
      if ( binding.getComponent() == targetComp )
        return binding;
    }
    return null;
  }
View Full Code Here

Examples of net.xoetrope.xui.data.XDataBinding

  public XDataBinding getBinding( String targetPath )
  {
    // iterate over components
    int numBindings = modelBindings.size();
    for ( int i = 0; i < numBindings; i++ ) {
      XDataBinding binding = ((XDataBinding)modelBindings.elementAt( i ));
      if ( binding.getSourcePath().compareTo( targetPath ) == 0 )
        return binding;
    }
    return null;
  }
View Full Code Here

Examples of net.xoetrope.xui.data.XDataBinding

          XDragInfo dragInfo = dragManager.getDragInfo( key );
          return new XDragInfoTransferable( dragInfo, dataFlavors[ 2 ] );
        }
      }
      else{
        XDataBinding binding = ((XPage)p).getBinding( c );
        if ( binding != null ) {
          binding.set();
          DataFlavor[] dragFlavors = new DataFlavor[ 2 ];
          dragFlavors[ 0 ] = dataFlavors[ 0 ];
          dragFlavors[ 1 ] = dataFlavors[ 1 ];
          return new XModelTransfereable( binding.getSource(), binding.getOutput(), dragFlavors );
        }
        else
          return new XComponentTransferable( c, dataFlavors[ 1 ] );
      }
    }
View Full Code Here

Examples of net.xoetrope.xui.data.XDataBinding

  /**
   * Updates the binding of the underlying XListHolder object
   */
  public void updateBinding()
  {
    XDataBinding binding = page.getBinding( listHolder );
    // in case of XList object, mark the binding as dirty
    if ( binding instanceof XListBinding )
      ((XListBinding)binding).setDirty( true );
    page.updateBinding( binding );
 
View Full Code Here

Examples of net.xoetrope.xui.data.XDataBinding

   * binding of the underlying list holder object.
   */
  public void updateListHolder()
  {
    sourceModel.setDirty( true );
    XDataBinding binding = page.getBinding( listHolder );
    // in case of XList object, mark the binding as dirty
    if ( binding instanceof XListBinding )
      ((XListBinding)binding).setDirty( true );
    page.updateBinding( binding );
  }
View Full Code Here

Examples of net.xoetrope.xui.data.XDataBinding

          }
         
          if ( targetComp == null )
            targetComp = page.findComponent( fieldName );
         
          XDataBinding binding = builder.getFactoryBinding( page, targetComp, instanceConfig );
          page.addBinding( binding );
        }
        catch ( Exception e )
        {
          e.printStackTrace();
View Full Code Here

Examples of net.xoetrope.xui.data.XDataBinding

//    int pos = className.lastIndexOf( '.' );
//    if ( pos > 0 )
//      clsName = className.substring( pos + 1 );
   
    XModel model = (XModel)currentProject.getModel().get( (String)instanceConfig.get( "source" ));
    XDataBinding binding = null;
    if ( ( className.indexOf( "XComboBox" ) > 0 ) && ( model instanceof DatabaseTableModel ) )
      binding = new XListTableBinding();
    else if (( className.indexOf( "XTable" ) > 0 ) || ( comp instanceof XModelHolder ))
      binding = new XTableTableBinding();     
    else if ( ( comp instanceof XTextHolder ) && (( model instanceof DatabaseTableModel ) || ( model instanceof DatabaseRowModel ) || ( model instanceof DatabaseFieldModel )))
      binding = new XTextTableBinding();

    if ( binding != null )
      binding.setup( currentProject, comp, null, instanceConfig );
    return binding;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.