Problem with ActionListener firing multiple times

I have a GUI class, GUIView, with a no-arg constructor and a static getInstance() method.
The GUI class has a JButton called btnB1 with a method:
     void addB1Listener(ActionListener al){
          btnB1.addActionListener(al);
     }The Controller class has an instance of the GUI and the Model.
The Controller has a constructor which assigns a new ActionListener to the JButton from the GUI.
private GUI m_gui;
     FTController(GUIView view){
          m_gui = view;
          m_gui.addButtonListener(new AddButtonListener());
     }The Controller has an inner class:
class AddButtonListener implements ActionListener{
          @Override
          public void actionPerformed(ActionEvent e) {
                      // do stuff
}The model has a constructor which accepts a GUIView.
My main method setups instances of the objects:
     private GUIView view;
     private Model model;
     private Controller controller;
     public static void main(String [] args){
          view = GUIView.getInstance();
          model = new Model(view);
          controller = new Controller(view);
     }This action listener for btnB1 is firing multiple times, but I don't understand why.
Edited by: user10199598 on Jan 9, 2012 2:56 PM

Here is the actual Controller class
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import javax.swing.JOptionPane;
import com.esri.arcgis.carto.FeatureLayer;
import com.esri.arcgis.carto.IActiveView;
import com.esri.arcgis.carto.Map;
import com.esri.arcgis.interop.AutomationException;
public class FTController{
     private FTView m_arraView;
     private FTModel m_arraModel;
     private Map m_map;
     FTController(FTView view, FTModel model, Map map){
          m_arraView = view;
          m_arraModel = model;
          m_map = map;
          m_arraView.addPointListener(new AddPointListener());
          m_arraView.addExitListener(new AddExitListener());
          m_arraView.addResetListener(new AddResetListener());
     public FTView getM_arraView() {
          return m_arraView;
     // Inner class used as the ActionListener for the btnAddPoint in FTView
     class AddPointListener implements ActionListener {
          @Override
          public void actionPerformed(ActionEvent e) {
               FeatureLayer fl = (FeatureLayer) m_arraModel.getLayerByName("arra_field_teams", m_map);
               try {
                    // Start the process to add a new feature point
                    m_arraModel.addPoint(fl, (IActiveView) m_map.getActiveView());
                    // Reset and dispose of the ARRA Field Teams form.
                    m_arraView.getCboTeam().setSelectedIndex(0);
                    m_arraView.getCboAgency().setSelectedIndex(0);
                    m_arraView.getTxtLatitude().setText("");
                    m_arraView.getTxtLongitude().setText("");
                    m_arraView.getTxtGridL().setText("");
                    m_arraView.getTxtGridN().setText("");
                    m_arraView.getTxtQuadrant().setText("");
                    m_arraView.getFtf3IC().setText("0.002");
                    m_arraView.getFtf3FC().setText("0.002");
                    m_arraView.getFtf3IO().setText("0.002");
                    m_arraView.getFtf3FO().setText("0.002");
                    m_arraView.getFtfAgxCartridge().setText("0.000");
                    m_arraView.getFtfBGCM().setText("50.000");
                    m_arraView.getFtfBGURHR().setText("0.002");
                    m_arraView.getTxtTimeOfReading().setText("");
                    m_arraView.dispose();
                    // Refresh the map window
                    m_map.getActiveView().refresh();
               } catch (AutomationException e1) {
                    e1.printStackTrace();
               } catch (IOException e1) {
                    e1.printStackTrace();
     } // end AddPointListener
     // Inner class used as the ActionListener for the btnExit in FTView
     class AddExitListener implements ActionListener{
          @Override
          public void actionPerformed(ActionEvent e) {
               m_arraView.getCboTeam().setSelectedIndex(0);
               m_arraView.getCboAgency().setSelectedIndex(0);
               m_arraView.getTxtLatitude().setText("");
               m_arraView.getTxtLongitude().setText("");
               m_arraView.getTxtGridL().setText("");
               m_arraView.getTxtGridN().setText("");
               m_arraView.getTxtQuadrant().setText("");
               m_arraView.getFtf3IC().setText("0.002");
               m_arraView.getFtf3FC().setText("0.002");
               m_arraView.getFtf3IO().setText("0.002");
               m_arraView.getFtf3FO().setText("0.002");
               m_arraView.getFtfAgxCartridge().setText("0.000");
               m_arraView.getFtfBGCM().setText("50.000");
               m_arraView.getFtfBGURHR().setText("0.002");
               m_arraView.getTxtTimeOfReading().setText("");
               m_arraView.dispose();
     } // end AddExitListener
     // Inner class used as the ActionListner for the btnReset in FTView
     class AddResetListener implements ActionListener{
          @Override
          public void actionPerformed(ActionEvent e) {
               FeatureLayer fl = (FeatureLayer) m_arraModel.getLayerByName("field_teams", m_map);
               try {
                    // Actually, "Reset" is deleting all features from the shapefile, poor choice of labels.
                    m_arraModel.resetFeatures(fl, (IActiveView) m_map.getActiveView(), (Map) m_map);
                    // Refresh the map window
                    m_map.getActiveView().refresh();
               } catch (AutomationException e1) {
                    e1.printStackTrace();
               } catch (IOException e1) {
                    e1.printStackTrace();
}Here is where the application starts:
import java.awt.event.MouseEvent;
import java.io.IOException;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import com.esri.arcgis.addins.desktop.Tool;
import com.esri.arcgis.arcmap.Application;
import com.esri.arcgis.arcmapui.IMxDocument;
import com.esri.arcgis.arcmapui.MxDocument;
import com.esri.arcgis.carto.IActiveView;
import com.esri.arcgis.carto.IFeatureLayer;
import com.esri.arcgis.carto.Map;
import com.esri.arcgis.framework.IApplication;
import com.esri.arcgis.geodatabase.Feature;
import com.esri.arcgis.geodatabase.IFeatureClass;
import com.esri.arcgis.geometry.Point;
import com.esri.arcgis.interop.AutomationException;
public class FTTool extends Tool {
     private IApplication app;
     private IActiveView av;
     private IMxDocument mxDocument;
     private Map map;
     private FTView arraView;
     private FTModel model;
     private FTController controller;
     private int left;
     private int top;
      * Called when the tool is activated by clicking it.
      * @exception java.io.IOException if there are interop problems.
      * @exception com.esri.arcgis.interop.AutomationException if the component throws an ArcObjects exception.
     @Override
     public void activate() throws IOException, AutomationException {
     @Override
     public void init(IApplication app) throws IOException, AutomationException {
          this.app = app;
          try {
             try {
                    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
               } catch (ClassNotFoundException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
               } catch (InstantiationException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
               } catch (IllegalAccessException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
               } catch (UnsupportedLookAndFeelException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
               // Initialize our map document, map and active view
               mxDocument = (IMxDocument)app.getDocument();
               av = mxDocument.getActiveView();
               map = (Map)mxDocument.getMaps().getItem(0);
               // Get an instance of the ARRAView JFrame, and setup the model and controller for this tool add-in
               arraView = FTView.getInstance();
//               arraView.addWindowListener(arraView);
               // Set up the model and controller objects
               model = new FTModel(arraView);
               controller = new FTController(arraView, model, map);
          } catch (AutomationException e) {
               e.printStackTrace();
          } catch (IOException e) {
               e.printStackTrace();
     @Override
     public void mousePressed(MouseEvent mouseEvent) {
          super.mousePressed(mouseEvent);
          // Cast IMxDocument into MxDocument so we can get the Parent which returns an Application
          MxDocument mxd = (MxDocument)mxDocument;
          Application application;
          // Create an Application object so we can get the left and top properties of the window
          //  so we can position the Field Teams GUI.
          try {
               application = new Application(mxd.getParent());
               left = application.getLeft() + 75;
               top = application.getTop() + 105;
          } catch (IOException e2) {
               e2.printStackTrace();
          try {
               // Call the model to convert the screen coordinates to map coordinates and project the point to WGS_1984
               Point p1 = new Point();
               p1.putCoords((double)mouseEvent.getX(), (double)mouseEvent.getY());
               Point p2 = (Point) model.getMapCoordinatesFromScreenCoordinates(p1, av);
               Point point = (Point)model.handleToolMouseEvent(mouseEvent, av);
             // Format the decimal degrees to six decimal places
               DecimalFormat df = new DecimalFormat("#.######");
               // Assign the point2 values to double
               double x = point.getX();
               double y = point.getY();
               // Set the text of the lat/long fields.
               arraView.getTxtLatitude().setText(df.format(y));
               arraView.getTxtLongitude().setText(df.format(x));
               // Set the Time of Reading text field
               Date now = new Date();
               SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
               arraView.getTxtTimeOfReading().setText(sdf.format(now).toString());
               // Determine whether the mouse click point intersects the arra_grid_quad.
               //  If so, iterate over that feature cursor to update the gridl, gridn and quadrant fields...
               IFeatureLayer featLayer = (IFeatureLayer) model.getLayerByName("arra_grid_quads", map);     
               IFeatureClass featClass = featLayer.getFeatureClass();
               Feature iFeat = (Feature) model.queryArraGridQuads(featClass, p2);
               if(iFeat != null){
                    // Fill in the grid and quadrant values if there are any.
                    String gridl = (String) iFeat.getValue(iFeat.getFields().findField("GRID_L"));
                    String gridn = (String) iFeat.getValue(iFeat.getFields().findField("GRID_N"));
                    String quadrant = (String) iFeat.getValue(iFeat.getFields().findField("QUADRANT"));
                    arraView.getTxtGridL().setText(gridl);
                    arraView.getTxtGridN().setText(gridn);
                    arraView.getTxtQuadrant().setText(quadrant);
               } else {
                    // Revert values back to empty string after clicking in the grid, then outside of the grid.
                    arraView.getTxtGridL().setText("");
                    arraView.getTxtGridN().setText("");
                    arraView.getTxtQuadrant().setText("");
               // Set the Field Team Readings form to visible, or redisplay it if it is already visible
               arraView.setBounds(left, top, 325, 675);
               arraView.setVisible(true);
          } catch (Exception e) {
               e.printStackTrace();
     @Override
     public boolean deactivate() throws IOException, AutomationException {
          return super.deactivate();
     @Override
     public boolean isChecked() throws IOException, AutomationException {
          return super.isChecked();
     public FTView getArraView() {
          return arraView;
     public IApplication getApp() {
          return app;
     public Map getMap() {
          return map;
     public FTModel getModel() {
          return model;
}Is this enough?
Edited by: user10199598 on Jan 9, 2012 3:20 PM

Similar Messages

  • Problem with Placements rendering multiple times

    I am having a problem of portlets rendering more than once. Or more specifically,
    it appears placements are rendering more than once. Anyone have this problem.
    It seems to show its ugly head switching between VIEW and EDIT mode in portlets
    with Backing files. Here is the only output I get.
    <Mar 8, 2004 5:10:39 PM EST> <Warning> <netuix> <BEA-421534> <Expecting one placement
    got at least one more: username MYLOGIN placement
    Placement:
    placementId: 26004
    DesktopInstanceId: 22003
    PageInstanceId: 6004
    PlaceholderDefinitionId: 6010
    position: 1
    PortletInstanceId: 36007
    BookInstanceId: null location 1.>
    cheers
    andrew

    Hi Andrew,
    I am getting this kind of problem while using PortalVisitorManager::movePlaceableInstances()
    in my JPF code.
    It seems that one call resutls in adding a single portlet many times (8 times).
    The confusing part is that it should move a portlet instance from one location
    to other location but it adds new instances...
    did u get around with u'r problem, do u have some solution..
    any clue.....
    regards,
    Jitendra Kumar.
    "Andrew Clifford" clifforda.no.spam.comcast.net wrote:
    >
    I am having a problem of portlets rendering more than once. Or more specifically,
    it appears placements are rendering more than once. Anyone have this
    problem.
    It seems to show its ugly head switching between VIEW and EDIT mode
    in portlets
    with Backing files. Here is the only output I get.
    <Mar 8, 2004 5:10:39 PM EST> <Warning> <netuix> <BEA-421534> <Expecting
    one placement
    got at least one more: username MYLOGIN placement
    Placement:
    placementId: 26004
    DesktopInstanceId: 22003
    PageInstanceId: 6004
    PlaceholderDefinitionId: 6010
    position: 1
    PortletInstanceId: 36007
    BookInstanceId: null location 1.>
    cheers
    andrew

  • Issue with When Validate Trigger firing multiple times

    Hi guys,
    I have Designed a Form Personalization on a Form which Fires a concurrent Program (built in:execute Procedure) when a Record is Saved.
    Below are the issues I am facing:
    1.Concurrent Program is Firing Multiple Times after Saving the Record.
    2.2 input Values to Concurrent Program are passed as NULL though I have Data but they are in Different Block of Form.
    Note :I have When Validate trigger on 1 Block but i am trying to pass 2 Values on Another Block as input parameters for Concurrent program.But those values are getting as null when program fires.
    Thanks.

    If EBS then post in {forum:id=475}

  • Event firing multiple times (et_Got_Focus)

    Hi,
    I just noticed while debugging my Add On code that the et_Got_Focus event which I have added to my event filters is triggered 64 times when I change a field value and then move to a different field.  This not only happens in the matrix when changing field values and tabbing through but also in the header fields.
    This has got to be a bug and it is not only slowing down the A/P Invoice form but it is potentially very dangerous to have an event firing 64 times when it should only be fired once. 
    To test this all one needs to do is add the et_Got_Focus event to the event filter with the A/P Invoice form, then add a debug statement to write out the itemvalue properties and you will see once you edit a value and tab you will get 64 statements that are the et_Got_Focus event, BeforeAction false for the same field or column when it should only occur once.
    I have a very digrunted client that is very frustrated due to the amount this slows down data entry in the A/P Invoice.  I cannot get rid of this event because there is a particular field I am monitoring for the got focus event so I can stop it under certain circumstances.
    If anyone else has experienced this or knows how to resolve this please let me know.  I guess if I don't find out why this is happening I will post a CSN to SAP.
    Thanks very much,
    David Wall
    Here is a sample of my debug output messages for one update of a single field and then tabbing out:
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False

    Hi David,
    We at Self Informatique France have the same problem of getfocus firing many times at one of our customers in Algeria although wae are not using formated search.Any solution ?
    Best Rgds.
    Antoine Egeileh
    President
    Self Informatique
    [email protected]

  • Problem with DAQmx and Real Time PCI-7041/6040E.

    Problem with DAQmx and Real Time PCI-7041/6040E.
    I have a problem with the Real Time card PCI-7041/6040E, I think it is properly installed because my software run with the traditional NI-DAQ. When I try to use the new DAQmx to acquire one signal, Labview doesn't see any device for de DAQ card 6040E.
    Information, I work on Windows XP and LabView v7.0.0 (NIDAQ RT v7.0.0, NI-Serial RT v2.5.2, NI-VISA v3.0.1 and NI-Watchdog v2.0.0).
    Could Labview RT run with new DAQmx ?
    What can I do to use DAQmx with PCI-7041/6040E?
    Thanks for your help !

    Hello,
    I refer to your posts because i am using the PCI 7041/6040E card as
    well but without any success to make it work. The problem I have
    already described in the following thread:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=120198
    Would be nice if you had a look on it, maybe you can help me. BTW, the
    thread starts with a problem of someone else, the difficulties I
    encountered are to be found a little bit to the bottom of the thread's
    page.
    Thank you!
    Dirk Völlger
    Darmstadt
    Message Edited by ratschnowski on 07-28-2005 07:14 AM

  • Problem with drill down in time dimension - OBIEE 11G

    Hello There,
    I have a problem with drill down in time dimension. The hierarchy for time dimension is " Fiscal Year---> Fiscal Quarter---> Month(Name)--->Date". When I select a Time dimension and click results its getting opened in a Pivot table view. The problem here is, when I click the "Total" its getting drilled down to Year ---> Quarter but when I click on "+ sign next to quarter" it should drill down to month for that particular quarter for that particular year but its drilling down to month for that particular quarter for all years.
    Any suggestions are much appreciated.
    Thanks,
    Harry.

    1.) Congrats for resurrecting a year-old thread.
    2.) Your answer is here: "Check the level key of the quarter level...it should include both quarter and year columns. Since a specific quarter occurs every year, quarter column alone can't be used as the level key."

  • Trigger is firing multiple times

    Hi
      we have a table in database , which has multiple triggers defined by Vendor. I have created our own custom trigger on this table also , which fires last. Goal of this custom trigger is to send an email, when ever update happens on table. But somehow
    trigger is firing multiple times for same update, so it is sending multiple email for same update also
       Any advice?
    thanks
    Drew

    ALTER trigger [dbo].[AB_TABLEXXX_IUD_TR]
    on [dbo].[TABLEXXX]
    after insert,update,delete
    as
    begin
        set nocount on
        declare @sub varchar(1024)
        declare @tmpstr nvarchar(max)
     DECLARE @action as char(1);
     declare @id as int
     declare @send as int
        SET @action = 'I'; -- Set Action to Insert by default.
        declare @insCount int
     declare @delCount int
     DECLARE @newLineChar AS CHAR(2) = CHAR(13) + CHAR(10)
     DECLARE @tab as CHAR(1)=char(9)
        declare @vendorId char(30)  
     declare @detailmsg varchar(500)
     declare @ovname varchar(30),@nvname varchar(100)
     declare @ovchkname varchar(100),@nvchkname varchar(100)
     declare @oaddress1 varchar(100),@naddress1 varchar(100)
     declare @oaddress2 varchar(100),@naddress2 varchar(100)
     declare @oaddress3 varchar(100),@naddress3 varchar(100)
     declare @ouserdef1 varchar(100),@nuserdef1 varchar(100)
     declare @ovndclsid varchar(11),@nvndclsid varchar(11)
     select @tmpstr=''
     select @insCount = count(*) from INSERTED
     select @delCount = count(*) from DELETED
        if(@insCount > 0 or @delCount > 0)--if something was actually affected, otherwise do nothing
        Begin
            if(@insCount = @delCount)
                set @action = 'U'--is update
            else if(@insCount > 0)
                set @action = 'I' --is insert
            else
                set @action = 'D' --is delete
        End
     else
      select @action='X'
     if(@action='X') RETURN
     select @sub='Not Found'
     set @send=0
        if (@action='I')
     begin
      select top 1 @vendorId=rtrim(VENDORID),@nvname=rtrim(VENDNAME),@nvchkname=rtrim(VNDCHKNM), @naddress1=rtrim(ADDRESS1) ,
        @naddress2=rtrim(ADDRESS2),@naddress3=rtrim(ADDRESS3),@nuserdef1=rtrim(USERDEF1),@nvndclsid=rtrim(VNDCLSID) from inserted 
      select @sub=ORIGINAL_LOGIN()+' : '+'Data inserted in table ''TABLEXXX'''
      select @send=1
      select @sub=ORIGINAL_LOGIN()+' : '+'New Vendor
    '''+@nvname+''' is added'
      select @tmpstr=@sub
      select @tmpstr =@tmpstr+@newLineChar +'Inserted On: '+ Convert(varchar(50),sysdatetime())+@newLineChar
      select @tmpstr=@tmpstr+@newLineChar+'Vendor ID:
    '+@vendorId
      select @tmpstr=@tmpstr+@newLineChar+'Vendor Name:
    '+@nvname
      select @tmpstr=@tmpstr+@newLineChar+'Check Name:
    '+@nvchkname
      select @tmpstr=@tmpstr+@newLineChar+'Address1:
    '+@naddress1
      select @tmpstr=@tmpstr+@newLineChar+'Address2:
    '+@naddress2
      select @tmpstr=@tmpstr+@newLineChar+'Address3:
    '+@naddress3
      select @tmpstr=@tmpstr+@newLineChar+'User Def:
    '+@nuserdef1
      select @tmpstr=@tmpstr+@newLineChar+'Class ID:
    '+@nvndclsid
     end
     if (@action='U')
     begin
      select @sub=ORIGINAL_LOGIN()+':''Data Updated in table ''TABLEXXX'''  
      declare @iTotal int
      select @iTotal =0
      select @detailmsg=''
      create table #new_values(
       VENDORID varchar(100) NULL,
       processed char(1) NULL
      insert into #new_values
         select distinct VENDORID,NULL from inserted  
      while ((select count(*) from #new_values where processed is null)>0 and @iTotal<=50)
      begin
         --PRINT 'UPDATE Entered ' +@action
       select @iTotal=@iTotal+1
       select top 1 @vendorId=VENDORID from #new_values where processed is null
       update #new_values set processed='Y' where
    VENDORID=@vendorId and processed is null
       select @detailmsg=''
       select
         top 1       
           @ovname=o.VENDNAME, @nvname=n.VENDNAME,
        @ovchkname=o.VNDCHKNM,@nvchkname=n.VNDCHKNM,
        @oaddress1=o.ADDRESS1,@naddress1=n.ADDRESS1,
        @oaddress2=o.ADDRESS2,@naddress2=n.ADDRESS2,
        @oaddress3=o.ADDRESS3,@naddress3=n.ADDRESS3,
        @ouserdef1=o.USERDEF1,@nuserdef1=n.USERDEF1,
        @ovndclsid=o.VNDCLSID,@nvndclsid=n.VNDCLSID
       from  inserted n,deleted o
       where n.VENDORID=o.VENDORID and n.VENDORID
    =@vendorId
       if (update(VENDNAME) and @ovname<>@nvname) select @detailmsg
    =@detailmsg+ @newLineChar
    +@tab+'Vendor Name: '+rtrim(@ovname)+' => '+rtrim(@nvname)
       if (update(VNDCHKNM) and @ovchkname<>@nvchkname) select @detailmsg
    =@detailmsg+ @newLineChar
    +@tab+'Check Name: '+rtrim(@ovchkname)+' => '+rtrim(@nvchkname)
       if (update(ADDRESS1) and @oaddress1<>@naddress1) select @detailmsg
    =@detailmsg+ @newLineChar
    +@tab+'Address1: '+rtrim(@oaddress1)+' => '+rtrim(@naddress1)
       if (update(ADDRESS2) and @oaddress2<>@naddress2) select @detailmsg
    =@detailmsg+ @newLineChar
    +@tab+'Address2: '+rtrim(@oaddress2)+' => '+rtrim(@naddress2)
       if (update(ADDRESS3) and @oaddress3<>@naddress3) select @detailmsg
    =@detailmsg+ @newLineChar
    +@tab+'Address3: '+rtrim(@oaddress3)+' => '+rtrim(@naddress3)
       if (update(USERDEF1) and @ouserdef1<>@nuserdef1) select @detailmsg
    =@detailmsg+ @newLineChar
    +@tab+'User Def: '+rtrim(@ouserdef1)+' => '+rtrim(@nuserdef1)
       if (update(VNDCLSID) and @ovndclsid<>@nvndclsid) select @detailmsg
    =@detailmsg+ @newLineChar
    +@tab+'Class ID: '+rtrim(@ovndclsid)+' => '+rtrim(@nvndclsid)
       if(len(@detailmsg)>0)
       begin
           select @send=1
        if (len(@tmpstr)<=0)
        begin
          select @sub=ORIGINAL_LOGIN()+' : '+'Vendor '''+rtrim(@ovname)+''' Updated in table TABLEXXX'
          select @tmpstr='Vendor '''+rtrim(@ovname)+''' Updated'
          select @tmpstr
    =@tmpstr+@newLineChar +@tab+'Updated On: '+ Convert(varchar(50),sysdatetime())+@newLineChar
          select @tmpstr
    =@tmpstr+@newLineChar +@tab+'Vendor ID: '+rtrim(@vendorId)
        end
        select @tmpstr=@tmpstr +@detailmsg
       end
      end
     end
     if (@action='D')
     begin
      select top 1 @vendorId=rtrim(VENDORID),@nvname=rtrim(VENDNAME),@nvchkname=rtrim(VNDCHKNM), @naddress1=rtrim(ADDRESS1) ,
        @naddress2=rtrim(ADDRESS2),@naddress3=rtrim(ADDRESS3),@nuserdef1=rtrim(USERDEF1),@nvndclsid=rtrim(VNDCLSID) from deleted 
      select @send=1
      select @sub=ORIGINAL_LOGIN()+' : '+'Vendor
    '''+@nvname+''' is DELETED'
      select @tmpstr=@sub
      select @tmpstr =@tmpstr+@newLineChar +'Deleted On: '+ Convert(varchar(50),sysdatetime())+@newLineChar
      select @tmpstr=@tmpstr+@newLineChar+'Vendor ID:
    '+@vendorId
      select @tmpstr=@tmpstr+@newLineChar+'Vendor Name:
    '+@nvname
      select @tmpstr=@tmpstr+@newLineChar+'Check Name:
    '+@nvchkname
      select @tmpstr=@tmpstr+@newLineChar+'Address1:
    '+@naddress1
      select @tmpstr=@tmpstr+@newLineChar+'Address2:
    '+@naddress2
      select @tmpstr=@tmpstr+@newLineChar+'Address3:
    '+@naddress3
      select @tmpstr=@tmpstr+@newLineChar+'User Def:
    '+@nuserdef1
      select @tmpstr=@tmpstr+@newLineChar+'Class ID:
    '+@nvndclsid
     end
     if (@action<>'X' and @send=1)
     begin
      Exec msdb.dbo.sp_send_dbmail
       @profile_name='default',   
       @recipients='[email protected]',
       @subject= @sub,
       @body=@tmpstr
     end
    end
    Drew

  • Error-1074396120 Not an image, problem with IMAQ Learn multiple geometric patterns

    Error-1074396120 Not an image, problem with IMAQ Learn multiple geometric patterns
    Hi!
    I've tried to modify the example of  "multiple geometric patterns matching" , and just use two patterns, but when I run the VI this error appear and I doon't know how to solve it! , the error appears in the "IMAQ Learn multiple geometric patterns" block.
    Running on:
    - labview 32 bits
    - windows 7 64 bits
    - usb camera 2.0
    Any sugestion would be helpful..... !  Regards
    Attachments:
    template_12.png ‏150 KB
    template_11.png ‏123 KB
    vision_multiple_pattern_matching.vi ‏127 KB

    thanks all for your replies, the problem was on my template images, I had to give them information about the pattern matching, and I did it with NI Vision Template Editor, within Vision utilities, and I chose template with Feature Based. 
    Thank you again and Regards!

  • JPane ancestorResized event fired multiple times

    Hi,
    I have a JPane which in turn contains some more controls. I'm handling "ancestorResized" event for the JPane. But, when I resize the form once, the "ancestorResized" event for the JPane is called 3 times. where as the "this_componentResized" event is called only once.
    I am doing a lot of control relocation and resizing in the "ancestorResized" event handler. Since it is fired 3 times, it is making my application slow.
    Can some body tell me how to come over this.
    Regards.

    Hi David,
    We at Self Informatique France have the same problem of getfocus firing many times at one of our customers in Algeria although wae are not using formated search.Any solution ?
    Best Rgds.
    Antoine Egeileh
    President
    Self Informatique
    [email protected]

  • HT5361 Today, I experienced a problem with my mail. the time and date on each email received and sent is 18-06  and the date is 22nd July irrespective of the actual time

    Today, I experienced a problem with my mail. the time and date on each email received and sent is 18.06 and date as 22nd July. Thank you  John

    Incorrect date or time displayed in various applications

  • Problems with ASIO on multiple Audigy 2 ZS cards

    G'day,
    I've been using an Audigy 2ZS PCI for a couple of years now with great success. I convert old audio recordings to various digital formats using a couple of applications (mainly Adobe Audition 1.5 & 2.0).
    Recently, my workload has increased to the point where I needed one card to just record at high res, and another card to handle just playback and general Windows bells & whistles without impacting the performance of the recording.
    I installed a second 2ZS, it was detected by Windows, etc, and I set it up so Windows uses one card (identified as A800) for all its stuff, and the second card (B000) is used only for ASIO recording.
    That's where the nightmare started. I've uploaded and installed the May 2006 Creative driver update, but I still suffer from a number of problems, some related to Audition, some not.
    The least annoying problem is that all the Creative drivers seem to identify only a truncated version of the ID string. So for example, in various applications, I see "SB Audigy 2ZS [B0 -1" or "SB Audigy 2ZS [A8 -5". This is annoying but not showstopping.
    The biggest problem is getting applications to correctly interact with the Creative Labs ASIO driver and enumerator. Most applications (Nero, Audition, Premiere Pro) can "see" the ASIO driver, but when it's selected, it may not work at all, or may work from one or the other sound card, without any clear indication of which card is selected.
    I'm sorry if this sounds generic, but I've spent a week with the Adobe folks, who simply ended up telling me "it's a problem with the CL drivers", and most forums I frequent say the same thing, and the specifics vary from application to application, but at the core, CL drivers are just not working properly with the system when two cards are installed.
    By way of example, using ASIO4ALL has fixed many of the card selection problems, but even there, sometimes the inputs of one card are disabled, sometimes the other card, and in the middle of a recording session (line in jack, 44.1k/16 bit), the input waveform slowly biases down to -2V and then all I get are inverted samples - quiet appears as max. value samples, while valid audio appears as -2V samples! If I put the audio line into the other card, it plays just fine (I know what I'm doing WRT grounding and line levels, etc).
    This system has run essentially non-stop since September 2005, and I guess it collected a lot of software crud, so I bit the bullet and performed a clean reinstall of Windows XP and updated every driver I could. Some problems have since changed for the better (i.e. clicking on the configure button of the CL ASIO driver no longer bluescreens or displays an empty window), but the problems described above still happen all the time.
    I was wondering if other users have seen the same or similar problems, and if so, what has worked for you?
    The system is a Gigabyte 81PE1000Pro2, PCI bus, 3.2GHz P4 with HT enabled, 2G physical RAM, and a 1.5Tb RAID disk system.
    Recording when a single sound card (either of the cards works beautifully on its own) is perfect; just when both cards are installed, everything gets confused! Even the WDM drivers don't correctly identify or manage the routing of inputs and outputs reliably.
    Sorry to go on about this. If anyone can offer constructive suggestions (I define "constructive" as not telling me to "buy another type of card" or (as one poor soul suggested) telling me that multiple PCI sound cards are not supported under Windows), I would be most grateful.
    Thanks and regards,
    Peter

    G'day Jutapa, thanks for looking at this!
    Yeah, I got all the possible ASIO drivers listed, one CL ASIO driver is listed for each card, and I have spent much time trying different configurations of card order, I/O port order, direct sound enabling/disabling, timesync enable/disable, etc.
    The problem for me with the CL ASIO drivers is that it limits me to 48/96k sampling only. That is not acceptable, because I need to sample at 44.1k for "straight" conversions to CD, or 192k/24-bit for archival purposes (used for extremely old or fragile recordings), so I end up with large files that nearly always need to be resampled to 44.1k, or saved permanently at 192k/24-bit. Typical filesize is 650Mb, largest so far is 5.66Gb - so that's an awful lot of time spent downsampling or pointless upsampling. I'm starting to think that the problems I'm experiencing may be due to sampling at "non-native" ASIO or WDM rates. I haven't tried sampling at 48/96k to see if that "fixes" the problem...
    Using the WDM wrapper drivers (I don't know if these are provided - or supported! - by Creative or Adobe) results in randomly disabling one or the other Audigy. At that point, the only way to recover functionality for the disabled card is to reboot. Sometimes only the inputs are disabled, sometimes only the outputs, sometimes both. There is no pattern that I can see or duplicate.
    Both cards appear to work fine under Windows. I can define either card as the default recording or playback device, and I can define one card as the default recording and the other as the default playback, any combination works fine. However, any application that uses WDM drivers to access the cards also get confused when a card's inputs suddenly become disabled! This does not appear to happen when Windows is the only application using the cards.
    Specifying "use preferred devices" in Windows does disable the non-selected card (or card input or output if I specify different cards for input and output) in other applications.
    The problems are much worse when I try to use any ASIO drivers to access the cards. This problem with ASIO appears regardless of the application I use.
    I have installed ASIO4ALL, and it finds and configures the cards without any problems in ALL applications - but if I'm recording (with no other applications or drivers or tray applications loaded or active), when I stop recording and restart, the input I was just recording from appears disabled! If I open the ASIO4ALL configuration window, one or both Audigy cards will have their inputs disabled, or both inputs AND outputs disabled. This doesn't happen all the time, and my workaround is not to stop recording once I've started. Not a good workaround! I do realise that ASIO4ALL does fiddle around with the sample rates in the background, but at least when it works, I get a single clean sample without having to do all the resource-intensive resampling later. Maybe it's 6 of one, 1/2 dozen of the other...
    I understand and appreciate that perhaps CL never intended to provide software functionality for more than one Audigy on any given PCI bus/bridge. I just don't get why the drivers appear to work natively under Windows (I'm assuming that Windows just uses WDM access) but not with any other applications.
    I will try and do some testing with "native" ASIO sample rates (i.e. 48/96k) and see if that fixes some or all of the problems. My concern here is really that my expectation is that the drivers, once identified and enabled, should not suddenly disable themselves in all applications (by whatever mechanism), regardless of what sample rates are specified. But maybe that's too much to expect.
    BTW, this happens with any combination of 2 of my 3 Audigy 2ZS cards, each of which works perfectly on its own with ASIO and WDM drivers. So it's definitely a multiple card issue.
    The workaround that has been suggested is to purchase a different vendor's card : but there are so few cards that I can use to sample at the resolutions I require, and they are all so bloody expensive, that's why I've committed so much to CL Audigy 2ZS.
    I'll get back to you once I've tried a few days working at the "standard" ASIO sample rates. Thanks again for taking the time with this stupid and unusual problem!
    Kind regards,
    Peter

  • Is it possible to open window with FPM embedded multiple times in a dialog?

    Hi,
    Is it possible to open a web dynpro window whose view embeds the FPM_GAF_COMPONENTu2019s FPM_WINDOW multiple times in dialog window?
    I have a web dynpro component WDC1 which use FPM_GAF_COMPONENT and provide the component configuration for FPM.
    Thereu2019s a WINDOW1 (with View1) in WDC1 which has a view container and the FPM_GAF_COMPONENTu2019s FPM_WINDOW is embedded.
    I have a button in WDC1 which create a new dialog window by calling if_wd_window_manager->CREATE_WINDOW as code below.
          lo_window = lo_window_manager->CREATE_WINDOW(
              MODAL                = ABAP_TRUE
              WINDOW_NAME          = 'WINDOW1'
              TITLE                = 'Test opening FPM multiple times'
              CLOSE_BUTTON         = ABAP_TRUE
    *          BUTTON_KIND          =
    *          MESSAGE_TYPE         = IF_WD_WINDOW=>CO_MSG_TYPE_NONE
    *          CLOSE_IN_ANY_CASE    = ABAP_TRUE
    *          MESSAGE_DISPLAY_MODE =
    *          DEFAULT_BUTTON       =
              IS_RESIZABLE         = ABAP_TRUE
    It works for the first time when I click the button, a dialog window opens with my FPM GAF stuff.
    But when I click the button the second time after closing the dialog window, it generates a dump with error message saying u201CComponent Usage Group MESSAGE_AREA_USAGES Already Existsu201D.
    In ST22, the dump was generated in WDDOINIT of view u201CMAINu201D on FPM_GAF_COMPONENT which looks to me like the message manager is already created in the first time.
      lr_component = wd_comp_controller->wd_get_api( ).
      lr_usage_group = lr_component->create_cmp_usage_group(
                           name            = 'MESSAGE_AREA_USAGES'
                           used_component  = 'FPM_MESSAGE_MANAGER' ).
      wd_this->mo_message_area_usage = lr_usage_group->add_component_usage( 'MESSAGE_AREA_USAGE' ).
      wd_this->mo_message_area_usage->create_component( 'FPM_MESSAGE_MANAGER' ).
    I tried to remove the component usage of FPM in my WDC1 or delete  the component directly, hoping that this will clear the memory , but doesnu2019t work, only bring more different dumps  which make this look like a wrong direction as I am interfering the lifecycle of FPM itself.
    Can anyone share some ideas here? Thanks in advance.
    Best regards,
    Beiyang
    P.S. The FPM GAF works fine when I open the window in new browser (by calling if_wd_window_manager->create_external_window).

    Hi ,
    Currently I am facing same problem could you please let me know how you resolved your issue.
    Thanks in advance.

  • Problem Calling a WebService multiple times

    Hi Guys,
    I am a relatively new user of DS 12.2 doing a proof-of-concept to call an in-house WebService for a batch of customer records - lets say 1000.
    The WS has an input schema where it's parameters are within a nested table such that it can be called for many customers in a single call if desired. WS input schema (made-up example)=
    -WS
    --$REQUEST_SCHEMA **added by DS on import
    ---CustVerification
    src_nr
    src_state
    I have successfully been able to create a Data-Flow that builds the input-schema such that 1 WS call is made with a nested input of all 1000 customers. This works and the output from the single call is correct (many records relating to the many inputs etc). Input schema =
    - <CustVerification>
    - <Details>
    <src_nr>1234<src_nr />
    <src_state>KY</src_state>
    </Details>
    - <Details>
    <src_nr>1234<src_nr />
    <src_state>KY</src_state>
    </Details>
    - <Details>
    <src_nr>1234<src_nr />
    <src_state>KY</src_state>
    </Details>
    </CustVerification>
    Now the problem - I am wanting to do this flow so that it calls the WS once PER customer i.e. 1 entry in many of the nested CustVerification structures.
    I have, again, been able to produce the correct XML schema (at least it looks correct) which repeats the Input Schema for each customer record. HOWEVER, when hooking this up to the function call of the WS as before, I either get only 1 single call like before with the last entry in the file run through it..... or, after playing with the query's input schema to add an extra root level and changing FROM clauses to map to the function call schema I then get a huge ACCESS_VIOLATION dump which mentions "LoadDFXML::put_string()+2427 byte(s)" and other such XML-related but non-helpful messages.
    New input schema is:
    - <CustVerification>
    - <Details>
    <src_nr>1234<src_nr />
    <src_state>KY</src_state>
    </Details>
    </CustVerification>
    - <CustVerification>
    - <Details>
    <src_nr>1234<src_nr />
    <src_state>KY</src_state>
    </Details>
    </CustVerification>
    - <CustVerification>
    - <Details>
    <src_nr>1234<src_nr />
    <src_state>KY</src_state>
    </Details>
    </CustVerification>
    So.... am I missing something simple in how I call a WS multiple times as opposed to once with multiple inputs? Could this be a setting/property somewhere? IS this linked with how I do a QueryTransform in a certain way to get the function called the right number of times? Anything else??
    Thanks for any advice/help.
    Flip.

    Thanks for the responses guys.... I actually got past the error with a change to the NRDM structure (as mentioned in the first reply, I think a small problem here really changes things).
    So - what I had to do to get this working properly was to add a new 'dummy' level into the structure - this kept it clean to denote that the 1 large bulk of messages were going to be sent through the WS many times. So - structure looks like this:
    Input_Query:
    - <ROOT>
    - <CustVerification>
    - <Details>
    <src_nr>1234<src_nr />
    <src_state>KY</src_state>
    </Details>
    </CustVerification>
    - <CustVerification>
    - <Details>
    <src_nr>1234<src_nr />
    <src_state>KY</src_state>
    </Details>
    </CustVerification>
    - <CustVerification>
    - <Details>
    <src_nr>1234<src_nr />
    <src_state>KY</src_state>
    </Details>
    </CustVerification>
    </ROOT>
    Then, in the Output schema for the function call, I had to create a dummy extra schema level also - say 'WS_Call', and put the function call within this structure. The FROM mapping has to be set so that both the input_query level AND the input_query.root level are mapped to the WS_Call schema.
    And then it works!
    Summary -- its a bugger.... but playing with the structure levels (and adding your own at times) and FROM clauses can work!
    Cheers,
    Flip.

  • After removing malware Firefox is still broken even after uninstall/reinstall, yet other browsers have no problems with links opening multiple unwanted windows.

    I removed malware from my new Windows 7 pro 64 bit PC. I have reinstalled Firefox multiple times to try and resolve the problem, even deleting the Mozilla folder from programs on the C drive. Whenever I click on a link on a webpage in Firefox, multiple unwanted tabs and windows open up making Firefox virtually unusable. Resetting Firefox doesn't help. I installed Chrome and do not get these popups. The malware must have caused some damage related to Firefox that will not allow Firefox to function normally even with a fresh install. I would prefer to use Firefox.
    I don't recall the name of the malware.

    The cause is most likely the preferences file in your profile folder. That file contains your personal settings, so it doesn't get deleted when you reinstall/update Firefox. The reset feature also retains your preferences file.
    Instead of doing a mass delete of all your settings, you can try identify the culprits and reset them individually.
    # In the [[Awesome Bar - Find your bookmarks, history and tabs when you type in the address bar|Location bar]], type '''about:config''' and press '''Enter'''. The about:config "''This might void your warranty!''" warning page may appear.
    # Click '''I'll be careful, I promise!''', to continue to the about:config page.
    # Click on the '''Status''' column, to sort your preferences by status, and group all the ''user set'' preferences together. They should appear in bold.
    # If you see any preference that look suspicious, just '''right-click''' on it, and select '''Reset'''.
    If you're still not sure which ones to reset, you can post most of them here easily. Go to '''Help > Troubleshooting Information''' then click '''Copy text to Clipboard'''. Open a reply to this post, and go to '''Edit > Paste''' to paste the info from your Troubleshooting Information page.

  • Actionlistener initiated multiple times on a single click

    Hi!
    Well I have major problem with my ActionListener. basically I have this TreeSelectionListener now inside that I have initiated actionListeners for buttons. The idea is that JTree (implemented from the dom tree) can be selected and copied, pasted etc.. The whole procedure works for the first time but after that every time when I press the button say copy its selected that many number of times.
    E.g.: When I first initiated the JFrame I pressed copy ---> It was called once
    Second time on clicking the JButton (once) it called JButton twice
    Third time thrice and so on....
    I dont have a clue whats wrong with the code (BELOW).. There is a small bug or probably its the wrong approach..
    Thanks.. in advance for ur help
    -saddz
    instanceTree.addTreeSelectionListener(new TreeSelectionListener()
    public void valueChanged(TreeSelectionEvent ev)
    try
    ///////////////////////copy button's ActionListener/////////////////////
    copyNodeButton.addActionListener ( new ActionListener()
    public void actionPerformed(ActionEvent e)
    nodeSelected = (XMLProcessor.AdapterNode)instanceTree.
    getLastSelectedPathComponent();
    System.out.println ( "Copy used" ) ;
    if ( nodeSelected.isLeaf() )
    copiedNode = nodeSelected.getDomNodeReference();
    text.setText(copiedNode.getNodeValue());
    statusBar.setText ( "\"" + copiedNode.getNodeValue() + "\" copied" ) ;
    displaySelectedItem.setText ( copiedNode.getNodeValue() ) ;
    else
    copiedNode =nodeSelected.getDomNodeReference().cloneNode( true );
    text.setText(copiedNode.getNodeName() );
    statusBar.setText ( "\"" + copiedNode.getNodeName() + "\" copied" ) ;
    displaySelectedItem.setText ( copiedNode.getNodeName() ) ;
    copyNodeButton.removeActionListener(this);
    Other buttons for deletion, paste etc

    Hey bill,
    Well I wish I could do that.. the problem is -> I have to use the some tree selected components like nodeSelected on clicking of the button.. I wont be able to use them if I call the ActionListeners outside the TreeSelectionListener()
    Any other suggestions ?
    -saddz

Maybe you are looking for

  • How to call a bean method through javascript?

    Hi, i want to call a bean method using the javascript. thansk in advance.

  • Is it possible to get message screens of the Office jet 100 without the full package?

    i have a office jet 100 and want to have interaction with my printer (get messages if my cartages empty, no paper, etc), but i don't want to install 800MB of software for a couple of pop-up screens. I want to know if it is possible to get the followi

  • Color correction filter and keyframes

    After lots of projects in FCE, I should know this! I have a clip with a color correction filter and keyframes at either end of the clip. Question: If I break the clip in two, am I correct that the color correction filter and keyframes are no longer s

  • Need Advice On Internet Net Only Plan

    Because of a change in my life circumstance, I need internet access only in my home.  ( Have cell phone and no tv services required) My Verizon contract recently expired and now my bill has gone up by $35.00 per month.  I have been a long-term Verizo

  • I18n of Swing for multilingual feature of a already displayed screen

    I have java Swing appication.Each screen has got number of buttons, labels, tool bar etc.It also have DateFormat, SimpleDateFormat, and DateFormatSymbols used for the i18n.Each screen has got a combobox listing diffrent languages.From each screen the