[Cubicweb] Workflows / vid statuschange

Carlos Balderas carlos.balderas at gmail.com
Wed Jun 9 17:20:08 CEST 2010


Hello list!

This question is about navigation among custom views.

I was trying to call statuschange view (which is a form/view for changing
states of a workflowable entity) from another place which is not the
original entity primary view and I try to use __redirectpath form value to
come back to the original place after validate or cancel button was
executed, but did not work as I was expecting.

note:
I have been using __redirectpath form value to call "add" and "edition"
views of entities from custum views I have made for my application to make
certain way of custom navigation, I am not sure this is the correct thing to
do to make this type of custom navigation, until now I haven't have any
trouble at all though.

So, talking about statuschange vid, I was looking at method redirectpath in
line 107 of cubicweb/web/views/workflow.py and I found that always writes
the value of __redirectpath form variable, so I was thinking if you consider
proper to make a validation when the __redirectpath is already present
(sent) in the form parameters then respect the given value.

I inherited the class ChangeStateFormView to make some tests about this, but
I found out that this view always writes __redirectpath form parameter, so
sending another __redirectpath parameter by GET form method will duplicate
this value and I don't get the behavior I expected.

Maybe exist another way to achive what I am looking for.

I hope I explained myself right

Any comment will be very appreciated.

Thank you very much in advance
Carlos Balderas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20100609/dd3974b9/attachment-0186.html>


More information about the Cubicweb mailing list