Hi,
am using the Mewa framework within my application. I want to embed am MWEditorVisistor in my Edior component. My editor component shows above the current state of the model and under this the EditorVisitor is rendered (two components are embedded). But my data model is not updated, because the update action is not called. If something is typed in the EditorVisitor and the save button is pressed, nothing happens of cause. At this moment somebody should catch the returned object (like it is done in the MewaExample), but nobody does this yet. my rendering method contains only: html render: addEditor. "addEditor is a MWEditorVisitor with a model" the addEditor is defined in the initializeMethod: newObject := Object new. addEditor := (MWEditorVisitor model: newObject) How does my editor notices that the save action is done in my Editor visitor. I think I need to apply an action but I don't know how. And is this way to embed the EditorVisistor right anyway? Patty _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi Patty,
> the addEditor is defined in the initializeMethod: > newObject := Object new. > addEditor := (MWEditorVisitor model: newObject) > > How does my editor notices that the save action is done in my Editor > visitor. I think I need to apply an action but I don't know how. And is > this way to embed the EditorVisistor right anyway? you can catch the #answer: of a component by using the method #onAnswer:. As far as I understand your problem you need to add the following code to your initialize method: addEditor onAnswer: [ :object | ... ]. Into this block you get passed in the modified object that you can then use to update your view. At least this is how I expect Mewa to work, I don't know the details. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi Lucas,
but now every time I click on the save button the session is not valid anymore (message this page has expired is displayed)... Patty Lukas Renggli schrieb: > Hi Patty, > >> the addEditor is defined in the initializeMethod: >> newObject := Object new. >> addEditor := (MWEditorVisitor model: newObject) >> >> How does my editor notices that the save action is done in my Editor >> visitor. I think I need to apply an action but I don't know how. And is >> this way to embed the EditorVisistor right anyway? > > you can catch the #answer: of a component by using the method > #onAnswer:. As far as I understand your problem you need to add the > following code to your initialize method: > > addEditor onAnswer: [ :object | ... ]. > > Into this block you get passed in the modified object that you can > then use to update your view. At least this is how I expect Mewa to > work, I don't know the details. > > Cheers, > Lukas > _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> but now every time I click on the save button the session is not valid
> anymore (message this page has expired is displayed)... Normally this does not happen. What do you do within that block? Did you try a #halt within the block? Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |