Jump to:

10979 Posts in 2722 Topics by 1815 members

All other Modules

SilverStripe Forums » All other Modules » JSON <-> Flash Integration with JSONDataFormatter

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 985 Views
  • joninjas
    Avatar
    Community Member
    32 Posts

    JSON <-> Flash Integration with JSONDataFormatter Link to this post

    Thanks for your help! I can now pass a JSON object to the flash.swf, really handy.

    But a problem still exists:
    http://www.depot43.ch/silverflash/flashinhalte/textfelder/textfeld1/jsonausgabe only displays with the variables from the TextFeldangabe table when I'm logged in the backend. Would there be a possibility to log in a readonly user automatically in the controller or something like that??

    class TextFeldPage_Controller extends Page_Controller {

    public function jsonausgabe() {
    $data1 = DataObject::get("TextFeldangabe","TextFeldangabe.Titel='$this->URLSegment'");
    $f1 = new JSONDataFormatter();
    return $f1->convertDataObjectSet($data1);
    }

    }

    Thanks for your help mates!!!
    JoNinjas

  • spierala
    Avatar
    Community Member
    80 Posts

    Re: JSON <-> Flash Integration with JSONDataFormatter Link to this post

    hey!
    old post, but still I just came to the solution and maybe someone else wants to know it
    make sure your dataobjects can be viewed for non-admins like this:

    public function canView($member = null) {
    return true;
    }

    985 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.