Hello,
I have 13000+ users validation records in a database, so I thought I
would be clever. I define a pier user, role-dbuser, and use this as a
template for creating a "User whose validation is certified by the
database" on the fly.
Since it is created on the fly and is not known by PRKernel-users, nor
is the User-Groups relation maintained, so the groups are only aware of
the template user 'role-dbuser'.
This works fine until the check on groups permissions in
PUSecurity-validateCommand: which reads;
(self group notNil
and: [ (self group includes: aCommand context user)
So I turned it around to read the following, and implemented PUUser
includesGroup:
(self group notNil
and: [ (aCommand context user includesGroup: self group)
I thought that you might consider this tweak useful.
best regards
Keith
I just committed this to http://mc.lukas-renggli.ch/pieraddons
Magritte-ComponentDecorations-kph.1.mcz (note it has a pier extension in
it too)
This package allows a magritte description to specify decorationClasses:
These are added at component creation time and they pick up their
parameters from the description's properties (unless I can think of a
better way).
example:
WSLogin-descriptionUsername
^ (super descriptionUsername)
decorationClasses: (Array with: MAAnnotationDecoration ) ;
propertyAt: #postAnnotation put: '(6-12 letters)';
yourself
pier wiki text annotation
WSLogin-descriptionUsername
^ (super descriptionUsername)
decorationClasses: (Array with: PRAnnotationDecoration ) ;
propertyAt: #postAnnotation put: 'or
*Register>/Environment/RegistrationComponent*';
yourself
best regards
Keith
I have a seaside call like this:
result := self call: (SurveyResponse new asComponent addValidatedForm;
yourself).
I can't figure out how to get the css to be applied to this component.
(Having SurveryReponse implement #style doesn't do it, nor does having it
defined in the class making the call do it).
thanks guys
the folowing worked. i realised i had to use addAll not add
MyObject>>description ^ super description copy addAll: self customDescription; yourself> Date: Thu, 9 Aug 2007 20:53:55 +0200> From: damien.cassou(a)gmail.com> To: smallwiki(a)iam.unibe.ch> Subject: Re: help with Magritte tutorial> > 2007/8/9, isaiah <cappadonza(a)hotmail.com>:> >> > cool thanks lukas> > exercise 18 also ays "Override #description on the instance-side, call super> > and> > compose it with the CustomDescription." what does this mean how do i compose> > it> > I guess it means something like:> > MyObject>>description> ^ super description copy> add: self customDescription;> yourself> > I'm not sure, but I think #copy is important after the call to super.> > -- > Damien Cassou> > _______________________________________________> SmallWiki, Magritte, Pier and Related Tools ...> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
_________________________________________________________________
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE
hey i working through the magritte tutorial excercises. need ome help with
exercise 18. it says "Add a class-instance variable to the MAPersonModel
called CustomDescription. initialize it with an emptyinstance of
maContainer".
i did the following to add a class-instance variable
MAPersonModel class
instanceVariableNames: 'CustomDescription'
how do i initialize this variable
if i override the initialize method on the class
i get the follwoing warning from system browser "initialize is used in the
existing class system, overriding can cause serious problem is this really
what you want to do ?"
am i doing something wrong, can some one help me ?
im not sure what the difference between class variable and class-instance
variable
--
View this message in context: http://www.nabble.com/help-with-Magritte-tutorial-tf4242237.html#a12071267
Sent from the SmallWiki mailing list archive at Nabble.com.
Hi,
isn't validate supposed to be called on componentClasses?
I have a component generated from asComponent. I added
a componentClass to one of the descriptions. If I call component
validate I would have expected that the validate of my
componentClass is also called.
Do I misunderstand something or is it likely I did something
wrong?
thanks,
Norbert
I'm trying to make a custom header as a subclass of PRHeaderWidget.
I'd like it to have a title and a subtitle so I made
subtitleDescription, defaults, and accessor inspired by the ones for
title in PRHeaderWidget.
Changing the subtitle from the Settings command works, but not the
title. As far as I understand it, the PRComponent holds the state to
configure instances of the PRHeaderWidget. When changing its settings,
it will update that state, unless it has fields with the same name.
In this case, #title from PRComponent is masking the one in
PRHeaderWidget, so when I change the Title from the web, I'm changing
the structure instead of the seaside component configuration... is
this really wanted? shouldn't the Edit command modify the structure
and Settings the component settings? Or was the idea that Edits are
persisted but not Settings ?
--
Damien Pollet
type less, do more [ | ] http://typo.cdlm.fasmz.org
Hi,
I committed Pier-Model-cdlm.159 and Pier-Seaside-cdlm.186.
I tweaked #updateUrl: to not add the view and command parameters if
the values are the default ones that would be guessed by
PRPiermain>>commandFrom:
Hopefully the patch makes sense, please review :)
--
Damien Pollet
type less, do more [ | ] http://typo.cdlm.fasmz.org
Hi,
I have tried various ways to accomplish this, so far with limited
success, any pointers would be appreciated :-)
Here is my scenario:
- a user fills in a web form on a non-Pier web site
- the form is submitted via HTTP post to a URL on the Pier site, like so:
http://the.piersite.net/seaside/pier?command=DoSomething
- DoSomething is a PRCommand that requires a login
- the user logs in
- Pier shows a confirmation form that summarizes the data from the original form
- user clicks OK
- DoSomething is executed
- Pier shows the home page of the user
http://the.piersite.net/seaside/pier/accounts/joeuser?command=PRViewCommand
I can have DoSomething execute successfully, but I cannot make the
change to the users home page.
Maybe my approach is wrong:
- I use Seaside 2.7b with the latest Pier, Magritte etc
- I use Pier Unix security
- DoSomething is a PRCommand that implements isValidIn: aContext on
the class side as aContext isLoggedIn. This, together with configuring
PUPierMain as the main class will invoke the on-the-fly login.
- I have a made a patch to PRPierMain>>commandFrom: such that the
newly created PRCCommand will have a chance to read additional data
from the external HTTP Request (inside DoSomething>>processRequest:)
- DoSomething answers a custom subclass of WAComponent (say,
ConfirmView) in its asComponent method
- the ConfirmView knows the DoSomething command so it can display the
users data, with a button "Confirm". Clicking the Confirm button will
send the message confirm to the view
ConfirmView>>confirm
command user: self context user..
command execute
- I can see that the command executes successfully. Inside
DoSomething>>execute I have
self
answer: (self context
structure: self user account "account is
a PRStructure"
view: UserAccountView)
- I have inspected the command at this point, and answer gets the
right contents.
- However, when I click on the button, the Confirm view just stays there.
Do you see any chance to get this working? I have tried to look at
Pier Blog and others, but they all seem to use #answer: without
problems.
I'd be thankful for any hints, or alternative ways to achieve the page
flow I described.
Cheers
Matthias
Hi,
I'm trying to see the albatross tests running. These
require pier to run. I installed pier from universes
(production and beta) but had no success using the
newest version from squeaksource.
In pier-beta I get
Internal Error
MessageNotUnderstood: UndefinedObject>>default
[] in WAApplication>>updateRoot: {[:each | each default updateRoot:
anHtmlRoot]}
Which versions should I use?
thanks,
Norbert