AutoCompleteExtender seems to stop functioning after losing focus - asp.net

I love the AutoCompleteExtender and have used it before with great success. My new boss noticed something he doesn't like though, and unless I can get it figured out, he is going to have me scrap it for something else - yikes! Here's the scenario :
I click on the textbox, type in the first 3 letters - we'll say "pat" for this example - and then the list of names matching those first three initials comes up. Great so far.
Then, without selecting anything or changing the text in the box, I click away from the box (just on blank part of the page for example). Now, I click back in the textbox, type in "pat" again - expecting that the list will show up again. BUT - nothing comes up. Now, if I type one more letter, say 'patt' for example, then results are returned. But with the same character combo, nada. I have also noticed that if I move away from the page for awhile, 10-15 minutes, and come back, it stops responding as well.
Has anyone else experienced this, and if so, did you come up with a solution? If so, I would love to hear it. I REALLY don't want to force a page refresh or something, as I am sure my boss is NOT going to like that. Any suggestions are greatly appreciated.
Oh - and I tried adding a little JavaScript to forcibly clear out the textbox onlbur - no dice - still doesn't bring up any results in the above scenario.

Related

How to get notified when changes in the document actually happens?

The following question is about RichTexFX. For standard JavaFX components, I've never had this issue before.
In my application, I am adding text content to the end of a GenericStyledArea (actually a subclass of it, but that should have no impact on the behaviour I am observing). Every time new content has been added to the end of the document, I scroll to the bottom so the new content is always in view. I use the following code to scroll to bottom (actually written in Kotlin, but I have translated it to Java below):
showParagraphAtTop(document.getParagraphs().size() - 1)
This almost always works. However, in some cases the screen will not show the newly added element. I have come to the conclusion that by the time showParagraphAtTop is called, some internal state in richtextfx has not been updated. This is because I added a button that I can click on to call the code above, and if I click it after the scroll failed, it scrolls to the bottom as expected.
I have tried various ways to work around this, but the only solution that works reliably is to do the following:
FxTimer.runLater(Duration.ofMillis(10), () -> showParagraphAtTop(getDocument().getParagraphs().size() - 1));
In other words, I force a short delay before actually scrolling the screen.
Even though the above works, it's incredibly unsatisfactory, and there should be some way to do this the right way. However, I have been unable to figure it out.
I saw another question (Autoscroll JavaFX TextFlow) which suggested the use of layout() prior to scrolling. This does not remove the problem, although it does appear to make it less common.

How to signalize a customer to click at one button twice?

First I want to make clear that my problem is not a technical question. I want to talk about usability.
In my company we have a function to check if a scale works properly. We have the button you see bellow (1) to start a function named scaleCheck(). During the scale check the weight of the scale is set to 0 and then a specified weight is put on the scale automatically and when the weight matches the number set in a config file the scale is OK. So when you click on the button, it gets the white border (2) and when the check is finished the button turns normal again (3).
This is the automatic process, but not every customer has a scale which can put automatically a weight on it. So in this case the customer has to go to the scale an put a weight on it by his own. In our application the customer can configure, if he wants the process to be manual or automatic and the button will adjust to this. So when the configuration is set on manual we have to interrupt our function an wait for the customer until he is ready. Because we don't know how many time he will need, he has to click on the button again to tell the application that the process can continue. Therefore we changed the button a bit when we are in manual mode. As you can see below the button (1) changes the image, when the customer clicks the first time on it (2), to show that the weight has to be put on the scale. When he clicks the second time the process proceeds (3).
So this is the current state. The automatic mode works how the customers imagine it to be, but in the manual mode many people have problems with it and need a lot of time the recognize that they have to click on the same button again they clicked before.
And here is my question, is there a better way to show the customers that this button should be clicked again. Are there some people who have experiences with a similar kind of functionality? Or is there a better way to do it? I'm open for every idea which comes in.
We ended up with the opinion that it is not a intuitive solution to click twice on the button. We solved it by showing the user a message after the first click on the button, and accepting that message is count as the second click. With usability in mind this i by far a better solution and the customers can handle this situation much better.

find key presses from layout controls (not entry field) in xamarin.forms

