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) 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. Any ideas? Norbert _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
On 27 October 2010 16:58, Norbert Hartl <[hidden email]> 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. > 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. Lukas -- Lukas Renggli www.lukas-renggli.ch _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
On 28.10.2010, at 09:22, Lukas Renggli wrote: > On 27 October 2010 16:58, Norbert Hartl <[hidden email]> 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. Norbert _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
>>> 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. #execute is in the model, so that's definitely the wrong place to do something Seaside related. I guess the right place would be in PRContentsWidget>>#onAnswerContext:command:, but I am not entirely sure of how to do that. Lukas -- Lukas Renggli www.lukas-renggli.ch _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
Free forum by Nabble | Edit this page |