Skip to Content
author's profile photo Former Member
Former Member

Require help in Hybrid App Development , SMP2.3

I am pretty new guy in hybrid app development , not much acquainted with all the functions provided to us by Custom.js file that get generated during the generated hybrid functionality.

I am still trying to understand it , and require a little guidance as to how we can achieve to get auto complete feature for a text box , i.e. as soon as a user types he get the list generated below. (as done using ajax snippets). I have that a particular text field can be linked to an MBO with a particular field, but still unaware how this can be achieved?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Jan 01, 2014 at 02:27 PM

    Hi Amit,

    Sure we can do this.

    First we have to get the data and load it into array variable. Then you can implement the Javascript auto complete method into text field.

    step1:

    Use the getcurrent Message value collection method to get the data and store it in a array. For example

    var message = getCurrentMessageValueCollection();

    var itemList = message.getData("CountryList"); // CountryList - List view key name in Hybrid app

    var items = itemList.getValue();

    var noOfItems = items.length;

    var i = 0;

    var countryList= new Array();

    while (i < noOfItems) {

    var theItems = items[i];

    var fileNameObj=theItems.getData("Country_attribute_Key");

    // Country_attribute_Key - attribute within the list

    var countryList[i] = fileNameObj.getValue();

    i = i + 1;

    }

    Use this method in Custom before navigation forward method. Also you can refer this link Hybrid App Message Data Functions

    Step 2;

    Implement the auto completion method. i hope you have your own auto complete text field method or you can refer the below link for a sample.

    Autocomplete | jQuery UI

    All the best

    Regards

    Yokesvaran Kumarasamy

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 02, 2014 at 12:33 PM

    The data-filter='true' functionality available in JQuery mobile helps you to do this. This will work exactly as per your requirement.

    Here is an example,

    Developing HWC app with Customized List

    - Midhun VP

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 03, 2014 at 09:41 AM

    Is this issue resolved ?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 05, 2014 at 08:28 AM

    I am not able to work on it same , cornering other developments right and still in progress once i am able to finish it , i will update the same , whether successful or not.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.