1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    1
    Vote Rating
    0
    danisfe is on a distinguished road

      0  

    Default How to save object structure into database to retrieve in future?

    How to save object structure into database to retrieve in future?


    Hi,

    I'm new to ExtJS and learning from the book ExtJS in Action 2nd Ed. I'm trying to figure out the architecture for a new project I have in mind.

    One of the key features of the project will be the ability for the user to customise the UI: things like adding new fields or changing labels. I know the framework is able to do that dynamically, but my real question is:

    Can I somehow save UI components into a database and load/create objects by reading the ExtJS code from a database field instead of reading it from a file? I understand that I could do that by using Javascript's eval() function but for sure there are better approaches.

    Thanks in advance,

    Daniel
    Last edited by danisfe; 16 Mar 2012 at 3:55 AM. Reason: Tags

  2. #2
    Sencha - Services Team arthurakay's Avatar
    Join Date
    Sep 2008
    Location
    Antioch, IL
    Posts
    1,348
    Vote Rating
    32
    arthurakay is a jewel in the rough arthurakay is a jewel in the rough arthurakay is a jewel in the rough

      0  

    Default


    You could easily encode some configuration object into JSON... then pass that to the database (saved as a string).

    When users login to your app, that JSON is taken from the DB, decoded on the client, and injected into your app as necessary. I've seen this done a bunch of times.
    Arthur Kay
    Developer Relations Manager, Sencha Inc.

    Twitter | Sencha Chicago User Group

  3. #3
    Sencha User
    Join Date
    Dec 2012
    Posts
    1
    Vote Rating
    0
    uglydeveloper is on a distinguished road

      0  

    Default save entire ext view as clip board

    save entire ext view as clip board


    Hmm..Thank god at least i found this answer. I have a requirement to save current ext view as clipboard as an image. As and when user clicks on clip board image i have to re create the entire ext view with all saved data. I need desperate help on this. Can you please provide any code samples?

Thread Participants: 2