Hi,
is there any photo gallery available for Pier? I mean a widget where I
could upload pictures and they are rendered in a nice way. I started
one 4 years ago but I abandoned it.
Bye
--
Damien Cassou
http://damiencassou.seasidehosting.st
Hi,
I am slowly migrating to Pier2 and I stumbled across a slight difference in the way value links work. In particular, I have the following issues:
- +>value:structure+ used to display the title of the current structure, but now it embeds the complete structure. I played with different variations of specifying a title attribute (e.g., +value:structure|title+) but it did not work
- +value:children|link+ used to display a link to all the children, but now it simply embeds all children
I tried to debug these issues, but I did not manage to understand what is wrong. Am I using it in an obsolete way, or is this a bug?
Cheers,
Doru
--
www.tudorgirba.com
"Yesterday is a fact.
Tomorrow is a possibility.
Today is a challenge."
Hi,
I've noticed a problem with cookies enabled and Pier. The problem arises
when you browse to a URL without the continuation key, which causes a new
instance of the application to be created ie PRPierFrame new. You can see
the issue with the following single page WACounter Pier app:
| rootPage |
rootPage := (PRPage named: 'rootPage') contents: '+counter+'; yourself.
rootPage localEnvironment: ((PRComponent named: 'contents') componentClass:
PRContentsWidget; yourself).
rootPage addChild: ((PRComponent named: 'counter') componentClass:
WACounter; yourself).
PRKernel reset.
(PRPierFrame registerAsApplication: 'pier' kernel: (PRKernel named:
'testKernel' root: rootPage)) preferenceAt: #useCookies put: true.
Browse to localhost:xxxx/pier you should see the familiar counter component.
Increment the counter a few times. Now open a new tab, browse
to localhost:xxxx/pier and decrement the counter a couple of times. Return
to the first tab and try incrementing again. The counter will increment from
the value of the second counter.
I tested the same code snippet in Pier 1 on Seaside 2.8 and the component
increments from the value on the page ie it behaves as you'd expect a
Seaside component to behave.
The problem appears to arise in:
WASession>>#handleFiltered: aRequestContext
| key continuation |
key := aRequestContext request fields
at: self actionField
ifAbsent: [ ^ self start ].
continuation := continuations
at: key
ifAbsent: [ ^ self unknownRequest ].
continuation value
if there is no continuation key, #start is called on the session, which
creates a new root component. I have a fix, though it's in such a core part
of Seaside, I'm hesitant to suggest it. If I change WARenderLoopMain>>#start
from:
start
| root |
root := self createRoot.
self session properties at: #presenter put: root.
self prepareRoot: root.
((self application preferenceAt: #renderPhaseContinuationClass) new)
> captureAndInvoke
to:
start
| root |
root := self session presenter.
root ifNil: [
root := self createRoot.
self session properties at: #presenter put: root.
self prepareRoot: root ].
((self application preferenceAt: #renderPhaseContinuationClass) new)
> captureAndInvoke
...the root component is recovered from the session (if present) and no
longer created.
Is this a valid fix?
Thanks
Nick
Hi,
I had a component in Pier which included in a rendering message:
html div class: 'grey_copy14'; style:
'background-image:url(img/faq_title.gif);'
If you can ignore my poor style with inline css, when 'img/faq_title.gif'
wasn't present, PRPierFrame>>#notFound is called. This then caused a new
component to be created and my context to be reset (see my previous post
"sessions, continuation keys, restful urls and component state")
Even if we fix the new component creation but it still seems unnecessary
that for images #notFound resets the structure and view:
notFound
"This method is called whenever the current request cannot be resolved to a
> structure."
self context: (self context
structure: self context root
view: PRNotFoundView)
I propose a fix to only redirect if the MimeType is non-binary, something
along the lines of
notFound
"This method is called whenever the current request cannot be resolved to a
> structure."
self requestContext request mimeType isBinary ifTrue: [ self requestContext
> responseGenerator notFound ]
self context: (self context
structure: self context root
view: PRNotFoundView)
Assuming others think this is a reasonable idea, a problem arises in that
WARequest doesn't implement #mimeType. I'd propose
refactoring WAExternalFileLibrary>>#mimetypeForRequest: and
WAFileLibrary>>#mimetypeFor:
Does that seem a reasonable course of action?
Nick
Yes I was refering to one click image and what it needs from os to work like
pdf generation for instance.
Thanks!
Davorin
On May 12, 2011 7:25 PM, "Lukas Renggli" <renggli(a)gmail.com> wrote:
Take the one-click image from the website. It has all code loaded and
works on Linux, Mac and Windows.
Alternatively you could use the Pier2Configuration and load just what
depends on the Pier-Book package. This works anywhere where Pharo runs
(e.g. on the iPhone). There are no other dependencies, unless you want
to generate a PDF what requires a working LaTeX installation.
Cheers,
Lukas
On Thursday, 12 May 2011, Davorin Rusevljan <davorin.rusevljan(a)gmail.com>
wrote:
> Hello,
>
> what ...
> _______________________________________________
> Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>
--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Hello,
what are the operatin system, and installed packages prerequisites for
Pier Book? What needs to be installed?
Davorin Rusevljan
http://www.cloud208.com/
Trying to set up a site at chaetal.seasidehosting.st and provide
"shorter" URLs (like http://chaetal.seasidehosting.st/about instead of
http://chaetal.seasidehosting.st/pier/about) there I've encountered a
problem. All the tutorials, manuals, FAQs I found say something like
"select your preferred application as default entry point and set the
base-path of your application to "/". I do that but Seaside says (for
example) "/seaside/about/ not found" when I click "About". I don't
remember how we solved this in earlier versions of Seaside and Pier.
And I'm not sure about who is actually responsible for this: Pier,
Seaside or hosting… But I don't see any opportunities at
seasidehosting to do what I want at web-server level. So, how can I do
that with Seaside or/and Pier?
TIA
--
Dennis Schetinin