External link to new entity page

View: New views
5 Messages — Rating Filter:   Alert me  

External link to new entity page

by Pablo Gra\~na :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi people.

Lets suppose I have an event entity and a registration entity. I want to
send somedoby an email with an invitation to register to the event. This
email contains a link that, when followed, shows the new registration
page with the event preselected and read only. Is this possible?

Thanks a lot.

--
Pablo Gra\~na
Chief Architect
Globant
Arg Office: +54 (11) 4109 1743
UK  Office: +44 (20) 7043 8269 int 8043
US  Office: +1 (212) 400 7686 int 8043


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: External link to new entity page

by Kalle Korhonen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Surely this is possible, you'd be using more Tapestry functionality itself than Trails.

The implementation you choose depends on how you want to model it. If you have known invitees, you might want to create their registration beforehand, and then just link to that object. In that case, you can use a straight-up EditLink. If you want the registration entity to be created when a user hits the link, you might want to implement a custom edit page and overwrite its activateExternalPage. You'd pass in a parameter for the registration (you could just use the squeezed registration entity, so you can deal with plain objects), but then call setModel with a new registration as a parameter. I have a new user sign-up page that behaves roughly the same way.

What you need is to understand how external page activation and parameter squeezing strategy in Tap4 works. Then, you need to figure out where you want to create a link to this registration page. If you create it on another page, Tacos has @InjectExternalLink() that'll greatly help in it. If you do it in your own service, you need to inject an externalService to your service. Either way, then you just fetch the actual link as a string giving the Event entity as a parameter (and possibly other parameters) while Tapestry takes care of the rest (forming the link by squeezing it to an id etc.)

Kalle


On 11/1/07, Pablo Gra~na <pablo.grana@...> wrote:
Hi people.

Lets suppose I have an event entity and a registration entity. I want to
send somedoby an email with an invitation to register to the event. This
email contains a link that, when followed, shows the new registration
page with the event preselected and read only. Is this possible?

Thanks a lot.

--
Pablo Gra\~na
Chief Architect
Globant
Arg Office: +54 (11) 4109 1743
UK  Office: +44 (20) 7043 8269 int 8043
US  Office: +1 (212) 400 7686 int 8043


---------------------------------------------------------------------
To unsubscribe from this list please visit:

     http://xircles.codehaus.org/manage_email



Re: External link to new entity page

by Pablo Gra\~na :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank a lot for your anwser. I'll try to follow your hints and what can
I come up with.

regards

Kalle Korhonen wrote:

> Surely this is possible, you'd be using more Tapestry functionality
> itself than Trails.
>
> The implementation you choose depends on how you want to model it. If
> you have known invitees, you might want to create their registration
> beforehand, and then just link to that object. In that case, you can use
> a straight-up EditLink. If you want the registration entity to be
> created when a user hits the link, you might want to implement a custom
> edit page and overwrite its activateExternalPage. You'd pass in a
> parameter for the registration (you could just use the squeezed
> registration entity, so you can deal with plain objects), but then call
> setModel with a new registration as a parameter. I have a new user
> sign-up page that behaves roughly the same way.
>
> What you need is to understand how external page activation and
> parameter squeezing strategy in Tap4 works. Then, you need to figure out
> where you want to create a link to this registration page. If you create
> it on another page, Tacos has @InjectExternalLink() that'll greatly help
> in it. If you do it in your own service, you need to inject an
> externalService to your service. Either way, then you just fetch the
> actual link as a string giving the Event entity as a parameter (and
> possibly other parameters) while Tapestry takes care of the rest
> (forming the link by squeezing it to an id etc.)
>
> Kalle
>
>
> On 11/1/07, *Pablo Gra~na* <pablo.grana@...
> <mailto:pablo.grana@...>> wrote:
>
>     Hi people.
>
>     Lets suppose I have an event entity and a registration entity. I want to
>     send somedoby an email with an invitation to register to the event. This
>     email contains a link that, when followed, shows the new registration
>     page with the event preselected and read only. Is this possible?
>
>     Thanks a lot.
>
>     --
>     Pablo Gra\~na
>     Chief Architect
>     Globant
>     Arg Office: +54 (11) 4109 1743
>     UK  Office: +44 (20) 7043 8269 int 8043
>     US  Office: +1 (212) 400 7686 int 8043
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe from this list please visit:
>
>          http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: External link to new entity page

