Display Pier environment as Seaside component

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

Display Pier environment as Seaside component

dtrussardi@tiscali.it
Hi,


        my goal is to display Pier environment as Seaside subcomponent.


        I have some problem  ....


        First i create a class:

                        WAComponent subclass: #TestMultiPier
                        instanceVariableNames: 'pageA pageB tabs task'
                        classVariableNames: ''
                        poolDictionaries: ''
                        category: 'DTR-TestPier'


       
the
                initialize
       
                super initialize.
               
                tabs := OrderedCollection new.

                nomeKernel := 'pier'.
                pageA := PRPierFrame  on: (PRContext kernel: (PRKernel instanceNamed: nomeKernel )).
       
                self initTopMenuFor


the
                initTopMenuFor
       
                tabs add: 'PageA' -> pageA.

the

                renderContentOn: html

                html text: 'Prova gestione multi Pier istance'.
                html paragraph: Time now.
       
                self renderTopMenuOn: html.

                task  ifNotNil:[ html div id: 'divTabMst';
       
                                                with:[ html render: task]]


the

        renderTopMenuOn: html
       
        html unorderedList id: 'menu'; with: [
                tabs do: [ :each |
                        html listItem: [
                                html anchor
                                        class: (task = each value
                                                ifTrue: [ 'active' ]);
                                        callback: [ task := each value  ];
                                        with: each key ] ] ]
 



Now when clic on the PageA link the system rendering the Pier page correctly.

The error is erase when i click on sub link   ( of the Pier main page ) Information or Environment.

The system report the error:


UndefinedObject(Object)>>doesNotUnderstand: #context:
PRCurrentContext class>>value:
[] in PRContext>>activationCallback
BlockClosure>>valueWithPossibleArguments:
WAActionCallback>>evaluateWithArgument:
WAActionCallback(WACallback)>>evaluateWithFieldValues:
[] in WACallbackRegistry>>handle:
OrderedCollection>>do:
WACallbackRegistry>>handle:
[] in [] in WAActionPhaseContinuation>>runCallbacks
BlockClosure>>on:do:
WAActionPhaseContinuation(WARenderLoopContinuation)>>withNotificationHandlerDo:
[] in WAActionPhaseContinuation>>runCallbacks
BlockClosure>>ensure:
WAActionPhaseContinuation>>runCallbacks
WAActionPhaseContinuation>>handleRequest
[] in WAActionPhaseContinuation(WASessionContinuation)>>basicValue
BlockClosure>>on:do:
WAActionPhaseContinuation(WASessionContinuation)>>withUnregisteredHandlerDo:
WAActionPhaseContinuation(WASessionContinuation)>>basicValue



Because this ?


Thanks,

        Dario
                       




_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Display Pier environment as Seaside component

Lukas Renggli
I am not sure if I understand what you are trying to do, but did you see

    http://localhost:8080/examples/examplebrowser

? This embeds various Pier components in Seaside application.

Lukas

On 26 November 2010 13:00, [hidden email] <[hidden email]> wrote:

