I want to implement the an auto complete feature in an app am currently developing. I would have used the Blackberry native auto-complete field but I want the auto complete list to be gotten from a web server. This feature is being implemented in the search screen of google maps for blackberry.
Please can u give ideas on how to go about this?
I didn't try but I don't see any issue to do that.
You need to add listener for the EditField - getEditField will help you.
After getting list of suggestions, you pack them to BasicFilteredList and set it to AutoCompleteField with setFilteredList.
You should think also about implementation of case when network is not reachable.
Great example from http://devblog.blackberry.com/2010/04/how-to-use-autocompletefield/
After getting your data back from the web server, store the searchable data as String[].
Then you just need the following code to make your AutoCompleteField work:
BasicFilteredList filterList = new BasicFilteredList();
//my query to sqlite database, yours could just be parsed from your webserver or whatever
String[] list = db.getSearchSuggestions(totalCount);
filterList.addDataSet(1, list, "list", BasicFilteredList.COMPARISON_IGNORE_CASE);
final AutoCompleteField autoComplete = new AutoCompleteField(filterList);
Related
Is there a way to access a custom sublist on a custom record via suitescript? I have a record that users will enter criteria into that will then populate a bom in the sublists section via a saved search. Is there a way to access this data? When I try to run currentRecord.getSublists(), it says that it is not a function.
Any help is appreciated. Thanks!
Just in case people still run into this issue, it's a matter of dynamic vs static records.
currentRecord in a User Event is both a static record and cannot be "saved" (i.e. if you want to make changes in an afterSubmit method).
You'll want to record.load in dynamic mode to get what you are looking for.
var linect = rec.getLineItemCount('recmachcustrecord');
For a project, I had to swictch from DataTable jquery plugin to Dojo.
Dojo is great and everything works fine !
But, I miss the dataTable's simple search form (http://datatables.net/).
I know that Dojo have the Filter plugin which could make that, but it's not simple, for the users, as the dataTable input field (at less two more click for a global search on a table :/).
I search all the web but i couldn't find an exemple with it :/
If someone has a clue ?
This depends on what kind of backend data store you are using to power your grid.
It's usually just a simple matter of calling grid.setQuery({name: "FooBar" , ignoreCase: true });
But lets say you are using an [AndOrReadStore][1], rather than a simple ItemFileReadStore, then you might specify the columsToQuery and the columnValue as well.
Remmber, you always query your grid not the store. The grid will pass the query on to the store.
So, to do what you want, just create a new input on your page. Capture key presses or onchange, and then query your grid accordingly. This will filter results that don't match.
The reason why you might use query, is because if your store is powered from the server, it will make sure to requery the backend.
However, if your grid is entirely loaded in memory, then you can do client side filtering by using filter().
This is what I am trying to do, when my apps load, user is presented with a bunch of options ( These options are coming from a server) and when user selects one of those options I have to create a new tab bar controller with number of tabs, their name, their layout all coming from a server in the xml format. So the first question is it possible to do this in iphone, that is create all the view controller programmatically on the run time, if yes can you please point me to some reference, i have been searching in google, but may be my search terms are not good, I am not getting back any results.
Of course, it's possible. Anything that can be done using IB can also be done in code. In your particular case, you have to subclass the UITabBarController class and then use the viewControllers property to populate the bar at runtime, depending on your XML.
Please refer to the class reference at Apple.com for more information.
Possible duplicate of iPhone -- create UITabBar programmatically?
I'm just starting to use sharepoint designer and realised there's a lot that can be done to extend the basic features in sharepoint. We have an email alert sent out when a new task is created (by the user) and I want to customise the email so that it also includes a link called 'Assign'. When clicked, I want this link to automatically update the task with the assigned to field for the person that clicked it.
So I think the way to do this would be to hard-code the assign to value in the url behind this link, but I have no idea if this is possible or if there is an easier/better way to do this.
Any advice would be appreciated as I'm a complete beginner.
thanks.
I will not cover "How to modify the contents of an eamil alert" here as that is a seperate question and there are a lot of articles that cover that already.
For the Assigned link :-
You would need to create a custom page (or web part on an existing page) as the destination of your Assign link - this would take the Task ID as a query string param and then update the assigned to with the current user.
You could make this flexible by also taking the ListID but you may want to think about how this could be abused and put appropriate measures in place.
EDIT - in response to comment.
This is top of my head, not checked in compiler. This would have to sit on the same server as SharePoint to work as its using the OM - if you want to use a different server (why would you though) then look in the web services.
private void updateAssignedTo(Guid listId, int itemID)
{
SPWeb web = SPContent.Current.Web();
SPList list = web.Lists[listId];
SPListItem item = list.GetItemById(itemID);
item["Assigned To"] = web.CurrentUser;
item.Update();
}
You're going to have to work out how to get this code into to page or web part (SharePoint Designer is not going to cut it I think, you need Visual Studio) but its a starting point.
I am working on a new web app in lotus/domino. I am newer to lotus/domino programming, so forgive me for not knowing something simple.
What I am trying to do is display a table of information, with one of the columns containing a link. The link is formatted like [http://server/app.nsf/form?openform&ideaNum=1&var2=foo2]
How can I retrieve the information from the url, to get information from a view or a document?
So far I have tried to access the query string in the webQueryOpen event, but lotus runs the agent before the DOM writes to the browser, the query_string isn't available.
I am not sure how else to get information from one form to another in lotus.
Thanks for the help.
-Kris
If you're passing multiple params in the query_string, you can get Domino to do a bit more of the work for you. There's an Function command - UrlQueryString - that can format the params into a list, delimiting at the "&".
E.g. server/app.nsf/form?openform&ideaNum=1&var2=foo2
becomes a list:
openform
ideaNum=1
var2=foo2
To use it, on the destination form create a multi-value text field called something like "QryStringList".
Set it to be computed when composed, and set it's value to #UrlQueryString.
In your WebQueryOpen agent, you can access the params as doc.QryStringList(0), docQryStringList(1) and so on, if you're using Lotusscript.
I'm fairly sure I put this together using info from the IBM/ldd forum, but the exact source is lost in the mists of time and memory, so apologies if I've copied someone's post.
Just as a follow up, I found that you are able to specify an on form variable named the same as QUERY_STRING. The variable is actually a reserved term for Lotus, so Lotus pre-fetches the variable before running the information out the browser.
Due to the pre-fetching, you are able to access the url information during the webQueryOpen event.
I hope this helps someone else looking for the same type of functionality.
-Kris