[Seaside] Sending parameters to a component through url parameters
damien.cassou at laposte.net
Tue Nov 21 14:16:35 UTC 2006
Bany, Michel a écrit :
> Hi om,
>> 1) Is it possible to send parameters to a component by adding
>> parameters to it's entry point url?
>> For exemple : http://localhost:8008/seaside/go/myApp?year=2001
>> which would pass a 'year' parameter to myApp.
> You will need to implement #initialRequest: in your component.
>> 2) Can my component know by which entry point url he has been
>> launched? (In the case I created multiple entry points for
>> the same component).
> You may want to play with
> self session application basePath.
> self session currentRequest url.
In your component, you can use #fieldsAt: to get a value.
If you component has been rendered with :
in your component, you can:
html paragraph: 'in the year', (self fieldsAt: 'year')
More information about the Seaside