[jifty-devel] [rt.cpan.org #46800] AutoReply: Order of Actions in Request

Bugs in Jifty via RT bug-Jifty at rt.cpan.org
Tue Jun 9 12:25:51 EDT 2009


This message has been automatically generated in response to the
creation of a trouble ticket regarding:
	"[jifty-devel] Order of Actions in Request", 
a summary of which appears below.

There is no need to reply to this message right now.  Your ticket has been
assigned an ID of [rt.cpan.org #46800].  Your ticket is accessible
on the web at:


Please include the string:

         [rt.cpan.org #46800]

in the subject line of all future correspondence about this issue. To do so, 
you may reply to this message.

                        Thank you,
                        bug-Jifty at rt.cpan.org


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
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,

jifty-devel mailing list
jifty-devel at lists.jifty.org

More information about the jifty-devel mailing list