Bug: URL not updated on quick command
norbert at hartl.name
Thu Oct 28 09:35:44 MEST 2010
On 28.10.2010, at 09:22, Lukas Renggli wrote:
> On 27 October 2010 16:58, Norbert Hartl <norbert at hartl.name> wrote:
>> I have a command that is a quick command and on execute time I do something like
>> thisStructure := self context structure.
>> parentStructure := thisStructure parent.
>> self answer: (self context structure: parentStructure)
> First of all: Commands are supposed to change something in the model,
> they are supposed to be persistent and recorded in the history. Pure
> navigation should be done with (value-)links.
Yes, that is right. In my case I'm on a child page and the command is a remove command. The model and page are deleted and then I want to return to the parent page.
>> The context then contains the right structure (parentStructure) but the url line in the browser still tells the url of thisStructure. The only thing I could confirm is that this doen't happen if isQuick is false. Then the url is updated correctly.
> The URL of a command is RESTful and points to where the command is
> supposed to be executed. For quick commands that do not show an UI a
> redirect would be necessary to update the URL after execution.
What is the best place to do a redirect? I think in execute it might be to early.
More information about the smallwiki