I'm a little bit further in understanding the structure
stuff with settings and environment.
Is there a way to have one environment rendered
inside another one. In bigger sites you have nested
layouts. As an example:
Title
-> navigation bar
-> sub navigation bar 1
- component 1
-> sub navigation bar 2
- component 2
-> about section without nav bar
To me it appears that in pier I would always have to
provide the whole layout even if only component 1 and
component 2 differ by the sub nav bars. So the environment
for component 1 would include all stuff for
Title, navigation bar and sub navigation 1
and component 2 would include all layout for
Title, navigation bar and sub navigation 2
Or is there a way to nest them properly to have every
single layout only once?
Norbert
Hi,
last week I did a new start on pier (ok, I do this every
couple of months :) ). I did an application in the late
2006 I'm now trying to ressurect. I developed myself an
external component tree that has a configuration for the
whole site. It has several display modi and makes heavily
use of Announcements to switch/show stuff.
Now I'm thinking that I could benefit by exchanging my
component tree with pier. This way it would be more
flexible and a lot of decorating html stuff could be
managed by pier.
In the project I also use magritte. I'm not very familiar
with pier so my questions might be very stupid.
- How do I embedded any magritte object on a page? In my
code I just do anObject asComponent. Is there an easy
way to just integrate objects on a page. It needs some
tricks in order not to display all the time the same
object. I think yo know what I mean
- If there is a good solution for the above is there a
solution for displaying individual slots of an object?
I mean to have access to an individual component class
for an instance variable. The most difficult thing
(while developing the project) was to layout the
magritte forms. I would like to see something like
+mySuperObject/@title+
+mySuperObject/@text+
to display the component classes of the object and
dealing with the rest of the html the pier way.
There are more questions to come :)
Norbert
Good day all,
I am looking at the Magritte/Pier "bible" (Reng06a.pdf) Sec 2.3.2 (page 8)
Object Relational Mapping. I decided I would take a stab at implementing:
"In a very similar way, we are able to automatically create SQL statements
to store, load and query objects from a relational database". Any one care
to offer hints? I am very much a novice at all these patterns and things, so
I am guessing a Visitor pattern of sorts (I HAVE been studying the Gang of
Four bible tho ;)....
Here is what I have so far:
MADescription:
added methods:
>> toSql: anObject ^self toSql: anObject writer: self sqlWriter.
>>sqlWriter ^self propertyAt: #sqlWriter ifAbsent: self class
defaultSqlWriter.
class>>defaultSqlWriter ^SQLWriter
And I have created MAWriter subclass SQLWriter with one instance variable
'sql'
SQLWriter>>defaultWriteStream
^((sql isNil ifTrue: [ sql := String new]) writeStream).
SQLWriter>>write: anObject description: aDescription to: aStream
anObject isNil ifTrue: [ ^ aDescription undefined ].
^ super write: anObject description: aDescription to: aStream which,
looking at it now, I really shouldn't need to override
Then there are the visiting method which are going to be the reall tricky
part.
SQLWriter>>visitContainer: aDescription
aDescription memento model isNil "we have a NEW model object so
INSERT" will this work????? heh
ifTrue: [ stream nextPutAll: 'INSERT INTO '; nextPutAll:
aDescription table; nextPutAll: ' VALUES ('; cr ] where does the table
method come in? hmmm
ifFalse: [ stream nextPutAll: 'UPDATE '; nextPutAll aDescription
table; cr; nextPutAll: 'SET ' ].
And then I will need to add something like:
aDescription do: [ :desc | self write: something description: desc
stream: stream ] What something goes here I am still scratching my head
about...
Any help/suggetions with this last part would be greatly appreciated.
Also, I have started to get used to looking at the unit tests to figure out
what things are supposed to do, then I noticed that there are NO tests for
MAVisitor and subclasses. Why is that? (Or am I missing something?)
Thanks in advance for any advice
John McKeon
Lukas - I noticed today that http://piercms.com (i.e. without the www)
points to SeasideHosting not www.piercms.com.
David
----
1 Squeak/Seaside/Pier site deployed
Lukas - Care to talk a little bit about the new import/export
functionality? I haven't had a chance to look at the code yet. What
is the overall strategy? Is there a way to hook my own data into the
process?
David
----
1 Squeak/Seaside/Pier site deployed
Since PULogin is a PRCommand, if I am using PRImagePersistency, then
every time someone logs in a snapshot is scheduled. That isn't the
behavior I want. I there a "clean" way to keep logins from triggering
a snapshot?
Thanks,
David
----
1 Squeak/Seaside/Pier site deployed
Is there any "correct'" way to render classes inhereted from PRCase? Here
are the details:
I want to represent an object, say Clinic with fullDescription, address,
etc. attributes. Currently I do such things the way I saw in Pier-Blog. I.e.
I overloaded Person>>viewComponentClass to return PersonView. And there I do
something like:
renderContentOn: html
super renderContentOn: html.
self renderFullDescriptionOn: html.
self renderAddressOn: html.
self renderDoctorsOn: html
It works ofcourse, but I feel there should be another way to explain Pier
(or Magritte?) how to render Clinics as far as I described them.
And another part is about doctors. They are instances of Doctor which is
surely inhereted from PRCase and properly described. I want to give a list
of doctors in context of the clinic. Items of the list should represent some
short form of doctors, I mean show some of Doctor's attributes. And when one
of the doctors is selected I want all the information to be presented.
Now I do it just the same way:
- #renderDoctorsOn: outputs short information about each of them in
context of the clinic
- full Doctors information is rendered by DoctorView component.
The question is just the same: I feel there must be another way to do it
using metainformation I give about Doctors (and Clinics). Is there a
"canonized" one?
And one more thing: I saw people mentioned "Tutorial" but I don't know where
to get it. Perhaps it's where all answers are already given? :)
--
Dennis Schetinin
Hi,
I need to download the source code of olders versions of smallwiki, where
can i found then?
I need the version 1.54, 1.90 and 1.304
best regards!
--
Victor Hugo de C. Fernandes
Mestrando do Programa de Pós-Graduação em Sistemas e Computação - UFRN
Analista de Sistemas / Superintendencia de Informática - UFRN
> I wondered if you'd be able to give me a bit of a Magritte pointer. At the
> moment I'm thinking I need to support a many-to-many relationship, and I
> can't see anywhere Magritte provides such support. I'm wondering (a) whether
> there's support and (b) whether I even need it.
Have a look at the subclasses of MARelationDescription, depending on
your exact requirements maybe also just MAOptionDescription
subclasses.
> I've got two lists, list A is the set of stuff from which list B could be
> built. The two lists belong to different objects. There's already support
> for this in MAListCompositonComponent.
This one is used by MAMultipleOptionDescription.
> However, I then need support to go back and put stuff back from list B into
> list A, in the same form as was previously used to populate it, long after
> the original construction was done. MAListCompositonComponent seems to be
> one-way (ie, the model supports the idea of a list of stuff on it, ie one to
> many).
As far as I understand this is possible with
MAMultipleOptionDescription. Have a look at the references to this
class in Pier for sophisticated examples on how to use it.
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch
Hi,
Just giving the latest pier a spin (downloaded from the website)...
Is the default password for the admin of seaside still admin/pier ? It
does not seem to accept it when I try to enter the /seaside/config area
----------------------------
Johan Brichau
johan.brichau(a)uclouvain.be