1. #1
    Sencha User
    Join Date
    Sep 2010
    Posts
    28
    Vote Rating
    0
    dac0nvu is on a distinguished road

      0  

    Default Creating mobile web app from traditional Struts web app

    Creating mobile web app from traditional Struts web app


    We're investigating how we can create mobile web apps by reusing existing web apps created using Struts. The existing web app sets several session/request attributes with data in the response before returning to the jsps. Is there a way to access this data using the Sencha APIs? I've been looking over the several different Proxys in the API (MemoryProxy, SessionStorageProxy) and I'm not sure if this is even the route I should take.

    As an example, my Struts Action class sets a request attribute called 'sources' which is an array of LabelValueBeans. It then forwards to the jsp. In my jsp, I just access the attribute by name ('sources') and print out their label and values. But I'm getting very confused looking at the Sencha examples. I'm not sure if I need to be using a Store and which kind of Proxy (if any).

    Any help or direction is appreciated.

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,653
    Vote Rating
    583
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    The model is the same, you make requests to the server using Ajax and it returns JSON data in a particular format that can be read by a store.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha User
    Join Date
    Sep 2010
    Posts
    28
    Vote Rating
    0
    dac0nvu is on a distinguished road

      0  

    Default


    Thanks for the reply Evan. Just to be clear, I'm not really modeling anything, as in a User object or anything. My web app screen has several drop down lists that contain several options. (It's a search screen) They are being populated by several arrays passed from the Action class to the jsp via request attributes.

    In my mobile app, I was going to do the same thing, except with Ext.form.Select objects. So I was assuming that the Selects would be populated by the same arrays from the request. In other words, the request has already been made (via the existing login screen and Struts framework, not AJAX) and the data is already in the session. I'm just not sure how to access those arrays in the session. Is there a particular Sencha example that does this sort of thing?

  4. #4
    Sencha User
    Join Date
    Sep 2010
    Posts
    28
    Vote Rating
    0
    dac0nvu is on a distinguished road

      0  

    Default


    Can anyone comment about this? Is this even possible? In a nutshell, I'm trying to reuse my existing web app and just rewrite new GUIs with "touch". Can session information stored by my servlet be retrieved by the Sencha touch APIs? I don't see any examples of this. The current web app doesn't make AJAX calls, it just makes traditional Struts Action class calls.

Similar Threads

  1. Mobile Web App Developer Contest at Mobile Developer Summit 2010
    By swagat321 in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 17 Sep 2010, 8:35 PM
  2. Create New web app
    By bitse in forum Ext GWT: Discussion
    Replies: 0
    Last Post: 13 May 2009, 6:33 AM
  3. Ext application structure vs traditional web app
    By daemach in forum Ext 2.x: Help & Discussion
    Replies: 12
    Last Post: 12 Jan 2008, 5:45 AM
  4. To all of you web 2.0 app developers.
    By jay@moduscreate.com in forum Community Discussion
    Replies: 5
    Last Post: 9 Jun 2007, 2:34 PM
  5. Web app developers, think security !!
    By jay@moduscreate.com in forum Community Discussion
    Replies: 8
    Last Post: 3 May 2007, 9:16 PM

Thread Participants: 1

Tags for this Thread