Hi all, I want to make changes to the "Edit Form" page, specifically, I want to add commands to allow the reordering of the html elements, so that I can re-arrange the order of the elements after I have created them. Where do I make the changes at? I traced the code back to MAContainerComponent, but got lost there. -Bill _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki _______________________________________________ Smallwiki mailing list [hidden email] http://impara.de/mailman/listinfo/smallwiki |
> I want to make changes to the "Edit Form" page, specifically, I
> want to add commands to allow the reordering of the html elements, > so that I can re-arrange the order of the elements after I have > created them. Where do I make the changes at? What kind of HTML elements do you want to reorder? The input fields of the Edit Form? Or the text in the TextArea? Or What? Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki _______________________________________________ Smallwiki mailing list [hidden email] http://impara.de/mailman/listinfo/smallwiki |
I'm not trying to reorder HTML elements of the Edit Form page, rather, I'm trying to reorder the elements (text field, text area, options...etc) in the Form that the Edit Form page is editing. So far, you can edit and remove elements, but not reorder them. -Bill ----- Original Message ---- From: Lukas Renggli <[hidden email]> To: "Magritte, Pier and Related Tools ..." <[hidden email]> Sent: Thursday, August 31, 2006 10:18:20 PM Subject: Re: [Pier/Magritte Question] Customizing Edit Form Page > I want to make changes to the "Edit Form" page, specifically, I > want to add commands to allow the reordering of the html elements, > so that I can re-arrange the order of the elements after I have > created them. Where do I make the changes at? What kind of HTML elements do you want to reorder? The input fields of the Edit Form? Or the text in the TextArea? Or What? Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki _______________________________________________ Smallwiki mailing list [hidden email] http://impara.de/mailman/listinfo/smallwiki |
> I'm not trying to reorder HTML elements of the Edit Form page,
> rather, I'm trying to reorder the elements (text field, text area, > options...etc) in the Form that the Edit Form page is editing. So > far, you can edit and remove elements, but not reorder them. Aha, I see. The description methods (methods starting with #description) on the class side of PRStructure and its subclassses are the thing you want to look at. These methods answer descriptions with priorities and get sorted according to this number to place them in order. Hope this helps, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki _______________________________________________ Smallwiki mailing list [hidden email] http://impara.de/mailman/listinfo/smallwiki |
I appologize for my vagueness, after digging into the workings of the code more, I realized I should of said: "How do I reorder the instance-based descriptions"? In the form editor (invoked by PREditFormCommand), editing the priorities of the descriptions labeled under "elements" in an adaptive form doesn't seem to do anything. An example of the type of description editor that I'm looking for is the form editor in Aare that you presented in your master thesis, where you can move the order of the descriptions up and down, in addition to removing and editing them. Let me know if I'm still not making much sense here. This meta stuff and Smalltalk are still very new to me, so I might not be using the correct terminologies here. -Bill ----- Original Message ---- From: Lukas Renggli <[hidden email]> To: "Magritte, Pier and Related Tools ..." <[hidden email]> Sent: Thursday, August 31, 2006 10:36:14 PM Subject: Re: [Pier/Magritte Question] Customizing Edit Form Page > I'm not trying to reorder HTML elements of the Edit Form page, > rather, I'm trying to reorder the elements (text field, text area, > options...etc) in the Form that the Edit Form page is editing. So > far, you can edit and remove elements, but not reorder them. Aha, I see. The description methods (methods starting with #description) on the class side of PRStructure and its subclassses are the thing you want to look at. These methods answer descriptions with priorities and get sorted according to this number to place them in order. Hope this helps, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki _______________________________________________ Smallwiki mailing list [hidden email] http://impara.de/mailman/listinfo/smallwiki |
> In the form editor (invoked by PREditFormCommand), editing the
> priorities of the descriptions labeled under "elements" in an > adaptive form doesn't seem to do anything. An example of the type > of description editor that I'm looking for is the form editor in > Aare that you presented in your master thesis, where you can move > the order of the descriptions up and down, in addition to removing > and editing them. Now I understand. You found a bug! ;-) The problem was that the description of the container didn't set the children to ordered and then the report didn't display the 'up' and 'down' links. This bug is fixed in Magritte-Model-lr.225. Thanks for reporting. MAContainer class>>descriptionChildren ^ (MAToManyRelationDescription accessor: (MASelectorAccessor read: #children write: #setChildren:) label: 'Elements' priority: 400 default: self defaultCollection) classes: (MADynamicObject on: [ MAElementDescription withAllConcreteClasses ]); beOrdered; " <--- this was missing " yourself Some background information: The Form Editor in Pier is completely auto generated, there is no additional code. In contrary the editor in Aare, a commercial workflow definition and management system, has been especially customized for this application. Therefor it displays only a small selection of relevant tools for our customer. > Let me know if I'm still not making much sense here. This meta > stuff and Smalltalk are still very new to me, so I might not be > using the correct terminologies here. Btw, I'll be at Camp-Smalltalk and ESUG in Prague starting from Saturday for a week. If anybody is interested to participate and I find some spare time I would like to start with new (not sure yet if this will be 1.1 or 2.0) and rethought version of Magritte. And yes, I will also give two Seaside related presentations ;-) See you in Prague, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki _______________________________________________ Smallwiki mailing list [hidden email] http://impara.de/mailman/listinfo/smallwiki |
> MAContainer class>>descriptionChildren > ^ (MAToManyRelationDescription accessor: (MASelectorAccessor read: >#children write: #setChildren:) label: 'Elements' priority: 400 >default: self defaultCollection) > classes: (MADynamicObject on: [ MAElementDescription >withAllConcreteClasses ]); > beOrdered; " <--- this was missing " > yourself Ah yes, I found out about this part myself as well, but I held back on my findings because I think I messed something up and now my adaptive form won't save the changes that I made to the metamodel. Anyway, glad my poking around aided in the discovery and squashing of bug :) -Bill ----- Original Message ---- From: Lukas Renggli <[hidden email]> To: "Magritte, Pier and Related Tools ..." <[hidden email]> Sent: Friday, September 1, 2006 12:34:26 PM Subject: Re: [Pier/Magritte Question] Customizing Edit Form Page > In the form editor (invoked by PREditFormCommand), editing the > priorities of the descriptions labeled under "elements" in an > adaptive form doesn't seem to do anything. An example of the type > of description editor that I'm looking for is the form editor in > Aare that you presented in your master thesis, where you can move > the order of the descriptions up and down, in addition to removing > and editing them. Now I understand. You found a bug! ;-) The problem was that the description of the container didn't set the children to ordered and then the report didn't display the 'up' and 'down' links. This bug is fixed in Magritte-Model-lr.225. Thanks for reporting. MAContainer class>>descriptionChildren ^ (MAToManyRelationDescription accessor: (MASelectorAccessor read: #children write: #setChildren:) label: 'Elements' priority: 400 default: self defaultCollection) classes: (MADynamicObject on: [ MAElementDescription withAllConcreteClasses ]); beOrdered; " <--- this was missing " yourself Some background information: The Form Editor in Pier is completely auto generated, there is no additional code. In contrary the editor in Aare, a commercial workflow definition and management system, has been especially customized for this application. Therefor it displays only a small selection of relevant tools for our customer. > Let me know if I'm still not making much sense here. This meta > stuff and Smalltalk are still very new to me, so I might not be > using the correct terminologies here. Btw, I'll be at Camp-Smalltalk and ESUG in Prague starting from Saturday for a week. If anybody is interested to participate and I find some spare time I would like to start with new (not sure yet if this will be 1.1 or 2.0) and rethought version of Magritte. And yes, I will also give two Seaside related presentations ;-) See you in Prague, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki _______________________________________________ Smallwiki mailing list [hidden email] http://impara.de/mailman/listinfo/smallwiki |
Free forum by Nabble | Edit this page |