Search Results

Search found 19541 results on 782 pages for 'event handling'.

Page 64/782 | < Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >

  • Spring 3 Controller Exception handler implementation problems

    - by predhme
    I was hoping to implement a single "ExceptionController" to handle exceptions that are thrown in execution of my other controllers' methods. I hadn't specified any HandlerExceptionResolver in my application context so according to the API documentation the AnnotationMethodHandlerExceptionResolver should be started. Verified as such in the source. So I am curious to know why the following isn't working. @Controller public class ExceptionController { @ExceptionHandler(NullPointerException.class) public ModelAndView handleNullPointerException(NullPointerException ex) { // Do some stuff log.error(logging stuff) return myModelAndView; } } @Controller public class AnotherController { @RequestMapping(value="/nullpointerpath") public String throwNullPointer() { throw new NullPointerException(); } } I see in the debug logs that the three default exception handlers are asked for handling of the exception, but nothing is done and I see "DispatcherServlet - Could not complete request". Followed by the user being displayed the stacktrace and a 500 Internal error.

    Read the article

  • Textbox OnTextChanged and Button Click Event Not Firing

    - by goodwince
    I have textboxes being generated by a repeater that use OnTextChanged with autopostback enabled so that I can know when when the values change. This all works perfect. The problem starts when I try to click on any buttons on the page. The loss of focus triggers the event for the OnTextChanged; however, the event for my buttons never get fired. I checked this in the debugger and while debugging if I put a break-point in the page_load it will call both; however, without the break-point it still only calls the OnTextChanged event. I found this post on JavaScript. If my problem is also JavaScript related, why does the clicking of the button fire in debug mode? Thanks.

    Read the article

  • Delphi 2010 buttons losing click event

    - by Lobuno
    I've been experimenting a quite strange problem using Delphi 2010. In one form (a quite complex one) some buttons are automagically losing the click event. I am not dynamically assigning the event or something (they are wired in IDE). The events are fired OK some times but suddenly (and randomly) some of them don't fire the events anymore. Placing a break point in the event doesn't stop the execution. Weird, yes, and I'm lost. I know there is no explanation for this so I only want to ask if there is anybody else experimenting the same problem.

    Read the article

  • java serial I/O: handling USB serial connection/disconnection in a robust manner

    - by Jason S
    I'm using rxtx for serial I/O handling in Java with an FTDI2232H that provides a USB comm port. It works great, with one exception: if I unplug the USB cable, so that the COM port disappears at runtime, it spews exceptions left and right: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1427) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1339) and when I re-plug the cable in again, it does not recover. Is there any way to get rxtx to work properly with USB comm port connection/disconnection? (I've tried to post to the rxtx mailing list but for some strange reason I cannot send messages even though I am subscribed to the list. I've emailed the list admin and have gotten no response.) If not, is there another serial I/O framework that does?

    Read the article

  • Logging exceptions in WCF with IErrorHandler inside HandleError or ProvideFault?

    - by Dannerbo
    I'm using IErrorHandler to do exception handling in WCF and now I want to log the exceptions, along with the stack trace and the user that caused the exception. I've read everywhere to put the logging in the HandleError method, and not the ProvideFault method. My question is, why? The only way I can see to get the user that caused the exception is: OperationContext.Current.IncomingMessageProperties.Security.ServiceSecurityContext.PrimaryIdentity ...But this only seems to work inside ProvideFault, and not inside HandleError. Is there a way to get the user inside HandleError?

    Read the article

  • Rename "Event" object in jQuery FullCalendar plug-in

    - by Jeff
    GREAT PLUGIN!!! BUT... choice of word "Event" to mean a "calendar entry" was particularly unfortunate This is a wonderfully well-written plug in, and I've really impressed people here at work with what this thing can do. The documentation is astonishingly thorough and clear. Congratulations to Adam! HOWEVER, this plug-in refers to entries in the calendar as "Events" -- this has caused a lot of confusion in my development team's conversations, because when we use the word "Event" we think of things like onmouseover, click, etc. We would really prefer a term like CalendarEvent or CalendarEntry. I am not all that experienced with jQuery yet, so am wondering if there is a simple way to alias one of those terms to this plug-in's Event/Events object? (I know we could recode the plug-in directly, but our code will then break when we download an update.) Thanks!

    Read the article

  • Unit-test FileSystemWatcher.Error Event

    - by dotNetkow
    I'm trying to unit test a private method that I have attached to my FileSystemWatcher's Error event. MSDN says that this event "occurs when the internal buffer overflows." I've tried to cause a buffer overflow but have not been successful so far. The FileSystemWatcher's various properties are: fileWatcher.IncludeSubdirectories = false; fileWatcher.Filter = "*"; fileWatcher.NotifyFilter = (NotifyFilters.FileName | NotifyFilters.LastAccess | NotifyFilters.Size); What is the best way of raising this event for the purpose of unit-testing?

    Read the article

  • how to fire the function event on PageLoad event of XtraReport ?

    - by ahmed
    I have a situation, I am working on a XtraReport where I am pulling some data from table.Now I created a function and passing a parameter at runtime for the report to generate. But when I fire the function event from a Onclick Button the result is perfect but when I fire the same function event on the page load of the ReportViewer ..I do not get the result. About function , i am creating dataset, and adapter with Sqlquery from runtime passing the parameter value from a session in the query and binding the data to the labels. But as I said I want the result on the pageload event of the reportviewer.

    Read the article

  • Inclusion Handling in MVC 2 / MVCContrib

    - by mnemosyn
    I'd like to improve my page by combining and minifying javascript and CSS files. Since MVCContrib already contains a project called IncludeHandling, I took a look at that which unfortunately left me with unanswered questions: There is quite a set of interfaces and objects involved in the process. Now I'm using Ninject.Mvc, but it seems that MvcContrib.IncludeHandling is using some additional (home-brewed?) DI? Can I work around this? Has anybody used this and can share some experiences? Secondly, advice that is often heard is to put static content on different domains so the request does not contain cookies and the like, making it much easier for the server to handle the request. But how can I combine this with automatic inclusion handling - isn't that necessarily served in the same application? EDIT: Figured that there is really just a single resolve call in the whole thing, i really wonder why they use DI for that... Thinking about a fork there...

    Read the article

  • mouseOver event-mapping on iPad Safari with webkit-user-select: none

    - by Tim
    I don't have an iPad yet to find this out; have had only a brief opportunity to look at one at the Apple store. Could someone please describe what, if anything, happens to the mouseOver event of an image-map area when the image-map|area has had user-select disabled with "webkit-user-select: none" in the CSS, as described here in section 5: http://developer.apple.com/safari/library/technotes/tn2010/tn2262/index.html When a finger tip is placed on the image-map area and held there (i.e.not a tap) is the mouseOver eventhandler invoked under those circumstances? Or does nothing happen other than the image-map area doesn't change color because it's now unselectable? In my brief experience with the iPad at the Apple store, when user-select is not disabled, and the image-map area has a mouseOver eventhandler, a tap fires the mouseOver event rather than the click event. Thanks

    Read the article

  • How can I dispatch an PropertyChanged event from a subscription to an Interval based IObservable

    - by James Hay
    I'm getting an 'UnauthorizedAccesExpection - Invalid cross-thread access' exception when I try to raise a PropertyChanged event from within a subscription to an IObservable collection created through Observable.Interval(). With my limited threading knowledge I'm assuming that the interval is happening on some other thread while the event wants to happen on the UI thread??? An explanation of the problem would be very useful. The code looks a little like: var subscriber = Observable.Interval(TimeSpan.FromSeconds(1)) .Subscribe(x => { Prop = x; // setting property raises a PropertyChanged event }); Any solutions?

    Read the article

  • MS Dynamic CRM 4.0 serviceappointment closed state javascript event

    - by Jeroen
    Hi, I need to do the following: In Crm, you have serviceappointments (serviceactivities). 1 appointment can have a state, ( like arrived, pending, closed, ... ). When i save the form (onsave event), It should catch if the form is putted closed state and then it should do something. I can get the state easily: alert(crmForm.all.statuscode.DataValue) I hanged this onto an onsave event. But when i put a serviceappointment into closed state, it first calls the onsave event with previous state and then puts it in closed state. Is it possible to catch if it's putted in closed state?

    Read the article

  • Flex Datagrid editing cells in same row not firing collection change event

    - by Chin
    Hi, I am using the flex datagrid to allow the user to edit some data. My update process relies on a CollectionEvent of type update. Basically I catch this event package the values and update the database. However, if the user edits a cell then moves to edit a cell in the same row the value is updated but a collection event is not fired. Only when clicking out of the row the event is fired. Has anyone had experience with this. I have heard the datagrid is a little quirky is this one of those quirks or am I doing this all wrong? Any help appreciated.

    Read the article

  • NULL handling with subselect in Hibernate Criteria API

    - by Jens Schauder
    I'm constructing a Hibernate Criterion, using a subselect as follows DetachedCriteria subselect = DetachedCriteria.forClass(NhmCode.class, "sub"); // the subselect selecting the maximum 'validFrom' subselect.add(Restrictions.le("validFrom", new Date())); // it should be in the past (null needs handling here) subselect.add(Property.forName("sub.lifeCycle").eqProperty("this.id")); // join to owning entity subselect.setProjection(Projections.max("validFrom")); // we are only interested in the maximum validFrom Conjunction resultCriterion = Restrictions.conjunction(); resultCriterion.add(Restrictions.ilike(property, value)); // I have other Restrictions as well resultCriterion.add(Property.forName("validFrom").eq(subselect)); // this fails when validFrom and the subselect return NULL return resultCriterion; It works ok so far, but the restriction on the last line before the return statement is false when validFrom and subselect result in NULL. What I need is a version which handles this case as true. Possibly by applying a NVL or coalesce or similar. How do I do this?

    Read the article

  • Handling User Authentication in C#.NET?

    - by Daniel
    I am new to .NET, and don't have much experience in programming. What is the standard way of handling user authentication in .NET in the following situation? 1.In Process A, User inputs ID/Password 2.Process A sends the ID/Password to Process B over a nonsecure public channel. 3.Process B authenticates the user with the recieved ID/Password what are some of the standard cryptographic algorithms I can use in above model? The users(customers that bought my company's software) will be running the software(Process A) locally in their computer(connected to internet). I need to authenticate the users so that only registered users can run the program. Thank You!

    Read the article

  • iphone/ipad orientation handling

    - by Mark
    This is more of a general question for people to provide me guidance on, basically Im learning iPad/iPhone development and have finally come across the multi-orientation support question. I have looked up a fair amount of doco, and my book "Beginning iPhone 3 Development" has a nice chapter on it. But my question is this, if I was to programatically change my controls (or even use different views for each orientation) how on earth to people maintain their code base? I can just imagine so many issues with spaghetti code/thousands of "if" checks all over the place, that it would drive me nuts to make one small change to the UI arrangement. Does anyone have experience handling this issue? What is a nice way to control it? Thanks a lot Mark

    Read the article

  • Should Java IOException have been an unchecked RuntimeException?

    - by Derek Mahar
    Do you agree that the designers of Java class java.io.IOException should have made it an unchecked run-time exception derived from java.lang.RuntimeException instead of a checked exception derived only from java.lang.Exception? I think that class IOException should have been an unchecked exception because there is little that an application can do to resolve problems like file system errors. However, in When You Can't Throw An Exception, Elliotte Rusty Harold claims that most I/O errors are transient and so you can retry an I/O operation several times before giving up: For instance, an IOComparator might not take an I/O error lying down, but — because many I/O problems are transient — you can retry a few times, as shown in Listing 7: Is this generally the case? Can a Java application correct I/O errors or wait for the system to recover? If so, then it is reasonable for IOException to be checked, but if it is not the case, then IOException should be unchecked so that business logic can delegate handling this exception to a separate system error handler.

    Read the article

  • Trapping errors in TClientDataSet.CommandText

    - by Rob McDonell
    I have a TClientDataSet connected to a TDataSetProvider, which in turn is connected to a TAdsTable. I set the SQL command and then open the ClientDataset something like this: try CDS.CommandText := 'SELECT * FROM tablename WHERE fieldname = 1'; CDS.Open except // trap exception here - this never gets executed! end; If the SQL statement in CommandText fails, however (syntax error or whatever) I get an exception within the Advantage code, but it never gets caught in my own exception handling code. Is there any way for me to trap this error and report it nicely to the user. Alternatively is there a way to verify the syntax of an SQL query before executing it? I'm using Delphi Pro 2009, and Advantage Local Server 9.

    Read the article

  • How to secure Java webservices with login and session handling

    - by hubertg
    I'd like to secure my (Java metro) webservice with a login. Here's how I'm planning to do that: Steps required when calling a webservice method are: call login(user,pwd), receive a session token 1.1 remember the token call servicemethod (token, arg1, arg2...) webservice checks if the token is known, if not throw exception otherwise proceed logout or timeout after x time periods of inactivity my questions: 1. what's your opinion on this approach? does it make sense? 2. are there any libraries which take the burden of writing a session handling (maybe with database persistence to survive app restarts) (the solution should be simple and easily usable with Java and .NET clients) thanks!

    Read the article

  • Looking for an automated logging tool/library for .NET!

    - by tsocks
    Hello, I'm looking for an library/tool for .NET that logs almost everything that happens in my C# application (Windows Form). The problem is that I'm delivering an application to a client (Windows XP) and after doing some task, that classic Microsoft error window appears: "ApplicationName has encountered a problem and needs to close. We are sorry for the inconvenience" I'm currently handling my application exceptions, but this is something external and I can't get anything from that error, so I would like any automated library that helps me with that. It would work if it logs each line of code executed, orr just log what line was executing before that error appeared, or something that could give me more info about that error. Thank you! P.S: It's a multithreaded application, and have to Timer controls (one for watching a folder every 5secs, and another for watching thread list...). I'm using Windows 7 here and everything seems to work ok.

    Read the article

  • jQuery event.stopPropagation is not working on <a>

    - by HorusKol
    I have the following javascript: $('#ge-display').click(function (event) { window.open('/googleearth/ge-display.php','','scrollbars=yes,menubar=no,height=650,width=1000,resizable=yes,toolbar=yes,location=no,status=no'); event.stopPropagation(); return false; }); the element with id 'ge-display' is a standard link: <a href="/googleearth/ge-display.php" id="ge-display" target="_blank">Load Google Earth Plugin (in a new window)</a> The problem is - when I take out the 'return false;' line from the click event handler, the javascript popup opens, and then another browser window opens - I thought stopPropagation() would prevent the links own click handler? I've also tried stopImmediatePropagation() - but I still need to return false to stop the default behaviour of the link.

    Read the article

  • IntelliSense based snippet handling with Visual Studio 2010 SDK MEF Based text editor

    - by Nicolai Ustinov
    Using the new Visual Studio 2010 SDK developing against the MEF based editor structure there's a question: How can I use the MEF editor interfaces to handle snippet behavior in IntelliSense? The ICompletionSession itself is not a problem (e.g. get the available snippets) rather filling the snippet, handling the subsequently expected actions like tab, enter behavior, text replacement, etc. Is there any way to do that without a language service? Checking the built-in behavior in Visual Studio base editor implementation they built the MEF interfaces on top of a set of language service based objects.

    Read the article

  • Catch database exception in Kohana

    - by danilo
    I'm using Kohana 2. I would like to catch a database exception to prevent an error page when no connection to the server can be established. The error displayed is system/libraries/drivers/Database/Mysql.php [61]: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 110 The database server is not reachable at all at this point. I'm doing this from a model. I tried both public function __construct() { // load database library into $this->db try { parent::__construct(); } catch (Exception $e) { die('Database error occured'); } } as well as try { $hoststatus = $this->db->query('SELECT x FROM y WHERE z;'); } catch (Exception $e) { die('Database error occured'); } ...but none of them seemed to work. It seems as if no exception gets passed on from the main model. Is there another way to catch the database error and use my own error handling?

    Read the article

  • Call up last exception on an ASP.NET error page.

    - by Aren B
    I've got an error page here SiteError.aspx and it's configured correctly in the web.config to go there when unhandled exceptions are encountered. I want to use this page to log the exception that triggered it as well because I only want to LOG the errors that the users encounter (i.e. if SiteError.aspx is ever hit.) This is the code I Have: In the OnLoad(...) in SiteError.aspx Exception lastEx = Context.Server.GetLastError(); if (lastEx != null) log.Error("A site error was encountered", lastEx); However, my log is never showing up in my Output, and If i breakpoint on line 2 (in this example) code execution is never interupted (after letting the exception clear to ASP.NET handling in the debugger.

    Read the article

  • WPF exception handling when launched from WinForms

    - by Sonic Soul
    so i came across this interesting article on WPF exception handling: http://srtsolutions.com/public/item/251263 it works by declaring DispatcherUnhandledException handler in xaml <application> node. but what if a WPF window is launched from win forms application? where can i declare a general exception handler? The problem is that when WPF crashes, it brings down the whole WinForms app with it. *Edit what if instead of launching the WPF window directly, i launched an "Application" which than defined a start window?? is that possible/advisable?

    Read the article

< Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >