×

Discussion Board

Results 1 to 6 of 6

Hybrid View

  1. #1
    Registered User
    Join Date
    Mar 2013
    Location
    Nasik, India
    Posts
    21

    LWUIT list lazy loading.

    Hello Developers.

    I am developing j2me app in which am loading lwuit list with common default image.
    Once list is displayed with default image. i need to download the element specific image from the server.
    And as images get download one by one i need my list to be refresh with new image.

    i have tried following functions.

    1) List.setSelectedItem(obj) // object having container with new image.
    2) GenericListCellRenderer.getListCellRendererComponent(list1, (Object)createTempContainert(), 0, true);

    Both of the above didn't worked.

    Can anyone knows how to update particular element from the list.

    All i need to replace the common image with the newly downloaded imaged from server.

    Please share your ideas with code snippet if possible.

    Thanks.
    Vishal

  2. #2
    Registered User
    Join Date
    Mar 2013
    Location
    Nasik, India
    Posts
    21

    Re: LWUIT list lazy loading.

    Hello Experts/Developers,

    This issues is still not resolved.
    Please check it once and help me if you know anything regarding this.
    Also let me know if anything is not clear in question posted. I wonder why not a single reply yet.

    Thanks
    Vishal.
    Last edited by vishal.bharati; 2013-06-12 at 08:23.

  3. #3
    Registered User
    Join Date
    Mar 2005
    Location
    Hamburg, Germany
    Posts
    280

    Re: LWUIT list lazy loading.

    Hello Vishal,

    well, it is possible, but not so easy.

    In LWUIT we distinguish between the List (which is the visual container) and the ListModel,
    which is data without anything user-interface related.
    For easy problems you can just use the DefaultListModel.
    But you probably want to create your own ListModel,
    and let it maintain the state of the downloaded pictures.

    The ListModel should not know anything about its view in good object oriented design.
    That is why changes in the model are communicated with events and Listeners.
    The ListModel signals changes in itself (like when an image has finished reloading) with
    fireDataChangedEvent(DataChangedListener.CHANGED, index);
    So your own implementation should do this when your image download has finished.

    The good news is that everything is open source, so you can look into the source of DefaultListModel.java.


    Hope this helps to get you on the right track.

    Regards

    Karsten Meier

  4. #4
    Registered User
    Join Date
    Mar 2013
    Location
    Nasik, India
    Posts
    21

    Re: LWUIT list lazy loading.

    Hello Karsten,

    Thanks for you reply. Sorry am replying you very late.
    Have just checked the solution provided by you and now working on the same.
    We have already created the list models but now have to implement DefaultListModel.java part.
    Thanks solution looks fine for me. will let you know in case of any difficulty.

    Thanks.
    Vishal.
    Nasik, India.

  5. #5
    Registered User
    Join Date
    Mar 2014
    Posts
    3

    Re: LWUIT list lazy loading.

    Quote Originally Posted by vishal.bharati View Post
    Hello Karsten,

    Thanks for you reply. Sorry am replying you very late.
    Have just checked the solution provided by you and now working on the same.
    We have already created the list models but now have to implement DefaultListModel.java part.
    Thanks solution looks fine for me. will let you know in case of any difficulty.

    Thanks.
    Vishal.
    Nasik, India.
    Hii Vishal ,
    I am also newer in j2me development, i am facing same problem right now with the same requirement, if you got the solution would you please share with us. I will be always pleasure of you. Because i didn't get any reference on the internet.
    Thanx and regards:
    Wahid

  6. #6
    Registered User
    Join Date
    Dec 2012
    Location
    India
    Posts
    264

    Re: LWUIT list lazy loading.

    Hi

    There is a class called ImageDownloadService in LWUIT IO package which can help you out I believe.

Similar Threads

  1. How to append LWUIT List screen to a LWUIT Form in j2me?
    By pavanragi in forum Mobile Java General
    Replies: 1
    Last Post: 2012-08-06, 07:01
  2. LWUIT - Application almost unresponsive while loading on E7-00
    By jeconomX in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2011-12-01, 12:55
  3. Lwuit circle loading bar
    By mjagadeeshbabu in forum Mobile Java General
    Replies: 0
    Last Post: 2011-05-06, 13:17
  4. loading midlet from lwuit
    By simsimlhr in forum Mobile Java General
    Replies: 1
    Last Post: 2008-11-03, 19:56

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •