Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9225895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:41:36+00:00 2026-06-18T04:41:36+00:00

JQM listview get populated as with the data with no issue as expected, but

  • 0

JQM listview get populated as with the data with no issue as expected, but i cant get it rendered with JQM styles. could any one can help me with this issue.

I have tried with listview(), listview(“refresh”), trigger(“create”) none of them did work

var ProfessionsModel = function() {
    var self = this;
    self.professionDetails = ko.observableArray([]);
    self.getProfessionDetails=function(){
        var rest = new RestService('${pageContext.request.contextPath}/rest/profession/designations');
        rest.findAll(function(data) {
            $.each(data, function(index, value){
                self.professionDetails.push(value);
            });
        });
    };

    self.removeProfessionDetails= function(){
        self.professionDetails.removeAll();
    };

};

var pm = new ProfessionsModel();

$('#profession').live('pagecreate', function(event) {
    ko.applyBindings(pm, this);
});

$('#profession').live('pagebeforeshow', function(event) {
    pm.removeProfessionDetails();
});

$('#profession').live('pageshow', function(event) {
    pm.getProfessionDetails();
    $('#profession').find("ul").listview();
    $('#profession').find("ul").listview("refresh");
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T04:41:37+00:00Added an answer on June 18, 2026 at 4:41 am

    You are doing it in a wrong moment. You want believe how jQM is picky about a right moment.

    var ProfessionsModel = function() {
        var self = this;
        self.professionDetails = ko.observableArray([]);
        self.getProfessionDetails=function(){
            var rest = new RestService('${pageContext.request.contextPath}/rest/profession/designations');
            rest.findAll(function(data) {
                $.each(data, function(index, value){
                    self.professionDetails.push(value);
                });
                $('#profession').find("ul").listview();
                $('#profession').find("ul").listview("refresh");                
            });
        };
    
        self.removeProfessionDetails= function(){
            self.professionDetails.removeAll();
        };
    
    };
    

    jQM trigger refresh will brake if not executed after content has been appended, hence refresh after $.each part.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using jquery/jqm I need to add an option to 2 selectboxes. I can get
I'm having a strange issue with navbar & listview items, sometimes the markup jqm
I am trying to add a vclick to a dynamic JQM listview. But I
I have a JQM page with two data-role=listview . They both share the same
I am struggling to get JQM to reinitialize a jquery page with a listview
I have a page with a JQM listview as the main content. Then another
In my Phonegap android application dynamically adding list items to jqm listview where on
I'm trying to use jQM-DateBox with data-option timebox in Force Clock Mode, to have
Adding dynamic option to JQM listview was successful in page1 . After adding it,
I have a div with data-role=listview and data-filter=true, which filters my list of collapsible

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.