hi all :)
The problem is here: http://kamikaze.seasidehosting.st/
How can setup Pier so it will not show all these "Add,Remove.." in Commands
section. The only available items could be Login and maybe View. I want to
setup Pier to get menu items like here: http://www.lukas-renggli.ch/ :)
Thanks
I'm using Ramon Leon's MagritteGlorp package, which ties together the
extremely useful Magritte and Glorp packages, but must not be using
it quite correctly. When registering an object that has a reference
to an already stored object, it seems to attempt re-insert the
referenced object. For example:
objA := ADescriptorSystem getSession execute: (A find where [:ea | ea
name = 'hello']).
objB := B new.
objB a: objA.
session := B getSession.
session beginUnitOfWork.
objB register: objB.
session commitUnitOfWork.
raises a 'GlorpDatabaseWriteError: ERROR: duplicate key violates
unique constraint' error. I thought it might be because I am using
one session to load the object and another session to register, but
believe I've also tried doing everything in one session. If it is of
any help, the reference description is of type
MAToOneRelationDescription. On another project, I tried
MAMultipleOptionDescription with the same error. Any ideas on how to
make it recognize the object is already stored and hasn't changed?
Thanks, Brian.
Glorp.rjl.8
GlorpPostload-rjl.3
GlorpPreload-rjl.2
Magritte-Seaside-lr.228.mcz
Magritte-Model-lr.266
MagritteGlorp-rjl.47
Still no luck :( I can't see it in the list. Also I can't see that "#label"
in other PRWidget subclasses.
Ok, I have a "file out" of my package with just one PRWidget subclass:
PRWidget subclass: #PMKHeaderWidget
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'Pier-My-Widgets'!
!PMKHeaderWidget methodsFor: 'rendering' stamp: 'kmz 5/29/2007 03:19'!
renderContentOn: html
html header: 'yoyo'.
! !
!PMKHeaderWidget methodsFor: 'initialization' stamp: 'kmz 5/29/2007 02:52'!
initialize
super initialize.! !
!PMKHeaderWidget methodsFor: 'accessing' stamp: 'kmz 5/29/2007 03:04'!
asLabel
^ 'KmzHeader'! !
!PMKHeaderWidget methodsFor: 'accessing' stamp: 'kmz 5/29/2007 03:16'!
defaultCssClass
^ 'box'! !
!PMKHeaderWidget methodsFor: 'accessing' stamp: 'kmz 5/29/2007 03:16'!
isAbstract
^ false! !
!PMKHeaderWidget methodsFor: 'accessing' stamp: 'kmz 5/29/2007 03:04'!
label
^ 'KmzHeader'! !
------
I have an image running with this package on:
http://kamikaze.seasidehosting.st (editale, feel free to break all :))
Question
I generate a view as follow
view: bd
self call: (bd asComponent readonly: true ; addSwitch ;
yourself)
Now I would like to know how I could get a close button too that
would invoke an answer method?
Question 2.
I have a description....
and I wanted to know how I can specify a default value.
descriptionEditor
^ (MASingleOptionDescription selector: #editor label: 'Publisher'
priority: 400)
options: self editors;
beSorted;
yourself
In fact I would like to select the value of the editor iv
so I tried default: #editor
But it does not work
Stef
Hello everybody :)
How can I create a widget in Pier? For example I want to create
PRHeaderWidget clone as PRKamikazeHeaderWidget. I have a second PRKernel
instance named 'kamikaze', so I want to use my own Header here, but the
original one in the default instance. I've tried to create simple
PRCommandWidget, but after that I had two "Commands" in the
Environment->Header->[Edit]->Component class.
Thanks :)
Hi guys
I would like to know if you have developed an alternative to MAReport
or enhance it.
For now I read:
NOW
" do not use ... this is unfinished, buggy and not working "
Stef
Hi,
is national characters handled correctly in pier (in titles, page
content, search...)?
I have troubles using czech characters in pier wiki pages - example
chars:
http://pf.praguesoft.cz/chars.html
Any suggestions? Thanks! pf
Hi Lukas,
If I remove permission for a page to be viewed, the user can still see
it if he has that page embedded in another.
I suggest that this be fixed in order that an embedded forbidden page
just renders as an empty string.
This makes a way of making user/group specific layout elements, or notices.
cheers
Keith
Hi,
I wrote a few days ago having problems with validate.
The problem is that I have a form for an object which
has references to other objects. The problem for me
is that the validation traverses the whole tree of
objects being referenced. While this is good idea to
be sure the whole data setting is correct it is often
a bad idea in real life. Sometimes I need to create
an object upfront which doesn't validate only to
put this in a form afterwars for edition. But with
the current validation I can't do this.
I can't see the point why it should be necessary to check
everytime every object. As long as you have form entering
some data you only need to check what is being entered.
For a relation description the validateKind should be enough
because it is the constraint on the model.
Lukas, I saw you disabled the traversing for Single and Multiple-
Options. Is there any reason not doing this for the ToOne and
ToMany as well? I just removed the last line
self visit: self object description
from
MAValidatorVisitor>>visitToOneRelationDescription: aDescription
This prevents traversing but still checks for validateKind.
Any objections to remove this from Magritte?
Norbert
I added the following in my image:
MAOptionDescription>>labels: aBlock
"Set the labels for each option by evaluating the block."
|labels|
labels := Dictionary new.
self options do: [:ea | labels at: ea put: (aBlock value: ea)].
self propertyAt: #labels put: labels.
so that is is used like:
descriptionProvider
^ (MASingleOptionDescription new)
selectorAccessor: #provider;
label: 'Staff';
reference: ALStaffMember description;
options: ALStorage rootOrg staff;
labels: [:ea | ea fullName];
priority: 20;
yourself
This is very helpful for me using SingleOptions that are pointing to
dynamic lists; is there already a way to do this without modifying
Magritte?
- Brian