I have this recurring pattern that pier doesnt appear to handle at all
well, so would be grateful for ideas.
I want to embed a component that "does stuff" then when it is finished
goes back to, whence it came.
Better still I would like to be able to go to a page, with an embedded
component, and when finished return to the place of origin. This would
allow the component to be decorated with other things on that page,
rather than just being a dry form like Commands are. (although
Pier-Annotations can spice them up a bit)
For example, I have a "New User Registration" component written for
seaside. It would normally be invoked via a "call", and would return
something or nil if the user cancelled. I am not so interested in the
return value.
So if I pop this component in to pier, I can get to it via a link, and
when I have finished "doing stuff", or if I click "cancel", then it
does... nothing. Ideally I want it to go back to the source of the link,
from whence I came.
I have never found a non-hacky way of doing this. The only clean way of
doing such things appears to be to wrap your component into a command.
I was kind of hoping that LightBox links could be persuaded to close if
the component drawn answers nil.
Solution's I have contemplated...
1) Have contexts keep a history so at least you can find out where to
return to.
Have pier handle all seaside components not just root components, any
answers that are received from a component, are put into
PRContext-properties in case anyone cares, and embedded components may
propagate their answers out to the PRContentsWidget which then uses the
History in the PRContext to go back to whence you came.
2) Some special form of link, which stores the current structure
somewhere, before going to the next destination.
any ideas?
Keith
I have always found this to be a bit of a weakness of pier's.
Name: Beach-Pier-kph.5
Author: kph
Time: 6 April 2009, 11:02 pm
UUID: 554b045a-54d7-47e0-9f21-b94b06e381ac
Ancestors: Beach-Pier-kph.4
Finally the ViewRenderer (or custom subclass) can have complete control
over the display of the content AND the header
PRContentsWidget is knobbled so as to not display the header.
PRViewRenderer now displays the "title", for standard Pages, or the
more interesting PRPageWithHeader.
PageWithHeader - Uses the above to render a "header document" *for more
interesting headers)
Hooks for providing custom subclasses of all renderers
There is nothing in the permissions system which allows a page to be
displayed only for logged out (not logged in) users.
How about +page|loggedout++page|loggedin+ or similar?
Keith
I have a subclass of PRMenuWidget which renders, however it now renders
with paragraphs, where it did not before.
Previously components were rendered by the PEViewRenderer which
maintains "withinContent", however now components are rendered by
"PREmbeddedRenderer" and have no knowledge of "withinContent"
is this a bug? Or is my menu widget abusing the new way of doing things?
Keith
I am still struggling to work PRDocuments.... I have a layout, I put a
PRDocument in it...
and the code....
document
^ self documentOf: self context structure
returns the structure of the PRDocument....
surely it should be
^ self documentOf: (PRCurrentContext value structure)
Keith
Hi everybody,
I have a question with PRMenuWidget. I have a menu where I have background
images for each menu item and the name of the link is inside the image. For
example, I have a home.gif where that picture has the background image with
the "HOME" written inside.
If I do this (in settings):
- *Contact us>/Contact us*
PRMenuWidget puts me in menu ul li the name ("contact us) and there is the
href. However, what I want is:
- Don't show any text in menu ul li
- The href I want it for the whole menu ul li (the whole div) not only the
text. I mean, I want that the user can click all over the menu background
image.
Now, the question is, can I do this with PRMenuWidget ? If true, how ? If
not, what should I do ? make my own menu seaside component ?
Thanks in advance for the help.
Mariano
I discover that it is possible to add #isEditable to a PRWidget, so that
the setting will appear in the Edit rather than the settings page. A
nice bug I think.
However, isEditable's are not currently ignored from the
settingsDescription.
Keith
Hi folks,
I have a menu with images as background and the first and the last ones are
different from the others (the one that are between them).
See for example this:
http://www.templatesbox.com/premium-templates/website-templates/template213…
"About us" and "Contacts" are different from "adventure guide", "tours
review" and "bike news".
How can I specify different classes for them ?
this is my css:
I have something like this in my css:
.menu ul {
margin: 0;
margin-top: 0em;
padding-bottom: 0em;
list-style-type: none;
}
.menu ul li {
float: left;
display: inline;
margin: 0px;
margin-right: 0px;
list-style-type: none;
background-image: url(menutemplate0.gif);
border: 0px;
width: 170px;
height: 40px;
text-align: center;
align: center;
vertical-align: middle
line-height: 40px;
}
.menu li a {
align: center;
padding-left: 30px;
}
Thanks in advance,
Mariano