{"issue":{"state":"open","created_at":"2011-11-23T17:06:07Z","updated_at":"2011-11-23T17:06:11Z","user":{"gravatar_id":"256406243346b9253f8610fb1d1e05f6","id":1215373,"url":"https://api.github.com/users/importer","login":"importer","avatar_url":"https://secure.gravatar.com/avatar/256406243346b9253f8610fb1d1e05f6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":4,"body":"Hi Leo,\r\n\r\nI'm developping a set of new modules which one required the definition of a new field form similar to pagetree.\r\nThe problem is that to use it to create a module, I need to display it like a pagetree and use Ajax to allow deployment of values to select.\r\n\r\nBut I see that your class Ajax is not extendable to new actions in both \r\n```\nexecutePreActions\r\n```\nand\r\n```\nexecutePostActions\r\n```\nmethods.\r\n\r\nI think I've searched every solutions possible but none has worked so I come with this solution :\r\nIn the previous methods on each switch case, I add a default case who implement a custom action and getter and setter.\r\nSee the code of my Ajax.php in the attached file.\r\n\r\nLike you can see, I didn't modify anything in your class, I've simply added new generics fonctionnalities.\r\nNow, I want to know what you think of integrate this evolution on Typolight and, why not, some ideas to improve my solution.\r\n\r\nTo go further, why not make the class Ajax, a library class who get an singleton class Action in the library too => like this we can register all actions we want without risk to disable a friend action in another module and more it can be used on both front end and back end modules.\n\n[Download the attachments](http://www.contao.org/tl_files/tickets/16.zip \"Download the attachments of this ticket\")\n\n--- _Originally created by Chriscool on August 29th, 2008, at 03:38pm (ID 16)_","assignee":{"gravatar_id":"360d94de41513598ac4440d46a3dab1b","id":1192057,"url":"https://api.github.com/users/leofeyer","login":"leofeyer","avatar_url":"https://secure.gravatar.com/avatar/360d94de41513598ac4440d46a3dab1b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"number":16,"id":2332005,"labels":[{"color":"e6e6e6","name":"backend","url":"https://api.github.com/repos/contao/issues/labels/backend"},{"color":"ff8000","name":"Feature","url":"https://api.github.com/repos/contao/issues/labels/Feature"}],"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"title":"Custom BE Ajax actions","closed_at":null,"html_url":"https://github.com/contao/issues/issues/16","milestone":{"state":"open","created_at":"2011-11-23T17:03:25Z","closed_issues":4,"due_on":null,"creator":{"gravatar_id":"360d94de41513598ac4440d46a3dab1b","id":1192057,"url":"https://api.github.com/users/leofeyer","login":"leofeyer","avatar_url":"https://secure.gravatar.com/avatar/360d94de41513598ac4440d46a3dab1b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"number":3,"title":"2.6.1","description":"TYPOlight 2.6.1 (maintenance release)","url":"https://api.github.com/repos/contao/issues/milestones/3","open_issues":1},"url":"https://api.github.com/repos/contao/issues/issues/16"},"action":"created","comment":{"created_at":"2011-11-23T17:06:11Z","updated_at":"2011-11-23T17:06:11Z","user":{"gravatar_id":"360d94de41513598ac4440d46a3dab1b","id":1192057,"url":"https://api.github.com/users/leofeyer","login":"leofeyer","avatar_url":"https://secure.gravatar.com/avatar/360d94de41513598ac4440d46a3dab1b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"--- _Originally closed on September 13th, 2008, at 03:08pm_","id":2851517,"url":"https://api.github.com/repos/contao/issues/issues/comments/2851517"}}