Hi everyone,
I've just got started with Magritte and have a couple of new-bee
questions.
1. I have a MAMultipleOptionDescription and the options come from
sending #availableOptions to the current instance. I can't see how i
would do this with #asDynamicObject
2. I have a SingleOptionDescription with a dynamic options object -
can i provide a display block or how would i control what is displayed
in the popup. I found an optionsAndLables but it doesn't take a
dynamic object.
Does anyone know how to achieve this, or can point me to the
appropriate documentation. Sorry for the simple questions.
Thanks in advance,
Phil
------------------------
Phil Blake
Information Systems
Retail Information Systems Pty Ltd
Level 2, 35 Spring Street
Bondi Junction, NSW, 2022
Cell: 0438 55 0000
Fax: 1300 747 001
Email: phil.blake(a)retailinfo.com.au
Web: www.thinkRIS.com
IMPORTANT NOTICE: The information in this email is confidential and
may also be privileged. It is for the intended recipient/s only. If
you are not the intended recipient, any use or dissemination of the
information and any disclosure or copying of this email is
unauthorised and strictly prohibited. If you have received this email
in error, please promptly inform us by reply email or telephone. You
should also delete this email and destroy any hard copies produced.
Hello All,
I have spent many hours trying to figure out the answer to my problem to no
avail, so I avail myself of your esteemed knowledge.
I am trying to implement the Person Manager in the tutorial. This should be
simple and for the most part it is.
I added the action method below to call the default Person Editor. It gets
called properly but clicking on the Save button does nothing. The halt code
is never reached, i.e. the editor never seems to answer...
PersonManager>>add
| e p |
e := MAPersonEditor new.
p := self call: e.
self halt.
p isNil ifFalse: [ self persons add: p ].
The PersonManager >>renderContentOn: method is implemented as follows:
renderContentOn: html
html heading level: 3; with: 'Person Manager'.
html anchor
callback: [ self add ];
with: 'Add New Person'.
self persons do: [ :p |
html text: p firstName , ' ' , p lastName]
Can anyone tell me what it is that I have failed to implement?
Thanks in advance
John
In pieraddons. Could someone please review it?
Name: Pier-LastUpdatedThe-damiencassou.1
Author: damiencassou
Time: 9 January 2009, 12:50:49 pm
UUID: f592ca33-e55c-465d-a04c-5443630451f8
Ancestors:
- Widget to display a sentence like: 'Last updated the ' + the
timestamp of the current page.
--
Damien Cassou
http://damiencassou.seasidehosting.st
Hi,
Yesterday I had a chain of bad things with my pier image (on production).
First, I learned the bad way that uploafing a 16M file is a bad idea
:(... it hangs my application, maybe not for a problem on pier but my
hosting provider... and very stupid I, that image is the only one who
does not have a VNC server running there so I cannot see what was
happening.
So I tried to start a backup... and there is the problem: last backup
image is from Dec 5 :(
I have a simple image persistence configured there... so I thought I
should have at least one image a day... :( :(
Well, transactions.txt is full of transactions, but I don't know how to
use it for restablish my pier image... what I need to do?
Thanks in advance,
Esteban
pd: of course, right now I'm installing it a VNC server and a few more
things to ensure this will not happen again -at least, it will not
catch me so nude :)
Is it possible to compose an MAReport to use fields from different
objects?
For example, the person editor exercise has a PersonModel that
contains an AddressModel. Right now, an MAReport on the PersonModel
shows the AddressModel instance as one column. Would it be possible
to show only the Country field of the AddressModel (and have the
columns titled 'Country', not 'Home Address') in the report?
Thanks,
David
I have been playing around with Seaside, Magritte and Glorp with the
intention of converting (or just adding to) a web application I started
using Django and Python. The data is stored in a PostgreSQL database.
I have some of the Magritte list views working but one of them wasn't. A
column was not displaying properly. The column should display a
MAToOneRelationDescription, the target object of which had four separate
string components. The list view was only displaying the first of these.
I think the fault is in MAStringWriter >> visitContainer: aDescription. The
original method was like this:
visitContainer: aDescription
aDescription do:
[ :each |
each isVisible ifTrue:
[
each stringWriter
write: (self object readUsing: each)
description: each to: stream.
^ self
]
].
But I think the ^self should be outside the iteration. When I changed the
method to:
visitContainer: aDescription
aDescription do:
[ :each |
each isVisible ifTrue:
[
each stringWriter
write: (self object readUsing: each)
description: each to: stream.
]
].
^ self
I get all four components displayed (unfortunately without any spacing but I
guess that is a separate problem.
Cheers
Steve McCusker
PS My image is sq3.9-7067web08.01.1
I'm trying to find the best way to add a collection into the Pier user
data model.
I located this advice:
"For adding properties like first name, last name and email to a user
the easiest way is to add some Magritte descriptions to PUUser.Add your
new description methods to a new category called something like
*myproject-usermodel so it won't be overwritten when you load new
versions of Pier-Unix-Security from Monticello (the star at the
beginning of the name is essential)."
Can one do this without also adding instance vars in the PUUser class?
And If not, wouldn't those instance vars be overwritten when you load
new versions of Pier-Unix-Security?
In my case it also applies to PUUser>>initialize, which initializes my
empty collection. Won't that be overwritten?
Am I going about this the wrong way?
If I add 'beRequired' to descriptionStreet on the MAAddressModel, the
constraint error message ("Street: Input is required but no input
given") isn't displayed on the personeditor page. What do I need to
do to render the error?
Thanks,
David
I would like to have more control over how Magritte forms are rendered
in Seaside. For example, here is part of the HTML for the
PersonEditor from the Magritte tutorial:
<table><tr><th>
<label for="ajaxMASelectListComponent2159label">Title:</label>
</th><td>
<select id="ajaxMASelectListComponent2159label" name="2">
<option value="3" selected="selected"></option>
<option value="4">Mr.</option>
<option value="5">Mrs.</option>
<option value="6">Ms.</option>
<option value="7">Miss.</option></select>
</td></tr><tr><th class="required">
<label for="ajaxMATextInputComponent3075label">First Name:</label>
</th><td class="required">
<input id="ajaxMATextInputComponent3075label" value="" name="8"
type="text" class="text"/>
</td></tr><tr><th class="required">
<label for="ajaxMATextInputComponent3927label">Last Name:</label>
</th><td class="required">
<input id="ajaxMATextInputComponent3927label" value="" name="9"
type="text" class="text"/>
</td></tr><tr><th class="required">
<label for="ajaxMATextInputComponent1643label">Email:</label>
</th><td class="required">
<input id="ajaxMATextInputComponent1643label" value="" name="10"
type="text" class="text"/>
</td></tr>
Question #1: How can I get HTML more like this?
<fieldset>
<legend>Personal Information</legend>
<div class="fieldbody">
<label for="ajaxMASelectListComponent2159label" class="required
quarter">Title:
<select id="ajaxMASelectListComponent2159label" name="2">
<option value="3" selected="selected"></option>
<option value="4">Mr.</option>
<option value="5">Mrs.</option>
<option value="6">Ms.</option>
<option value="7">Miss.</option></select></label>
<label for="ajaxMATextInputComponent3075label" class="required
newline half">First Name:
<input id="ajaxMATextInputComponent3075label" name="8"
type="text" class="text"/></label>
<label for="ajaxMATextInputComponent3927label" class="required
half">Last Name:
<input id="ajaxMATextInputComponent3927label" name="9"
type="text" class="text"/></label>
<label for="ajaxMATextInputComponent1643label" class="required
full">Email:
<input id="ajaxMATextInputComponent1643label" name="10"
type="text" class="text"/></label>
Question #2: I also want to be able to render forms that are a
composite of multiple objects. For example, I'd like to render the
Address fields inline with the rest of the form (instead of clicking a
button to expand a set of fields or go to another page).
What are my options?
Thanks,
David