by Alejandro Scandroli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi All

I will take this opportunity to introduce new features that are being
developed in the "ascandroli-20071009-TRAILS63" branch.

There is a new IEngineService for TrailsPages.
This service doesn't require to know the name of the page when
rendering the link.
So if you started a project without custom pages and then later you
decide to add some custom pages the links will remain the same.
In the branch "new" links aren't DirectLinks, they are like edit links
with an empty  object model (id == null), the new TrailsPageService
will take care of the creation of new objects when is needed.
There is also a ServiceEncoder for the TrailsPageService that aims to
create REST like url for Trails pages:
http://localhost:8080/lists/Recipe
http://localhost:8080/edit/Recipe/1
http://localhost:8080/view/Recipe/1
http://localhost:8080/new/Recipe/

I'm thinking about providing an alternative ServiceEncoder following
the "Heuristic Request/Response Mappings", so you can choose between
those two (you can also  choose not use a ServiceEncoder at all).

To complete this I have changed our CallbackStack to support not only
Trails callbacks but any Tapestry callback. I also added:
* a new callback UrlCallback that will take you back to any url you want.
* a new filter to extract the "referrer" for a given request. This way
when a new request arrives Trails extracts the "referrer" URL and sets
up an UrlCallback so after the form submission Trails can take the
user back to  wherever he was.

I'm using this to provide "recollect data" forms for clients, but it
is yet under heavy development.
I hope you consider them useful features. :)

Saludos.
Alejandro.







On 11/2/07, Pablo Gra~na <pablo.grana@...> wrote:

> Thank a lot for your anwser. I'll try to follow your hints and what can
> I come up with.
>
> regards
>
> Kalle Korhonen wrote:
> > Surely this is possible, you'd be using more Tapestry functionality
> > itself than Trails.
> >
> > The implementation you choose depends on how you want to model it. If
> > you have known invitees, you might want to create their registration
> > beforehand, and then just link to that object. In that case, you can use
> > a straight-up EditLink. If you want the registration entity to be
> > created when a user hits the link, you might want to implement a custom
> > edit page and overwrite its activateExternalPage. You'd pass in a
> > parameter for the registration (you could just use the squeezed
> > registration entity, so you can deal with plain objects), but then call
> > setModel with a new registration as a parameter. I have a new user
> > sign-up page that behaves roughly the same way.
> >
> > What you need is to understand how external page activation and
> > parameter squeezing strategy in Tap4 works. Then, you need to figure out
> > where you want to create a link to this registration page. If you create
> > it on another page, Tacos has @InjectExternalLink() that'll greatly help
> > in it. If you do it in your own service, you need to inject an
> > externalService to your service. Either way, then you just fetch the
> > actual link as a string giving the Event entity as a parameter (and
> > possibly other parameters) while Tapestry takes care of the rest
> > (forming the link by squeezing it to an id etc.)
> >
> > Kalle
> >
> >
> > On 11/1/07, *Pablo Gra~na* <pablo.grana@...
> > <mailto:pablo.grana@...>> wrote:
> >
> >     Hi people.
> >
> >     Lets suppose I have an event entity and a registration entity. I want to
> >     send somedoby an email with an invitation to register to the event. This
> >     email contains a link that, when followed, shows the new registration
> >     page with the event preselected and read only. Is this possible?
> >
> >     Thanks a lot.
> >
> >     --
> >     Pablo Gra\~na
> >     Chief Architect
> >     Globant
> >     Arg Office: +54 (11) 4109 1743
> >     UK  Office: +44 (20) 7043 8269 int 8043
> >     US  Office: +1 (212) 400 7686 int 8043
> >
> >
> >     ---------------------------------------------------------------------
> >     To unsubscribe from this list please visit:
> >
> >          http://xircles.codehaus.org/manage_email
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: External link to new entity page

by Pablo Gra\~na :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

YES! This is exactly what I was looking for. I also really like the REST
style (note: /list/Recipe reads nicer than /lists/Recipe, at least for me).