> Hi,
>
>
>        my goal is to display Pier environment as Seaside subcomponent.
>
>
>        I have some problem  ....
>
>
>        First i create a class:
>
>                        WAComponent subclass: #TestMultiPier
>                        instanceVariableNames: 'pageA pageB tabs task'
>                        classVariableNames: ''
>                        poolDictionaries: ''
>                        category: 'DTR-TestPier'
>
>
>
> the
>                initialize
>
>                super initialize.
>
>                tabs := OrderedCollection new.
>
>                nomeKernel := 'pier'.
>                pageA := PRPierFrame  on: (PRContext kernel: (PRKernel instanceNamed: nomeKernel )).
>
>                self initTopMenuFor
>
>
> the
>                initTopMenuFor
>
>                tabs add: 'PageA' -> pageA.
>
> the
>
>                renderContentOn: html
>
>                html text: 'Prova gestione multi Pier istance'.
>                html paragraph: Time now.
>
>                self renderTopMenuOn: html.
>
>                task  ifNotNil:[ html div id: 'divTabMst';
>
>                                                with:[ html render: task]]
>
>
> the
>
>        renderTopMenuOn: html
>
>        html unorderedList id: 'menu'; with: [
>                tabs do: [ :each |
>                        html listItem: [
>                                html anchor
>                                        class: (task = each value
>                                                ifTrue: [ 'active' ]);
>                                        callback: [ task := each value  ];
>                                        with: each key ] ] ]
>
>
>
>
> Now when clic on the PageA link the system rendering the Pier page correctly.
>
> The error is erase when i click on sub link   ( of the Pier main page    )      Information or Environment.
>
> The system report the error:
>
>
> UndefinedObject(Object)>>doesNotUnderstand: #context:
> PRCurrentContext class>>value:
> [] in PRContext>>activationCallback
> BlockClosure>>valueWithPossibleArguments:
> WAActionCallback>>evaluateWithArgument:
> WAActionCallback(WACallback)>>evaluateWithFieldValues:
> [] in WACallbackRegistry>>handle:
> OrderedCollection>>do:
> WACallbackRegistry>>handle:
> [] in [] in WAActionPhaseContinuation>>runCallbacks
> BlockClosure>>on:do:
> WAActionPhaseContinuation(WARenderLoopContinuation)>>withNotificationHandlerDo:
> [] in WAActionPhaseContinuation>>runCallbacks
> BlockClosure>>ensure:
> WAActionPhaseContinuation>>runCallbacks
> WAActionPhaseContinuation>>handleRequest
> [] in WAActionPhaseContinuation(WASessionContinuation)>>basicValue
> BlockClosure>>on:do:
> WAActionPhaseContinuation(WASessionContinuation)>>withUnregisteredHandlerDo:
> WAActionPhaseContinuation(WASessionContinuation)>>basicValue
>
>
>
> Because this ?
>
>
> Thanks,
>
>        Dario
>
>
>
>
>
> _______________________________________________
> Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>



--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Display Pier environment as Seaside component

dtrussardi@tiscali.it
Hi,

> I am not sure if I understand what you are trying to do, but did you see
>
>    http://localhost:8080/examples/examplebrowser
>
> ? This embeds various Pier components in Seaside application.

I select from  /examples/examplebrowser the PRPierFrame exampleDocumentation .


        When select PRObject  or MAObject link  i found the same error.





In my test i found the error : I d'ont implement  the children method

        children
        ^ Array with: pageA

with it the example work fine.



Now i have problem when i have the same seaside application but with reference to  2 different pier site

        i change the code to:

>>
>>        my goal is to display Pier environment as Seaside subcomponent.
>>
>>
>>        I have some problem  ....
>>
>>
>>        First i create a class:
>>
>>                        WAComponent subclass: #TestMultiPier
>>                        instanceVariableNames: ' siteA siteB tabs task'
>>                        classVariableNames: ''
>>                        poolDictionaries: ''
>>                        category: 'DTR-TestPier'
>>
>>
>>
>> the
>>                initialize
>>
>>                super initialize.
>>
>>                tabs := OrderedCollection new.
>>
>>                nomeKernel := 'pier'.
>>                siteA := PRPierFrame  on: (PRContext kernel: (PRKernel instanceNamed: nomeKernel )).

                nomeKernel := 'anowerpier'.
               siteB:= PRPierFrame  on: (PRContext kernel: (PRKernel instanceNamed: nomeKernel )).

       
>>
>>                self initTopMenuFor
>>
>>
>> the
>>                initTopMenuFor
>>
>>                tabs add: 'SiteA > siteA.
                tabs add: 'SiteB' -> siteB.

>>
>> the
>>
>>                renderContentOn: html
>>
>>                html text: 'Prova gestione multi Pier istance'.
>>                html paragraph: Time now.
>>
>>                self renderTopMenuOn: html.
>>
>>                task  ifNotNil:[ html div id: 'divTabMst';
>>
>>                                                with:[ html render: task]]
>>
>>
>> the
>>
>>        renderTopMenuOn: html
>>
>>        html unorderedList id: 'menu'; with: [
>>                tabs do: [ :each |
>>                        html listItem: [
>>                                html anchor
>>                                        class: (task = each value
>>                                                ifTrue: [ 'active' ]);
>>                                        callback: [ task := each value  ];
>>                                        with: each key ] ] ]
>>
>>

With it i d'ont found any very debug problem.

The first rendering of siteA and siteB work fine.

