1. #1
    Sencha User
    Join Date
    Aug 2011
    Location
    London
    Posts
    409
    Vote Rating
    18
    Answers
    18
    digeridoopoo will become famous soon enough

      0  

    Default Unanswered: Which proxy format to use if I want to store text styles in a file....

    Unanswered: Which proxy format to use if I want to store text styles in a file....


    Hi,

    At the moment I have an iPad split view (left hand column 1/3 right hand column 2/3, like the kitchen sink app) where my list, thumbnail and main content comes from a JSON file. When I click on an item in the list, it populates the main panel on the right.

    I realise that it is not possible to style the text inside the JSON file (I would like to have bold text for some words, underline etc) so I was wondering what would be the best proxy type to use?

    Would it be better for me to use an XML proxy instead? Would this allow me to save style information inside, or does anyone have any other suggestions?

    I was trying to avoid having separate HTML files for efficiency reasons...

    Thanks

    :-)

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    416
    Vote Rating
    18
    Answers
    5
    jweber will become famous soon enough

      0  

    Default


    The type of proxy wouldn't really matter here. If you want formatted text, you'll probably want to send a block of HTML in the response. You can stuff that into either a XML or JSON response...just make sure you encode it properly.

  3. #3
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,548
    Vote Rating
    872
    Answers
    3566
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Also, you won't be able to save to a file using the data package. You would need a server side script for that or be within a packaged app and handle the saving to the file in your code.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #4
    Sencha User
    Join Date
    Aug 2011
    Location
    London
    Posts
    409
    Vote Rating
    18
    Answers
    18
    digeridoopoo will become famous soon enough

      0  

    Default Thanks

    Thanks


    Thanks both...this panel is a bit simpler in concept, just grabbing a local JSON file so there will be no saving to a file needed.


    I'd like to be able to click on the presenter you would get nice formatted HTML content on the right, but I'm unsure about this, I would have thought perhaps I could store HTML in an XML file but not sure about the encoding and storing all the HTML tags etc inside the file. For example, if the content contains "black &amp; white" would it show up as "black & white"? I'd like to be able to store other tags too like <h3> etc.


    :-)

Thread Participants: 2

Tags for this Thread