Dear Seasiders,
I have been bit by Seaside Bug and have been trying my hands on it. I am quite a newbie and have got an interesting question to ask. I have been trying to make a simple web application which has to do the following thing. The page should have a Button/Anchor for Creating a List of Contents. On clicking that, he should be rendered with a SUInPlaceEditor in the same page. Once he enters the details and press OK, it should show the entered content. If he wants to edit it, he can either click and edit. By clicking the button again, another SUInPlaceEditor should render itself just beneath the previous one and so on. I tried on the lines of MyAddressBook example (http://objectcentric.wordpress.com/2007/01/17/scriptacu-list-tutorialpart-1/ ) to have 2 pages, one page lists all the items and another page where you get SUInPlaceEditor to enter the details. Unlike in a normal textInput field, where upon saving, the repository updates itself, I am not able to achieve the same with my application. Am I missing something ? In the example of scriptaculous, the text (inst variable) of SUInPlaceEditorTest is initialized to 'Click and Edit me". I believe, to have persistence, we need to go for Class Instance Variables, how do we do this. It would be great to discus further with you all. Is there any tutorial specific for Scriptaculous ? Anticipating for your help, Rajeev -- Rajeev Lochan Co-founder, AR-CAD.com http://www.ar-cad.com +91 9212090622 (Gurgaon) 080 65355873 (Bangalore) _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> In the example of scriptaculous, the text (inst variable) of
> SUInPlaceEditorTest is initialized to 'Click and Edit me". I believe, to > have persistence, we need to go for Class Instance Variables, how do we do > this. I don't quite understand what you are trying to do. To change the text you have 'Click and Edit me" the option #clickToEditText:. > It would be great to discus further with you all. Is there any tutorial > specific for Scriptaculous ? Except for the shipped functional test cases and some blog posts, there are none. However it should be fairly easy to follow any script.aculo.us or prototypes tutorial. Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Sorry Lukas for making it so complicated. In simpler terms, I shall put it in this way.
There is a page (SomeComponentView) which renders us a Heading and a SUInPlaceEditor form/field Upon entering say Item 1, I press OK button . Now I want this detail to be saved somewhere in persistence. In the present example (SUInPlaceEditorTest), upon clicking NewSession in the ToolBar, the content is reset to Clickme&EditMe... After saving the content in some variable or it should render a button on the next line to the entered Item 1. By pressing the Button, another SUInPlaceEditor form/field should be rendered. The user can again enter something say Item 2 and presses OK. Similarly, he can create a list of as many items as he wants and finally save the whole list of items. I hope it is clear now. If any clarifications, please let me know. Regards, Rajeev On 5/21/07, Lukas Renggli <[hidden email]> wrote: > In the example of scriptaculous, the text (inst variable) of -- Rajeev Lochan Co-founder, AR-CAD.com http://www.ar-cad.com +91 9212090622 (Gurgaon) 080 65355873 (Bangalore) _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> Upon entering say Item 1, I press OK button . Now I want this detail to be
> saved somewhere in persistence. In the present example > (SUInPlaceEditorTest), upon clicking NewSession in the ToolBar, the content > is reset to Clickme&EditMe... Allright, now I understand. So this is rather a persistency problem than an AJAX (or SUInPlaceEditorTest) one. Most productive applications would probably use a database for that, but in your case this is probably overkill. I updated the material for my tutorials: http://www.lukas-renggli.ch/smalltalk/seaside In your case the code for 'The Art of Seaside' would be interesting, where I also store the model on the class-side of some class. Hope this helps. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Thanks a lot Lukas, The tutorial is indeed one of the best I have come across. I downloaded the code and loaded it. I then completed the codes from the notes of yours, which as been explained splendidly. I have a question.
Do we have to use ToDoListView>>rendererClass Error: Components not found while processing callbacks: an Array(a ToDoItemView)
On 5/21/07, Lukas Renggli
<[hidden email]> wrote: > Upon entering say Item 1, I press OK button . Now I want this detail to be -- Rajeev Lochan Co-founder, AR-CAD.com http://www.ar-cad.com +91 9212090622 (Gurgaon) 080 65355873 (Bangalore) _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> Thanks a lot Lukas, The tutorial is indeed one of the best I have come
> across. I downloaded the code and loaded it. I then completed the codes from > the notes of yours, which as been explained splendidly. I have a question. Thanks for the feedback. The notes are not really complete, as these was just what I needed during the presentation last ESUG. > Do we have to use > ToDoListView>>rendererClass > ^ WARenderCanvas Not anymore in Seaside 2.7 and 2.8. > What purpose does this serve? Change the rendering class, the class of the object passed into #renderContentOn:. It doesn't server an important purpose in current versions of Seaside, since now there is only WARenderCanvas. > After Completing the code, I ran into the following error message upon > pressing Add New Button and then Saving a New Item. Am I missing > something ? > > Error: Components not found while processing callbacks: an Array(a > ToDoItemView) > WARender(Object)>>error: There is this line missing in my notes (I updated the notes): - ToDoListView>>children ^ Array with: editor > Thanks again for your timely help. I would love to see more tutorials from > your side. Creating new tutorials is so much of work ... unfortunately :-( 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 |