[jifty-devel] Order of Actions in Request

William F. Dudley Jr. wfdudley at gmail.com
Tue Jun 9 12:47:15 EDT 2009


On 6/9/09, Jesse Vincent <jesse at bestpractical.com> wrote:
> Mmm. That looks reasonable to me, but it's been so long since I've
> touched it. Anyone else have opinions?
>
>
> On Tue  9.Jun'09 at 17:54:56 +0200, Eric-Christian Koch wrote:
>> Hello,
>>
>> i wonder if someone of you can give me a hint.
>>
>> In my template i created some actions with giving them an order value.
>> @actions = (
>>     $record1->as_update_action( order => 1),
>>     $record2->as_update_action( order => 2)
>> )
>>
>> And added them to a link:
>> onclick => [ { submit => \@actions   ...
>>
>>
>> However, the order value did not make it into the JSON as the request
>> was send to the server.
>> So it was undef while processed in Jifty::Request.
>>
>>
>> After some debuging i added the following javascript code to the
>> Action.data_structur function:
>> Action.prototype.data_structure = function() {
>>         var a = {};
>>         a['moniker'] = this.moniker;
>>         a['class']   = this.actionClass;
>>
>>         if (this.register && this.register.id) {
>>             var tmp = this.register.id.match(/^J:A-(\d+)-/);
>>             if (tmp.length == 2)
>>                 a['order'] = tmp[1];
>>         }
>> ....
>>
>>
>> Now the JSON, send by the ajax request, contains the order value and the
>> actions are executed in the correct order.
>> Still, i dont know if i probably misunderstood something about the order
>> option.
>> I would realy like to know if someone of you has figured out how it is
>> supposed to work.
>>
>>
>>
>> PS: Sorry for my bad english. ;)
>>
>>
>> Thanks in advance,
>> Eric
>>
>> _______________________________________________
>> jifty-devel mailing list
>> jifty-devel at lists.jifty.org
>> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
>>
> _______________________________________________
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
>


More information about the jifty-devel mailing list