But when click on link of siteA   i have interference on siteB.

The siteB is update to siteA.


Any idea ?


I can have more PRPierFrame instances in the same application.


Thank,
                Dario



_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Display Pier environment as Seaside component

Lukas Renggli
I cannot reproduce this problem.

Lukas

On 27 November 2010 07:25, [hidden email] <[hidden email]> wrote:

> Hi,
>
>> I am not sure if I understand what you are trying to do, but did you see
>>
>>    http://localhost:8080/examples/examplebrowser
>>
>> ? This embeds various Pier components in Seaside application.
>
> I select        from  /examples/examplebrowser  the      PRPierFrame exampleDocumentation .
>
>
>        When select              PRObject  or   MAObject        link  i found the same error.
>
>
>
>
>
> In my test i found the error :   I d'ont implement  the children method
>
>        children
>        ^ Array with: pageA
>
> with it the example work fine.
>
>
>
> Now i have problem when i have the same seaside application but with reference to  2 different pier site
>
>        i change the code to:
>
>>>
>>>        my goal is to display Pier environment as Seaside subcomponent.
>>>
>>>
>>>        I have some problem  ....
>>>
>>>
>>>        First i create a class:
>>>
>>>                        WAComponent subclass: #TestMultiPier
>>>                        instanceVariableNames: ' siteA siteB tabs task'
>>>                        classVariableNames: ''
>>>                        poolDictionaries: ''
>>>                        category: 'DTR-TestPier'
>>>
>>>
>>>
>>> the
>>>                initialize
>>>
>>>                super initialize.
>>>
>>>                tabs := OrderedCollection new.
>>>
>>>                nomeKernel := 'pier'.
>>>                siteA := PRPierFrame  on: (PRContext kernel: (PRKernel instanceNamed: nomeKernel )).
>
>                nomeKernel := 'anowerpier'.
>               siteB:= PRPierFrame  on: (PRContext kernel: (PRKernel instanceNamed: nomeKernel )).
>
>
>>>
>>>                self initTopMenuFor
>>>
>>>
>>> the
>>>                initTopMenuFor
>>>
>>>                tabs add: 'SiteA      > siteA.
>                tabs add: 'SiteB' -> siteB.
>
>>>
>>> the
>>>
>>>                renderContentOn: html
>>>
>>>                html text: 'Prova gestione multi Pier istance'.
>>>                html paragraph: Time now.
>>>
>>>                self renderTopMenuOn: html.
>>>
>>>                task  ifNotNil:[ html div id: 'divTabMst';
>>>
>>>                                                with:[ html render: task]]
>>>
>>>
>>> the
>>>
>>>        renderTopMenuOn: html
>>>
>>>        html unorderedList id: 'menu'; with: [
>>>                tabs do: [ :each |
>>>                        html listItem: [
>>>                                html anchor
>>>                                        class: (task = each value
>>>                                                ifTrue: [ 'active' ]);
>>>                                        callback: [ task := each value  ];
>>>                                        with: each key ] ] ]
>>>
>>>
>
> With it i d'ont found any very debug problem.
>
> The first rendering of siteA and siteB work fine.
>
> But when click on link of siteA         i have interference on           siteB.
>
> The siteB is update to siteA.
>
>
> Any idea ?
>
>
> I can have more PRPierFrame instances in the same application.
>
>
> Thank,
>                Dario
>
>
>
> _______________________________________________
> Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>



--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Display Pier environment as Seaside component

dtrussardi@tiscali.it

Lukas,

about : I cannot reproduce this problem.


i send you the *-mcz file about my test.



You only need update  the initialize method with the Pier name instance in your image.

( it's work with same name 'pier' )


        nomeKernelA := 'pier'.
       
        nomeKernelB := 'pier'.


After when you browser the example :


        1 : click SiteA

        2: click SiteB

                2A) click on   Information link
                2B) click on Introduction link

        All is ok at this step.


        3: click SiteA and after a sub link  of it ( Information link for example in the default Pier )


        4: click SiteB NOW this page are update at point 3 selection

                                                NOT  at the last 2B  state.


I hope this help you to reproduce the problem.

I remain in every way on disposal for eventual explanations.

Thank,
       
                Dario
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki

DTR-TestPier-DTR.2.mcz (2K) Download Attachment