Re: About the new PRWidgets

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

Re: About the new PRWidgets

Lukas Renggli-2
Hi Martial,

> As a newbie in Magritte, I don't understand well how the new widgets
> work in Pier. For my personal web site I'm programming in Pier, I
> created a PRBoxWidget instance to encapsulate other widgets.

widgets are essentially just Seaside components, but instead of  
#renderContentOn: you override #renderWidgetOn:. They also provide a  
settings command so that administrators can configure them from the  
web. It is also possible to plug in any Seaside component, e.g. the  
Sushi Store, but these are not configurable from the web.

> In my case, I like to have two instances of my site main class in  
> my disptacher:
> one for admin displaying everything and one for everybody with only a
> PRSearchWidget and a PRTree (no commands, no views); each one pointing
> to the same kernel. So until you don't know the url to access to the
> admin path you don't see the 'login' link.
>
> I did this using:
>
> PRBoxWidget subclass: #MyNavigationWidget
> instanceVariableNames: 'adminPool userPool' ...etc
>
> MyNavigationWidget>>#renderContentOn:
> self adminConfigFlag ifTrue:
> [adminPool do: [:ea | html render: ea] separatedBy: [html
> break]]
> ifFalse:
> [userPool...
>
>
> with adminConfigFlag being a simple boolean in the associated  
> WAConfiguration..
>
> MyNavigationWidget>>#initialize
> super initialize.
> adminPool := Array with: PRTreeWidget new with: PRCommandsWidget
> new with: PRViewsWidget.
> userPool := Array with: PRTreeWidget new with: PRSearchWidget
>
> Not a beautiful OO way to do things but it worked. But now I am a bit
> lost. If you understand what I mean (and you have time), I'll be glad
> you shortly explain where to look for to change this in the new way
> because now it doesn't work.

The new way? I guess I didn't change anything special there, just the  
way components get initialized using Magritte? If this breaks  
something this was not intentional. Maybe you need to reset the  
settings of the widgets.

> It's maybe a easy task to do but I don't know how to rethink my
> interface.

Did my latest changes break something in particular? Do you have a  
stack trace? What is the particular problem?

> PS: great change in visitParagraph: . It's cool. I did those kinds of
> modification in order to avoid a <div class='paragraph'> in the  
> start of
> the default page (as I need to manage two absolute divs). Your way  
> is better.

Thanks. I wanted to blog about that. This is absolutely needed to  
create sophisticated CSS layouts ...

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch



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

Re: About the new PRWidgets

Martial Boniou
Lukas Renggli a écrit :
| Hi Martial,
|
| > As a newbie in Magritte, I don't understand well how the new widgets
| > work in Pier. For my personal web site I'm programming in Pier, I
| > created a PRBoxWidget instance to encapsulate other widgets.
|
| widgets are essentially just Seaside components, but instead of  
| #renderContentOn: you override #renderWidgetOn:. They also provide a  
| settings command so that administrators can configure them from the  
| web. It is also possible to plug in any Seaside component, e.g. the  
| Sushi Store, but these are not configurable from the web.

I had understood this yet, so It is probably something else.
I tried to edit environment and add a '+tools+<br/>' to add my own
widget in pier. And when I click on the link to create a new Component,
I get a DNU.

I attached the debug message.

--
Martial Boniou


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

stack.txt (44K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: About the new PRWidgets

Lukas Renggli-2
> | > As a newbie in Magritte, I don't understand well how the new  
> widgets
> | > work in Pier. For my personal web site I'm programming in Pier, I
> | > created a PRBoxWidget instance to encapsulate other widgets.
> |
> | widgets are essentially just Seaside components, but instead of
> | #renderContentOn: you override #renderWidgetOn:. They also provide a
> | settings command so that administrators can configure them from the
> | web. It is also possible to plug in any Seaside component, e.g. the
> | Sushi Store, but these are not configurable from the web.
>
> I had understood this yet, so It is probably something else.
> I tried to edit environment and add a '+tools+<br/>' to add my own
> widget in pier. And when I click on the link to create a new  
> Component,
> I get a DNU.
>
> I attached the debug message.

I know this problem, it occurred to me a few hours ago as well and I  
fixed it, but did not commit yet. Pier-Seaside-lr.158 probably fixes  
your problem.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch



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

Re: About the new PRWidgets

Lukas Renggli-2

On 19 Apr 2007, at 16:59, Lukas Renggli wrote:

>> | > As a newbie in Magritte, I don't understand well how the new
>> widgets
>> | > work in Pier. For my personal web site I'm programming in Pier, I
>> | > created a PRBoxWidget instance to encapsulate other widgets.
>> |
>> | widgets are essentially just Seaside components, but instead of
>> | #renderContentOn: you override #renderWidgetOn:. They also  
>> provide a
>> | settings command so that administrators can configure them from the
>> | web. It is also possible to plug in any Seaside component, e.g. the
>> | Sushi Store, but these are not configurable from the web.
>>
>> I had understood this yet, so It is probably something else.
>> I tried to edit environment and add a '+tools+<br/>' to add my own
>> widget in pier. And when I click on the link to create a new
>> Component,
>> I get a DNU.
>>
>> I attached the debug message.
>
> I know this problem, it occurred to me a few hours ago as well and I
> fixed it, but did not commit yet. Pier-Seaside-lr.158 probably fixes
> your problem.

Take Pier-Seaside-lr.159, that fixes one more issue related to that  
(#description that returns a string for Seaside components).

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch



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

Re: About the new PRWidgets

Martial Boniou
Thanks for the quick correction of this PRComponent message. It works!

--
Martial Boniou

Lukas Renggli a écrit :
|
| On 19 Apr 2007, at 16:59, Lukas Renggli wrote:
|
| >> | > As a newbie in Magritte, I don't understand well how the new
| >> widgets
| >> | > work in Pier. For my personal web site I'm programming in Pier, I
| >> | > created a PRBoxWidget instance to encapsulate other widgets.
| >> |
| >> | widgets are essentially just Seaside components, but instead of
| >> | #renderContentOn: you override #renderWidgetOn:. They also  
| >> provide a
| >> | settings command so that administrators can configure them from the
| >> | web. It is also possible to plug in any Seaside component, e.g. the
| >> | Sushi Store, but these are not configurable from the web.
| >>
| >> I had understood this yet, so It is probably something else.
| >> I tried to edit environment and add a '+tools+<br/>' to add my own
| >> widget in pier. And when I click on the link to create a new
| >> Component,
| >> I get a DNU.
| >>
| >> I attached the debug message.
| >
| > I know this problem, it occurred to me a few hours ago as well and I
| > fixed it, but did not commit yet. Pier-Seaside-lr.158 probably fixes
| > your problem.
|
| Take Pier-Seaside-lr.159, that fixes one more issue related to that  
| (#description that returns a string for Seaside components).
|
| 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
Reply | Threaded
Open this post in threaded view
|

Re: About the new PRWidgets

Martial Boniou
In reply to this post by Lukas Renggli-2
I found the problem I got. My object MyNavigationWidget is child of
PRBoxWidget so according to the new design I had to add the both class
method: #defaultCssClass and #defaultCssName.

Maybe the PRBoxWidget should have dumb defaults for description or a
'shouldbeimplement'?

--
Martial Boniou

Lukas Renggli a écrit :
| > | > As a newbie in Magritte, I don't understand well how the new  
| > widgets
| > | > work in Pier. For my personal web site I'm programming in Pier, I
| > | > created a PRBoxWidget instance to encapsulate other widgets.
| > |
| > | widgets are essentially just Seaside components, but instead of
| > | #renderContentOn: you override #renderWidgetOn:. They also provide a
| > | settings command so that administrators can configure them from the
| > | web. It is also possible to plug in any Seaside component, e.g. the
| > | Sushi Store, but these are not configurable from the web.
| >
| > I had understood this yet, so It is probably something else.
| > I tried to edit environment and add a '+tools+<br/>' to add my own
| > widget in pier. And when I click on the link to create a new  
| > Component,
| > I get a DNU.
| >
| > I attached the debug message.
|
| I know this problem, it occurred to me a few hours ago as well and I  
| fixed it, but did not commit yet. Pier-Seaside-lr.158 probably fixes  
| your problem.
|
| 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
Reply | Threaded
Open this post in threaded view
|

Re: About the new PRWidgets

Lukas Renggli-2
> I found the problem I got. My object MyNavigationWidget is child of
> PRBoxWidget so according to the new design I had to add the both class
> method: #defaultCssClass and #defaultCssName.
>
> Maybe the PRBoxWidget should have dumb defaults for description or a
> 'shouldbeimplement'?

Strage, what kind of error did you get? I assumed that this is not  
required to be implemented.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch



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

Re: About the new PRWidgets

Martial Boniou
Sorry for the late response; I was far from computers. Actually what I
did in the past pier was a PRWidget containing PRWidget children. By
doing this I got the attached error now.

Thanks for looking at this,

--
Martial Boniou

Lukas Renggli a écrit :
| > I found the problem I got. My object MyNavigationWidget is child of
| > PRBoxWidget so according to the new design I had to add the both class
| > method: #defaultCssClass and #defaultCssName.
| >
| > Maybe the PRBoxWidget should have dumb defaults for description or a
| > 'shouldbeimplement'?
|
| Strage, what kind of error did you get? I assumed that this is not  
| required to be implemented.
|
| 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

bugPR.txt (69K) Download Attachment