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
I found that pasting a 'long dash' character into a pier page results in
the contents being rendered like so
—
<���?���x���m���l���
���v���e���r���s���i���o���n���=���"���1���.���0���"���
���e���n���c���o���d���i���n���g���=���"���U���T���F���-���8���"���?���>���<���!���D���O���C���T���Y���P���E���
���h���t���m���l��� ���P���U���B���L���I���C���
���"���-���/���/���W���3���C���/���/���D���T���D��� ���X���H���T���M���L���
I am using the standard WAKom.
best regards
Keith
==
fyi: using pier-beta in 3.10 dev image
Yes, the code I gave you at that time won't work in Seaside 2.8.
WARenderLoop has been completely rewritten to avoid the need to store
many unnecessary continuations. This greatly reduces the memory
requirements per session.
What I suggest to do is that you implement a decoration that you can
add around your component. Inside this decoration you store the
context-holder and wrap the rendering and callback processing into
PRCurrentContext use: contextHolder during: [ ... ]
HTH,
Lukas
On 02.08.2007, at 22:20, Keith Hodges wrote:
> Hello Lukas,
>
> a while ago you gave me this code. Now I am using the latest
> seaisde 2.8 it doesnt work as I would like. The widgit works but
> its callbacks fail. Any thoughts on what may have changed?
>
> cheers
>
> Keith
>
>
> From: Keith Hodges <keith_hodges(a)yahoo.co.uk>
> Date: 27. Juli 2007 04:30:25 GMT+02:00
> To: "small >> \"SmallWiki, Magritte, Pier and Related Tools ...\""
> <smallwiki(a)iam.unibe.ch>
> Subject: Help needed to run widgets in other contexts
> Reply-To: "Magritte, Pier and Related Tools ..."
> <smallwiki(a)iam.unibe.ch>
>
>
> Help!
>
> Hi All,
>
> A while ago Lukas gave me the following code for opening a pier widget
> so that it would be able to access its context even though we are not
> even in a pier application!
>
> self - is my control panel which runs in the WADispatcherEditor's
> session.
> widget is PUUsers or PUGroups
>
> ControlPanel-callWidget: widget titled: title
>
> PRCurrentContext use: self during: [
> WARenderLoop new call: (widget
> addDecoration: (WAWindowDecoration new
> title: title;
> yourself);
> yourself) ]
>
>
> This works to the extent that the widget displays correctly,
> however the
> buttons do not work due to PRCurrentContext value being nil.
>
> I am using the latest everything in the development universes.
>
> Does anyone have any ideas?
>
> thanks in advance
>
> Keith
>
>
> _______________________________________________
> SmallWiki, Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>
>
>
--
Lukas Renggli
http://www.lukas-renggli.ch
Hello,
I was updating my Pier installation (using Pier-Seaside-lr.182 and
others), it stumbled at
PRPieronfiguration>>ancestors
^ Array with: WARenderConfiguration new
not knowing the class WARenderConfiguration. Replacing this with
WARenderLoopConfiguration works OK so far.
I am running seaside 2.7b1. Looks like the ancestors method comes from
Pier-Seaside-lr.182. Maybe WARenderLoopConfiguration got renamed to
WARenderConfiguration in Seaside 2.8?
Is it OK to use WARenderLoopConfiguration here? If not, where can I
get WARenderConfiguration ?
best regards
Matthias