[Pier/Magritte Question] Customizing Edit Form Page

Bill Sun <billksun <at> yahoo.com>
2006-09-01 02:41:42 GMT

<!-- DIV {margin:0px;}-->

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?

Re: [Pier/Magritte Question] Customizing Edit Form Page

Lukas Renggli <renggli <at> iam.unibe.ch>
2006-09-01 05:18:20 GMT

> 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

Re: [Pier/Magritte Question] Customizing Edit Form Page

Bill Sun <billksun <at> yahoo.com>
2006-09-01 05:29:44 GMT

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.

> 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?

Re: [Pier/Magritte Question] Customizing Edit Form Page

Lukas Renggli <renggli <at> iam.unibe.ch>
2006-09-01 05:36:14 GMT

> 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

Re: [Pier/Magritte Question] Customizing Edit Form Page

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 Smallta
lk are still very new to me, so I might not be using the correct terminologies
here.

> 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 thin
g you want to look at. These methods answer descriptions with priorities
and get sorted according to this number to place them in order.

Re: [Pier/Magritte Question] Customizing Edit Form Page

Lukas Renggli <renggli <at> iam.unibe.ch>
2006-09-01 19:34:26 GMT

> 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

> 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 y
ou 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.

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 star
t 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