Discussion:
[jifty-devel] Order of Actions in Request
Eric-Christian Koch
2009-06-09 15:54:56 UTC
Permalink
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
Jesse Vincent
2009-06-09 16:25:11 UTC
Permalink
Mmm. That looks reasonable to me, but it's been so long since I've
touched it. Anyone else have opinions?
Post by Eric-Christian Koch
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)
)
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.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
http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
William F. Dudley Jr.
2009-06-09 16:47:15 UTC
Permalink
Post by Jesse Vincent
Mmm. That looks reasonable to me, but it's been so long since I've
touched it. Anyone else have opinions?
Post by Eric-Christian Koch
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)
)
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.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
http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
_______________________________________________
jifty-devel mailing list
http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
Alex Vandiver
2009-06-17 20:19:10 UTC
Permalink
Post by Jesse Vincent
Mmm. That looks reasonable to me, but it's been so long since I've
touched it. Anyone else have opinions?
Looks correct to me -- comitted as r7276.
- Alex
Bugs in Jifty via RT
2009-06-09 16:25:51 UTC
Permalink
Greetings,

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:

http://rt.cpan.org/Ticket/Display.html?id=46800

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-***@rt.cpan.org

-------------------------------------------------------------------------
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
Alex Vandiver via RT
2009-06-17 20:20:09 UTC
Permalink
<URL: https://rt.cpan.org/Ticket/Display.html?id=46800 >

Committed as r7276.
Randall Marbach via RT
2009-06-28 03:44:19 UTC
Permalink
<URL: http://rt.cpan.org/Ticket/Display.html?id=46800 >

SzÉ
Post by Alex Vandiver via RT
<URL: https://rt.cpan.org/Ticket/Display.html?id=46800 >
According to our records, your request has been resolved. If you have any
further questions or concerns, please respond to this message.
_______________________________________________
jifty-devel mailing list
http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
--
Sent from my mobile device
Randall Marbach via RT
2009-06-28 04:03:49 UTC
Permalink
<URL: https://rt.cpan.org/Ticket/Display.html?id=46800 >

AWé
Post by Alex Vandiver via RT
<URL: https://rt.cpan.org/Ticket/Display.html?id=46800 >
According to our records, your request has been resolved. If you have any
further questions or concerns, please respond to this message.
_______________________________________________
jifty-devel mailing list
http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
--
Sent from my mobile device
Continue reading on narkive:
Loading...