How to keep autocomplete event active on Xpages - xpages

I've an xpages in which i set some fields to filter documents, with an autocomplete in one of these.
At the end, a button make a pdf based on this query fields (onClick action), and the pdf is presented to be saved or open.
Ad this point, autocomplete doesn't work anymore, i need to reload the xpage to make autocomplete active again, but i loose all other field values set in previous search.
Is it possible to keep autocomplete alive?

My guess is that you serve up an PDF directly from the page and no in a separate window. This will make the XPage to stall and will wait for a timeout of some kind.
I usually on the pdf generation button add this on a js timeout.
XSP.allowSubmit()
That usually works in the cases I have encountered.

Problem solved!
Just set the type ahead mode to Partial instead of Full
Thanks everyone

Related

View need restarting the tkinter app

I have made tkinter app along with sqlite3 with many frames in it. I have made several tables. I can add items to the table without any flaws. However, I need to close and reopen the app to view the added changes in the database. Is there any solution for that?
Yes, the solution is to write your code in such a way that you can reload the data. There's no special trick to doing that, but it doesn't happen for free. All widgets have a method for modifying their data. You simply need to detect when a change occurs (or give the user a "refresh" button), and then reload the data.

Can not edit code in xpages or custom control

I have a problem with Domino Designer since the problem occurs not only in existing xpage and databases, it also happens in newly created databasen and xpages as well as custom controls.
The problem is that when I try to open an xpage or custom control, I will not se any code, or anything but an emppty blank page under the toolbars.
First I thought it could be my screen, then I thought it could be an configuration problem so I reconfigured the notes client and tried again, then I check if I could open the custom controls with the xml editor instead of the xsp editor, and that worked, but I want the xsp editor back.
What is this, a blank page, it seems that it could not render properly, because if I use my keyboard and pressing the space bar, then it ask me if I want to save the changes when closing the custom control by the esc.
Do I have to re-install the client? Or does it exist any configurations for the xsp editor I miss?
BTW, It happens the other day, and when I re-configured my installation it worked, but this time it does not.
Are you looking at the design pane and not the source pane? At the bottom of the blank page, above the properties area there are two tabs, click on the "source" tab.
If that's not the issue, I'm not sure what's going wrong
I did not have time to investigate any further, it must have been the render function of the XSP Editor that was corrupt, stopped working and I re-installed the Notes and Designer and then I could continue working. No problems in my code. :-)

Saving history of usage to offer suggestions

I have a small extension that perform local search.
It searches for the files matching that name in the local company files list and then opens a page with the results.
The extension has a text box where users type in the query.
The problem is that if I click the extension again and want to do a query that I already did previously, I need to type it out again.
I want the textbox to save history, and show suggestions when I start typing a new query.
How can I do this? The suggestion matching can be a very simple string matching, nothing fancy. But how/where canI save the history?
If you are asking about standard browser's autocomplete then I don't think there is a way to programmatically create it.
You can build your own with jQuery's autocomplete plugin, for example. You will just feed it previous queries and it will do the rest.
To store previous queries you can use localStorage, which you would need to access from a background page.

Custom navigation with Liknlist web part

I'm using a standard link list web part. What I want to achieve is before my users click on the link a pop-up javascript warning box will display, stating that they are leaving the domain. In regular anchor tag I would preceed the URL with javascript:ShowWarning('http://www.youtube.com');.
I've search the AllLinks table in the database but did not find the links was looking for.
Where or how are these stored?
Thanks,
Risho
Firstly, editing the SharePoint database directly is a really bad idea. You shouldn't do it unless you really, really know what you are doing, and even then you will probably break the system.
Secondly, any change made in the data will be what shows up in the editor, and I don't think the editor supports links that don't start with "http://".
A better approach is to use jquery to add the popup behaviour to the links when the page is loaded.

showing content on the blank screen after downloading a file

I've observed that under certain circumstances, a web browser will navigate to a blank page and then prompt the user to download a file. In my current situation, it's navigating to a URL that generates an Excel file. The download of the file works perfectly, but the user is now stranded on a blank page. There are two things I would like to figure out:
What causes the blank page to be displayed? It doesn't happen all the time. Is it the difference between using GET and POST (I can't recall seeing a hyperlink do it, but forms usually do)? Is it something to do with the Content-Disposition? In my current case, I've set the Content-Disposition to be "inline" because I want it to display in the browser in IE. Firefox (and presumably others) will of course prompt to download because they can't display it inline. It is the situation where the user chooses to save it that the blank screen results.
If it is possible, I'd like to display some content on this blank screen to provide the user with a message like "your file has been generated, click here to go back to the main screen" or somesuch. Is there a way I can do that?
I'm using an IIS extension written in C++, so solutions for ASP, PHP, etc will not be helpful unless they're generally applicable (though I wouldn't mind learning about solutions in those languages!). Thanks.
I think you practically answered your own question: setting content-disposition to inline does exactly that. One solution that comes to mind is browser detection: use inline disposition if the browser is IE, attachment otherwise.
BTW, as a user, I prefer sites which offer me a choice whether I want to download the file or view it inside the browser (when, for example, accessing a PDF file). In this case, I would consider having a link/button for downloading the file, and adding a second link/button for IE browsers to view it.

Resources