This 'recollect data for clients' is really a useful functionality. We
are neededng it right now :).

Thanks a lot.


Alejandro Scandroli wrote:

> Hi All
>
> I will take this opportunity to introduce new features that are being
> developed in the "ascandroli-20071009-TRAILS63" branch.
>
> There is a new IEngineService for TrailsPages.
> This service doesn't require to know the name of the page when
> rendering the link.
> So if you started a project without custom pages and then later you
> decide to add some custom pages the links will remain the same.
> In the branch "new" links aren't DirectLinks, they are like edit links
> with an empty  object model (id == null), the new TrailsPageService
> will take care of the creation of new objects when is needed.
> There is also a ServiceEncoder for the TrailsPageService that aims to
> create REST like url for Trails pages:
> http://localhost:8080/lists/Recipe
> http://localhost:8080/edit/Recipe/1
> http://localhost:8080/view/Recipe/1
> http://localhost:8080/new/Recipe/
>
> I'm thinking about providing an alternative ServiceEncoder following
> the "Heuristic Request/Response Mappings", so you can choose between
> those two (you can also  choose not use a ServiceEncoder at all).
>
> To complete this I have changed our CallbackStack to support not only
> Trails callbacks but any Tapestry callback. I also added:
> * a new callback UrlCallback that will take you back to any url you want.
> * a new filter to extract the "referrer" for a given request. This way
> when a new request arrives Trails extracts the "referrer" URL and sets
> up an UrlCallback so after the form submission Trails can take the
> user back to  wherever he was.
>
> I'm using this to provide "recollect data" forms for clients, but it
> is yet under heavy development.
> I hope you consider them useful features. :)
>
> Saludos.
> Alejandro.
>
>
>
>
>
>
>
> On 11/2/07, Pablo Gra~na <pablo.grana@...> wrote:
>> Thank a lot for your anwser. I'll try to follow your hints and what can
>> I come up with.
>>
>> regards
>>
>> Kalle Korhonen wrote:
>>> Surely this is possible, you'd be using more Tapestry functionality
>>> itself than Trails.
>>>
>>> The implementation you choose depends on how you want to model it. If
>>> you have known invitees, you might want to create their registration
>>> beforehand, and then just link to that object. In that case, you can use
>>> a straight-up EditLink. If you want the registration entity to be
>>> created when a user hits the link, you might want to implement a custom
>>> edit page and overwrite its activateExternalPage. You'd pass in a
>>> parameter for the registration (you could just use the squeezed
>>> registration entity, so you can deal with plain objects), but then call
>>> setModel with a new registration as a parameter. I have a new user
>>> sign-up page that behaves roughly the same way.
>>>
>>> What you need is to understand how external page activation and
>>> parameter squeezing strategy in Tap4 works. Then, you need to figure out
>>> where you want to create a link to this registration page. If you create
>>> it on another page, Tacos has @InjectExternalLink() that'll greatly help
>>> in it. If you do it in your own service, you need to inject an
>>> externalService to your service. Either way, then you just fetch the
>>> actual link as a string giving the Event entity as a parameter (and
>>> possibly other parameters) while Tapestry takes care of the rest
>>> (forming the link by squeezing it to an id etc.)
>>>
>>> Kalle
>>>
>>>
>>> On 11/1/07, *Pablo Gra~na* <pablo.grana@...
>>> <mailto:pablo.grana@...>> wrote:
>>>
>>>     Hi people.
>>>
>>>     Lets suppose I have an event entity and a registration entity. I want to
>>>     send somedoby an email with an invitation to register to the event. This
>>>     email contains a link that, when followed, shows the new registration
>>>     page with the event preselected and read only. Is this possible?
>>>
>>>     Thanks a lot.
>>>
>>>     --
>>>     Pablo Gra\~na
>>>     Chief Architect
>>>     Globant
>>>     Arg Office: +54 (11) 4109 1743
>>>     UK  Office: +44 (20) 7043 8269 int 8043
>>>     US  Office: +1 (212) 400 7686 int 8043
>>>
>>>
>>>     ---------------------------------------------------------------------
>>>     To unsubscribe from this list please visit:
>>>
>>>          http://xircles.codehaus.org/manage_email
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email