facebook

Scrolling not working with Custom list

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 15 posts - 1 through 15 (of 39 total)
  • Author
    Posts
  • #334551 Reply

    tteasdale
    Member

    I saw a similar issue, “Scrolling not working”, but no resolution…so. I am having the same problem as my list which is longer than the screen size does not allow me to scroll down to the end without the list “bouncing” back.

    Here is my code to increase the Content Area Height:

    var panelHt = 30 + itemCnt * 44;
    // $(‘#m1-projectname-panel5-scroller’).height(panelHt);
    // $(‘#m1-projectname-panel5-scroller’).attr(‘data-layout-content-height’, panelHt);
    phoneui.preprocessDOM(‘#m1-projectname’);

    I included both commented out lines of code to show that I tried them both and got the same result.

    #334560

    @tteasdale,

    It is hard to know what is the problem without see all code, could you check the JavaScript console to see if there is any error there? If yes it is probably that it messed up all code. See Debugger section to know how to show Javascript console: https://www.genuitec.com/mobile/docs/testingAndDebugging/testingAndDebugging.html#debugger

    #334563

    tteasdale
    Member

    I did use the debugger and did not get any errors. The building of the list is working correctly and listing all items in my DB. I can scroll down to the end but as soon as I release my finger, the list bounces back to the top.

    Is there any particular section of code you need to see? All of it??

    #334565

    Hi tteasdale,

    Are you using this same design?
    http://www.genuitec.com/support-genuitec/viewtopic.php?p=11723#p11723

    Please share your project to investigate what is the issue. You can either attach it to thread or send to support at genuitec dot com, use title: mobione data from tteasdale customlist issue

    #334566

    tteasdale
    Member

    Yes, that design exactly.

    #334569

    tteasdale
    Member

    I just email you the project.

    Thank you.

    #334588

    donij
    Member

    Hi,

    I have the same challenge with panel scrolling.
    I have a simple code to set the panel height as described in one of the examples.

    This is what happens;

    When I put this code $(‘#m1-sMain-panel5-scroller’).attr(‘data-layout-content-height’, 2000 ); inside the phoneui.documentReadyHandler function it works.

    But when I put this same code as below inside another function it doesn’t work. I call this function from a button click event.

    function myScroll(){
    $(‘#m1-sMain-panel5-scroller’).attr(‘data-layout-content-height’, 2000 );
    }

    The button click actually calls the function but the new panel height does not take effect. My version is 2.3. I equally did phoneui.preprocessDOM(“#m1-sMain”); but did not work either. Any help please.

    Thanks

    #334621

    Unknown Author
    Participant

    I use a lot of custom lists in several of my apps and have never encountered your issue. So, the problem is definitely in your code somewhere. I would suggest making sure that your code is very similar to the Custom List example in the How-To section of the forum.

    -1TC

    #334624

    tteasdale
    Member

    I have and it is…nearly verbatim. Thank you, however, for your input. 🙂

    #334626

    tteasdale
    Member

    …I will add that I do not doubt that there is an error of some type in my code, but not being the Mobione/JavaScript/HTML expert I’d like to be, any assistance directly pointing out my error is greatly appreciated.

    #334641

    donij
    Member

    Please any solution to this problem. Is it an environment thing? Am using win 7 Os and enough memory. What else is the problem if it works in document ready handler function and does not work in other function as stated earlier. Please help and stuck!!

    Thanks

    #334648

    Unknown Author
    Participant

    The documentreeadyhandler is meant for when the app itself first starts.

    I use mine in the pretranstion function. It’s a call in there to a buildlist(); funtion that I’ve defined elsewhere in the file; just-in-time list building. Make sure you’re preprocessing the DOM again after all this.

    -1TC

    #334655

    donij
    Member

    @1thinchip

    Thanks for your response. I will appreciate if you could open up a new project add a list with some list items, add a button with onClick event that calls a function just to increase the height of the list…. that could help me know if my environment is the issue.

    Thanks.

    #334695

    Unknown Author
    Participant

    A few things: The “dummy” list you start with is the first thing deleted in the code, then rebuilt. Also, you’re dynamically changing panel height, not list height.

    I’m sorry, I just do not have time to put together a sample. All the code you need is in the How-To section here.

    -1TC

    #334760

    donij
    Member

    @1thinchip

    ok, just a little correction.. while the example demonstrates building a list, it equally shows how attributes of some other components can be modified or manipulated…..like a panel height. The panel height is independent of the list height…. the panel can contain some other components other than a list and the height can be varied independently…… that will help you understand how things work….while I hope that is clear, am looking at the installation/environment as I have uninstalled and re-installed mobione. I observed an error the very first time I run mobione after re-installation. Unfortunately it is taking a long time to get response via support mail but I will still send the error files I have gathered.

    For the record I downloaded the example, stripped it off all codes and left only panel height change in the buildlist function and it works. I called the function from the green button (changed Onclick event to call buildlist) click event and it also worked. But amazingly I open a new screen and copy the same code to the custom script and it doesn’t work (panel height doesn’t change). The example was built with version 2.2 and I have 2.3. Just like I said am looking at version problem or some other environment issues. I have tried both jre1.6 and jre1.7. I hope mobi support helps out.

    Thanks anyway as I continue to seek a solution.

Viewing 15 posts - 1 through 15 (of 39 total)
Reply To: Scrolling not working with Custom list

You must be logged in to post in the forum log in