I need to find what key the user pressed on a keyboard using xamarin.forms, ideally inside an AbsoluteLayout. I've come up with a few ways myself, but can't get any of them working.
As there isn't an event for this on the AbsoluteLayout control, i tried a little cheat, which was putting an entry field (textbox) on the screen, but hiding it above, so it can't be seen and using the result from that, but it loses focus when someone presses the screen or a button on the screen. so i tried adding an event to each button which refocuses the textbox once i've handled the press and this seemed ok at first, however, if they press anywhere else on the screen, it also loses focus.
I also tried adding a TapGestureRecognizer to the screen, and focusing the button when they press anywhere on the screen, however, there were 2 issues with this, the first being that it appears to only fire when something inside it is touched, and secondly, when i call the focus method for the second time (if they click the screen twice) it un-focuses the entry field, even if i check "isfocused" first (think this is a bug).
I'm only concerned about windows 8 and android apps so far. iOS may come later, but for now im just trying to get it working for these OS's. so maybe i could code it in the windows and android projects (inside my shared project solution), however, i have absolutely no idea where to even begin doing that. I mean, if this is the best way, how can i pass my AbsoluteLayout to the windows project and get it to know what it is, and convert it into a control which i can then add the event to.
Any help or advice, or ideas would be much appreciated. I cant find anything in NuGet which will help me with this. Any ideas?
Many thanks
James

How do I do to show only days with an event in FullCalendar?

I have a fullCalendar plugin connected to Google Calendar and it shows all days, including days that don't have an event. I need it to show just days with an event. Is it possible?
I can't give a full answer since I am still chewing on this myself, but you might has well know what I've done. I work in a custom basic Day view called vertWeek, which looks like an agenda view. In dayRender, I have tried looping (.each) over fc-row and using freight trains of .has and .hasClass to try to hunt down those rows that have a td cell with .fc-container-event. The existence of this should be enough but no matter what I try I can't isolate a specific day-row. All rows get a green border or in the negative they get a red border.
I know my each works coz if I use .html on the index each row prints out its index number neatly. I don't have code handy, am away and tired, but go look for a post about squishing box calendar rows without events in them to get a gist of my efforts.
Hope this helps.

ASP.NET DropDown List position is lost when user typing pauses

One of my end-users just reported an odd problem in an ASP.NET 2.0 application, which I've confirmed, but which seems rather odd to me. I have a DropDownList control on my web form, which displays several dozen different items. The easiest method for them to navigate the list is by typing the first several letters of the item they want to select. No problem, and we're all familiar with this approach.
The issue arises when they pause typing, wait a second or so (to consult a document for a serial number, for example), and then resume typing the next letters of their target selection. As soon as they resume typing, the position they had in the list is ignored, and the cursor moves to the value which begins with the new sequence of characters they have keyed in. For example, if they are trying to select a value of "PREAMBLE", and they type the letters PRE, the first item containing "PRE" is highlighted. However, if they pause for a moment, then continue with "AMBL", the list jumps back to the beginning, and the first list item containing "AMBL" is highlighted. Since the users are typing serial numbers in one of the dropdowns, this habit of pausing for a moment is completely natural, but it also causes them some frustration, as they have to type in a longer string of characters without stopping.
I've tested this on Chrome and Internet Explorer and Firefox, so I conclude it isn't browser specific. Is there a time paramater I can adjust on the dropdown list, to allow for a longer pause? Is there a way to disable the behavior I've described here? I can duplicate the behavior on a list with as few as seven items. On a list of seven items, it isn't a problem, but on a list with a hundred items, it gets to be a hassle.
Any insight in to this would be most appreciate, as would any suggestions on how to avoid it from happening, especially if I can disable it on a control by control basis. Thanks in advance!
what you are witnessing is the normal behavior of any dropdown..
till you keep typing it works as an auto complete.. but as soon as you stop it starts to search again in the list of item it comtains
if you wanna just keep the current state of the also.. then look for solutions like Jquery AutoComplete present here and it will keep the state and will give due importance to all the characters typed the problem that you might face with it is that it is applied on a textbox but then it would be easier for users to type all the way and look for hints simultaneously

Resources