Alpha DevCon 2018
Results 1 to 9 of 9

Thread: Problems Adapting Demo App

  1. #1
    Member
    Real Name
    Bob Beadell
    Join Date
    Jan 2012
    Location
    Victoria, BC, Canada
    Posts
    104

    Default Problems Adapting Demo App

    I have tried to adapt the demo app by creating new lists, changing the fields, amending the editors and ensuring they are all repopulated in the formviews. I have left everything else "as is". When I try to preview the app I get a blank screen. I have compared the original and the amended apps side by side but can't see where I have gone wrong. Any suggestions?

  2. #2
    Member
    Real Name
    Bob Beadell
    Join Date
    Jan 2012
    Location
    Victoria, BC, Canada
    Posts
    104

    Default Re: Problems Adapting Demo App

    I have resolved this issue. I had included extra fields in the list layout. These fields belong in the form view (where I had also included them). I'm now struggling to ensure the editors are shown on the details panel.

    Update: I have managed to do this and create a reasonable facsimile that works using the existing code. It can be frustrating at times but I think the learning curve will flatten out considerably after a few attempts and most people will be able to do this quite easily. My next effort will be to try and bind the forms to a database.
    Last edited by invictamarine; 08-07-2015 at 04:37 PM.

  3. #3
    Alpha Software Employee Beta Spark's Avatar
    Real Name
    Sarah Mitchell
    Join Date
    Jul 2015
    Posts
    391

    Default Re: Problems Adapting Demo App

    Hi Bob,

    It sounds like you're jumping right in! Would you be willing to share your results with the rest of us on the Beta Forum? We'd love to see what you've built!
    Sarah Mitchell

    Looking for answers? Try our documentation.
    If you can't find something, let us know!

  4. #4
    Member
    Real Name
    Bob Beadell
    Join Date
    Jan 2012
    Location
    Victoria, BC, Canada
    Posts
    104

    Default Re: Problems Adapting Demo App

    In truth I've only massaged what was in the demo and changed the fields but I don't mind sharing it. It's based on part of an app that I have already created for a client which is used for initiating work orders, status tracking, compliance monitoring, and trend analysis purposes.
    Attached Files Attached Files

  5. #5
    Member
    Real Name
    Ken Carroll
    Join Date
    Nov 2012
    Location
    San Jose CA
    Posts
    27

    Default Re: Problems Adapting Demo App

    I will be interested in how to bind the forms to a database! I can see how to make changes, but not how to save them. When using a List, I could have a detail view, but am not getting how to handle this using the form view with its shared editors.

  6. #6
    Alpha Software Employee Beta Spark's Avatar
    Real Name
    Sarah Mitchell
    Join Date
    Jul 2015
    Posts
    391

    Default Re: Problems Adapting Demo App

    Quote Originally Posted by kctermite View Post
    I will be interested in how to bind the forms to a database! I can see how to make changes, but not how to save them. When using a List, I could have a detail view, but am not getting how to handle this using the form view with its shared editors.
    Let's see if I can help here...

    The FormView is a replacement for your "Detail View". You can define the layout of controls within the FormView. You also define the editors to use for editing fields within the FormView.

    The FormView operates on a local data source. Local data sources would be a List Control, Static Data, JSON, or a JavaScript Object. The List Control is an ideal local data source since it can pull data from a database, includes offline support and data synchronization functions. In the FormView, you edit the data. Then you save the data back to the list control (a lot like clicking the "Save" button for a Detail View that requires the user to manually synchronize the data back to the server.) THEN, you synchronize the data from the list control to the server.

    Editors are a shared resource across multiple fields of data. You can create one Editor for editing any number of fields. Because they're reused, Editors also include a save step. The Editor saves the value back to the field in the FormView.

    The video that Selwyn put together demonstrates how this works in a very simple case: http://www.alphasoftware.com/alphafo...rmView-Control

    Does this help?
    Sarah Mitchell

    Looking for answers? Try our documentation.
    If you can't find something, let us know!

  7. #7
    Member
    Real Name
    Ken Carroll
    Join Date
    Nov 2012
    Location
    San Jose CA
    Posts
    27

    Default Re: Problems Adapting Demo App

    This is great to know that the FormView is a replacement for the Detail View. I was getting the hang of that view and its synchronizing policy setting. Also I could easily see how great it is to share editors as I am certainly playing around with. I also had no problem seeing the information change in my list after I saved it in the FormView and THEN in the SAVE TO SOURCE (list control). I didn't see how to "sync" the "saves" in my list control with the back-end database from whence I got my data for the list control on the UX. I have still not been able to demonstrate an actual change to my database table in the sky, but I probably simply need to install the Beta Application Server at ZebraHost from whence I get my data into the famous list control, right? Changes persist on my local device just fine...but when I open the MySQL table "practice" (I use Toad on my Remote Desktop at ZebraHost), I do not see the change there. Duh! I was so hung up on seeing the "sync" button on the sample app not being implemented (yet), that I probably was expecting my non-beta app server to handle stuff that the Beta Application Server is downloadable for. Not knowing the correct way to install that Application Server at ZebraHost that finally has AlwaysUp installed and handling making sure my non-beta Application Server is "always up" just fine...I was kind of waiting for an answer to the detailed instructions as to what and where to install the updates for the Tablet Optimized Beta testing. With the static data in the example, the saving/synchronizing to the MySQL database table(s) was not yet demonstrated...seeing somewhere that these updates should be downloaded often during the testing...how do I know when there has been any modifications so I know when to re-patch, etc.? Thanks!

  8. #8
    Alpha Software Employee Beta Spark's Avatar
    Real Name
    Sarah Mitchell
    Join Date
    Jul 2015
    Posts
    391

    Default Re: Problems Adapting Demo App

    Quote Originally Posted by kctermite View Post
    I didn't see how to "sync" the "saves" in my list control with the back-end database from whence I got my data for the list control on the UX.
    You can use the List Control and Action Javascript to accomplish this. First, check the "Has Detail View" property in your list control. Don't create any buttons or controls. Just check the box.

    Next, add a button to your UX Component. In the click event, add a new "List Control Actions" Action Javascript and configure the action to submit list edits to server. The submit list edits to server is a detail view action. It becomes available when you select "List Detail View Actions" for the Action name property. Save your Action Javascript and test.

    saveToServer_list.PNG

    Post back if you run into any issues!
    Sarah Mitchell

    Looking for answers? Try our documentation.
    If you can't find something, let us know!

  9. #9
    Alpha Software Employee Beta Spark's Avatar
    Real Name
    Sarah Mitchell
    Join Date
    Jul 2015
    Posts
    391

    Default Re: Problems Adapting Demo App

    Quote Originally Posted by kctermite View Post
    how do I know when there has been any modifications so I know when to re-patch, etc.? Thanks!
    The Beta is updated nightly, so every day there will be a new installer to download and run! Patch at your convenience.
    Sarah Mitchell

    Looking for answers? Try our documentation.
    If you can't find something, let us know!

Similar Threads

  1. Phonegap Demo App?
    By pcaspa in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 05-04-2014, 10:27 AM
  2. Trial User - Adapting Photo App Tutorial
    By mprough in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 08-23-2013, 10:30 PM
  3. Web App server Demo
    By crimmelcp in forum Application Server Version 10 - Web/Browser Applications
    Replies: 3
    Last Post: 11-27-2010, 03:31 PM
  4. trying to understand the Web DEMO App
    By crimmelcp in forum Application Server Version 9 - Web/Browser Applications
    Replies: 2
    Last Post: 08-22-2008, 05:11 PM
  5. Demo -> Yahoo Maps from WAS app
    By Steve Wood in forum Web Application Server v6
    Replies: 4
    Last Post: 04-15-2005, 02:14 PM

Bookmarks

Posting Permissions

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