I am having a form. I want to show user suggestions about the name of the security he can enter. For the same I want to use the values of securities that I have installed in my Oracle Database.
I want to do something like this, if user enters a, he should get all security names below the text field which starts from a, when user selects anyone of them, then the text field must show the selected values.
Thanks in Advance.
You need autocomplete enabled text field. There's a tutorial how to build one. Even better, use jQuery java script library for this and many other features.
I'd suggest a trie. They are great for things like predicive text and auto complete.
Get all the valid security names and put them into the trie, then query the trie with whatever prefix the use has entered and it will give you all the matching names.
Note that Java doesn't come with a Trie implementation itself buy it would be pretty easy to write your own or borrow one, for eg from here; http://forums.sun.com/thread.jspa?threadID=5295936
Edit: You didn't say if this was going to be on the web or desktop (eg Swing)....
Related
I am working on a fairly large project. I need to find all LOV's in a single application and modify them. The application has about 4 projects. There might be about 300 LOV's. Is there an easy way to search for these? Could I regex this? Is there a way to get a data model diagram of all LOV's.
Any response is appreciated. Thanks in advance.
A LOV is defined by one or more tags depending on the kind of LOV (select one choice, combobox, input select one choice,...).
You can use any tool that can look for text inside files to search for specific tags.
As you did not tell us the framework you use I give you a sample for the tag ADF selectOneChoice uses:
af:selectOneChoice
So you can search the projects folders for all files containing this text. As you tagged the question with JDeveloper, you can use JDevs Find->'Find in Files...' menu option. In the dialog you get, you enter the right data where to look (scope) and what to look for(Search Text). There are more options you can use to get faster and better results. Click on the '?' button to get more help on how to use this feature.
I am new at wicket. I have a problem needs a solution. I have a data table and it contains "subject codes" like 10,10.1,10.1.2,10.10.1.3,... and also these subject codes have corresponding "subject names". What I need to do is: In my application user enters a subject code as input text area and application returns max 20 correponding subject codes as a list. User chooses one of the codes and application shows this code and it's related name at a hierarchical tree. For instance user chooses 10.1.2, tree shows this selected code as a tree. I was able to list max 20 codes and user choses one of the codes but I could not create the tree. Did anyone do something like that by using wicket?
You can use the implementation of the Wicket TreeTable:
http://www.wicket-library.com/wicket-examples/ajax/tree/simple
Start of with this example and you will get data on your screen. You can modify it so it suits your needs.
Is there a way of using Android's auto correct / predictive text capabilities with a bespoke input method? I'd like to be able to access a list of the nearest words to the word entered, similar to what happens when we send a text. For example if I entered the string "hapy" I would get a list containing "happy", harpy", "hazy" ...
Looks like a yes.
And the place to start: http://developer.android.com/guide/topics/text/spell-checker-framework.html
You wouldn't want to. First off, predictive text was only turned into a service with 4.0. Before then it was just part of the keyboard, and most keyboards still implement their own I suspect. Secondly, it would be optimized for typing mistakes, not voice mistakes. Typing g instead of f is common (they're next to each other), doing it by voice is not. It wouldn't work well.
But the built in voice to text behavior does return alternatives- it returns an array list of possible texts. That is your auto-correct.
I want to list options in drop down menu in HTML form but i need to make some options to be multiline .and the options i need to read them from text file.any ideas how to do that?
In order to have your HTML display values from a text file, you're going to need to use some kind of server-side generation (ASP.NET, JSP, CGI, whatever). The exact solution will depend on what server-side technology you use/choose, but in all cases it should be fairly straightforward as this is a common requirement for all of these technologies.
As for your first part, what exactly do you mean by "some options to be multiline"? Do you mean that some values are quite long and have spaces, so you want them to wrap? Do you want to have some kind of drop-down box that shows multiple values at once? Do you want them not to be a dropdown at all? How will you decide between the values that should be multiline and those that should not? If you can express your intention more clearly (which may involve some additional thinking on your end), it will be possible to help, and you may even end up working out the solution yourself.
I am developing a Java project in which I will take the text from a user in a textArea and generate an HTML page with that text.
I want to allow the user to add links in the generated HTML Page. As I am taking the page contents from the user, I also need to take the link name and the URL from the user.
How can I provide this functionality?
This is a bit vague ...
You don't say if you also somehow know where in the text the links need to be generated. If you don't, your problem is not solvable.
If you do, then I guess you just need to add some logic that tests if the current location in the output stream somehow corresponds to one of the locations where there should be a link, and generate the link.
The syntax for a HTML link can be found wherever, and I would assume you know it already, but just to be complete it looks like this:
link to example.com
Replace the part inside the quotes with the reference, and the text between > and < with the link name.
You'll need a database to store the links. Unless you want to show them only once.
String links = request.getParameter("textArea_name");
// then save it on your prefered database
To show it you can then load it from the database and just output them.