You could avoid having to write a view script by adding the following to
the action that updates the status (this disables the rendering of a
view script through the viewRenderer action helper):
$this->_helper->viewRenderer->setNoRender(true);
and - if you use layouts as well (disables the layout through the layout
action helper):
$this->_helper->Layout->disableLayout(true);
I usually name my actions something like "updateAjaxAction()" and call
them with the url "/admin/update.ajax". You could also check out the
ContextSwitch action-helper for (a LOT) more documentation on having
your content available in multiple formats/contexts. This would save you
from manually calling disableLayout(), and have your actions work either
with or without being called by XmlHttpRequest calls.
Kind regards,
--
Ramon de la Fuente
Future500 BV
Graaf Janstraat 143
2713 CK ZOETERMEER
tel: +31(0) 79 3164428
fax: +31(0) 84 7160626
mob: +31(0) 6 53443008
@: ramon@future500.nl
w: www.future500.nl
Jigal sanders wrote:
> Hello everyone,
>
> I have a kind of implementation question on how to implement
> something. I will try to explain it over here. It is as follows.
> Currently I am building an online registration system for volunteers
> to subscribe for events. I am now building the admin page and i have a
> way to drill down all the way to one event.
> On this page I can see the details of the event and also the
> subscribers of the event. And this part is what my question is about.
>
> Each line consists of a volunteer who is subscribed for the current
> event. Besides the name and other details of the volunteer also the
> status of the subscription is shown. The admin is able to change the
> status of the subscription by changing the status in a dropdownbox.
> This dropdownbox has a JS event and uses Ajax. The difficult part is
> that I don't really know how to handle this. Because my xmlhttp
> request looks like http://mysite/Admin/Evenement/insert/id/1
> But the current url is http://mysite/Admin/Evenement/all and I
> acutally don't think it's good to make an view script just for this
> one line. The dropdownbox is already defined in /all. So how do I deal
> with this. Can anyone give me some Guidance.
>
> O yes to make it easier to understand look at:
> 1. http://217.149.198.122/ Login with User: Admin pw: Admin
> 2. Then go to Alle Evenementen
> 3. Then click on one of the Id's and then you'll see what I am talking
> about.
>
> Sorry but the site is not multilingual yet ;-)
>
> Kind regards for taking the time to look intop my problem
>
>
> jsanders
>
>
没有评论:
发表评论