Dynamic pages and something like WATask for pier
norbert at hartl.name
Fri Mar 26 19:57:03 MET 2010
On 26.03.2010, at 19:14, Lukas Renggli wrote:
>>>> My problem is that PRComponent only takes componentClass and creates a new component each time. So I need a good way to add an existing component to PRComponent or something similar. Maybe there is another good approach how to inject state into a PRComponent component.
>>> A new Seaside component is instantiated per embedded-link and per
>>> session. That means, if you re-render the same link you get the same
>>> component instance with the same state.
>> Ah... good to know. I'm more after the initial state. I have a component that has a certain object. If I want to link to this PRComponent and want to let it know about this particular object which way would you go? Is there way to do this with pier functionality?
> If your component is described and the attribute descriptions have
> their #parameterName: set, then you can initialize these attributes
> from the link: +comp|param1=value1|param2=value2+
Well, it is hard to tell what I mean. Ok, let's assume you have user object and that object can hold an instance of another object, let's say a company object that has an address. The editor on the web page has a select list of the available companies and a link to create a new one. That link should be a guided tour to create a new company with three steps. Let us further assume that a new company object has been created and somewhat preconfigured . Now I want to be able to give this comany object to the first page in the set to be edited further. From step1 page to step2 and so on. If everything went well I would add the company object to the user.
I hope this is more clear what I meant.
>>> Furthermore, each PRComponent has a unique link that displays itself.
>>> So if you want to reuse the same component instance throughout a
>>> session you simply display the default #document that the PRComponent
>> Sounds great. I think I'm going to need this soon.
>> Magritte, Pier and Related Tools ...
> Lukas Renggli
> Magritte, Pier and Related Tools ...
More information about the smallwiki