Magma, Seaside and Magrite integration

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Magma, Seaside and Magrite integration

fvozzi
Hi all,
I added magma session to my application seaside session (a subclass of WASession) so each user has his own magma session. My problem is with magritte description because I need, on the class side, set list of options. By example: 

User class >>descriptionRol 
"Answer a magritte meta description for the receiver rol attribute."

^MAMultipleOptionDescription new
accessor: #roles;
label: 'Roles';
priority: 200;
componentClass: MAListCompositonComponent;
options: MySystem singleton roles;
beSorted; 
yourself

The problem is "MySystem singleton roles" beacuse is in other magma session when the user add or edit an instance of User on the seaside application.
I "hack" my seaside components to override the options with a collection of instances (by example: Rol allInSession: aUserSession) inside of the user session but it's very ugly. Just a test. How do you configure the maggrite description to deal with this problem? Is a common practice add a new magma session in every session session?

Thanks in advance,
Facu

_______________________________________________
Magma mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/magma
Reply | Threaded
Open this post in threaded view
|

Re: Magma, Seaside and Magrite integration

Udo Schneider
Facu,

you might consider working with 1+n sessions. Use one (shared) session
for all the general stuff and 1/session for session specific stuff.

Another approach is to share a MagmaSession between Seaside sessions
until a user logs in. Then you'll have a MagmaSession per logged-in user.

e.g.

MySystem>#magmaSession
        | seasideMagmaSession |
        seasideMagmaSession := WASession current magmaSession.
        seasideMagmaSession notNil: [^seasideMagmaSession].
        ^self sharedMagmaSession

MyWASession>#magmaSession
        ^magmaSession

MyWASession>#loginUser: aUserName
        magmaSession := self createMagmaSessionConnectAs: aUserName

Hope you get the idea.

CU,

Udo


On 14.11.10 23:49, Facundo Vozzi wrote:

> Hi all,
> I added magma session to my application seaside session (a subclass of
> WASession) so each user has his own magma session. My problem is with
> magritte description because I need, on the class side, set list of
> options. By example:
>
> User class >>descriptionRol
> "Answer a magritte meta description for the receiver rol attribute."
>
> ^MAMultipleOptionDescription new
> accessor: #roles;
> label: 'Roles';
> priority: 200;
> componentClass: MAListCompositonComponent;
> options: MySystem singleton roles;
> beSorted;
> yourself
>
> The problem is "MySystem singleton roles" beacuse is in other magma
> session when the user add or edit an instance of User on the seaside
> application.
> I "hack" my seaside components to override the options with a collection
> of instances (by example: Rol allInSession: aUserSession) inside of the
> user session but it's very ugly. Just a test. How do you configure the
> maggrite description to deal with this problem? Is a common practice add
> a new magma session in every session session?
>
> Thanks in advance,
> Facu
>
>
>
> _______________________________________________
> Magma mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/magma


_______________________________________________
Magma mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/magma
Reply | Threaded
Open this post in threaded view
|

Re: Magma, Seaside and Magrite integration

fvozzi
Udo,

On Mon, Nov 15, 2010 at 7:11 AM, Udo Schneider <[hidden email]> wrote:
Facu,

you might consider working with 1+n sessions. Use one (shared) session for all the general stuff and 1/session for session specific stuff.

Another approach is to share a MagmaSession between Seaside sessions until a user logs in. Then you'll have a MagmaSession per logged-in user.

e.g.

MySystem>#magmaSession
       | seasideMagmaSession |
       seasideMagmaSession := WASession current magmaSession.
       seasideMagmaSession notNil: [^seasideMagmaSession].
       ^self sharedMagmaSession

Hi have a similar stuff, MySystem >> magmaSession is a session common to all users, shared by all. But if a use an object in that session on a user session a got an error. I need check it again.
 

MyWASession>#magmaSession
       ^magmaSession

MyWASession>#loginUser: aUserName
       magmaSession := self createMagmaSessionConnectAs: aUserName

Yes, I have this on MyWASession. I don't know because it's not working.
 

Hope you get the idea.

CU,

Udo

Thank you again,
Facu

_______________________________________________
Magma mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/magma
Reply | Threaded
Open this post in threaded view
|

Re: Magma, Seaside and Magrite integration

Ezequiel S. Mc Govern
Facundo, i use Magma wih Seaside, have two classes, TISessionMagma and TIDatabase , superclass of TIMagmaDatabase
The fileout is attached, in initializePersonas have the code for commit each 500 objects.
Enjoy :)



2010/11/15 Facundo Vozzi <[hidden email]>
Udo,

On Mon, Nov 15, 2010 at 7:11 AM, Udo Schneider <[hidden email]> wrote:

Facu,

you might consider working with 1+n sessions. Use one (shared) session for all the general stuff and 1/session for session specific stuff.

Another approach is to share a MagmaSession between Seaside sessions until a user logs in. Then you'll have a MagmaSession per logged-in user.

e.g.

MySystem>#magmaSession
       | seasideMagmaSession |
       seasideMagmaSession := WASession current magmaSession.
       seasideMagmaSession notNil: [^seasideMagmaSession].
       ^self sharedMagmaSession

Hi have a similar stuff, MySystem >> magmaSession is a session common to all users, shared by all. But if a use an object in that session on a user session a got an error. I need check it again.
 

MyWASession>#magmaSession
       ^magmaSession

MyWASession>#loginUser: aUserName
       magmaSession := self createMagmaSessionConnectAs: aUserName

Yes, I have this on MyWASession. I don't know because it's not working.
 

Hope you get the idea.

CU,

Udo

Thank you again,
Facu

_______________________________________________
Magma mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/magma




--
Saludos !!
Ezequiel ;)

_______________________________________________
Magma mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/magma

TISessionMagma.st (1K) Download Attachment
TIDatabase.st (2K) Download Attachment
TIMagmaDatabase.st (7K) Download Attachment