Re: [5.3.6] A homepage instead of "Index"

2012-12-13 Thread Muhammad Gelbana
Ah ! It's clear now what you did mean, thank you :)

On Thu, Dec 13, 2012 at 9:34 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Thu, 13 Dec 2012 17:21:55 -0200, Muhammad Gelbana 
> wrote:
>
>  I'm sorry but how can I utilize the *LinkTransformer* service if it has
>> only 2 methods, one that needs a *Request*, which you suggested that I
>> don't need,
>>
>
> That's not what I said at all. I said you don't need a Request at
> contributeApplicationDefaults(**). I guess you're still not getting how
> LinkTransformer works at all. http://blog.tapestry5.de/**
> index.php/2010/09/06/new-url-**rewriting-api/should
>  teach you how to use it.
>
>  and the other needs a *Link* and a *
>> ComponentEventRequestParameter**s* ?
>>
>
> You won't use LinkTransformer nor invoke it, you'll write an
> implementation of it and contribute it to the PageRenderLinkTransformer
> service.
>
>
> --
> Thiago H. de Paula Figueiredo
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: [5.3.6] A homepage instead of "Index"

2012-12-13 Thread Thiago H de Paula Figueiredo
On Thu, 13 Dec 2012 17:21:55 -0200, Muhammad Gelbana   
wrote:



I'm sorry but how can I utilize the *LinkTransformer* service if it has
only 2 methods, one that needs a *Request*, which you suggested that I
don't need,


That's not what I said at all. I said you don't need a Request at  
contributeApplicationDefaults(). I guess you're still not getting how  
LinkTransformer works at all.  
http://blog.tapestry5.de/index.php/2010/09/06/new-url-rewriting-api/  
should teach you how to use it.



and the other needs a *Link* and a *
ComponentEventRequestParameters* ?


You won't use LinkTransformer nor invoke it, you'll write an  
implementation of it and contribute it to the PageRenderLinkTransformer  
service.


--
Thiago H. de Paula Figueiredo

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [5.3.6] A homepage instead of "Index"

2012-12-13 Thread Muhammad Gelbana
I'm sorry but how can I utilize the *LinkTransformer* service if it has
only 2 methods, one that needs a *Request*, which you suggested that I
don't need, and the other needs a *Link* and a *
ComponentEventRequestParameters* ?


On Thu, Dec 13, 2012 at 11:45 AM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Wed, 12 Dec 2012 23:45:19 -0200, Muhammad Gelbana 
> wrote:
>
>  I'm contributing a url to the default start page:
>>
>> public static void
>> contributeApplicationDefaults(**MappedConfiguration
>> configuration) {
>> configuration.add(**SymbolConstants.START_PAGE_**NAME,
>> "my/page");
>> }
>>
>> How can I have a request object to point to my page at this point ?
>>
>
> You don't need a request object at this point.
>
>
> --
> Thiago H. de Paula Figueiredo
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: [5.3.6] A homepage instead of "Index"

2012-12-13 Thread Thiago H de Paula Figueiredo
On Wed, 12 Dec 2012 23:45:19 -0200, Muhammad Gelbana   
wrote:



I'm contributing a url to the default start page:

public static void
contributeApplicationDefaults(MappedConfiguration
configuration) {
configuration.add(SymbolConstants.START_PAGE_NAME, "my/page");
}

How can I have a request object to point to my page at this point ?


You don't need a request object at this point.

--
Thiago H. de Paula Figueiredo

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [5.3.6] A homepage instead of "Index"

2012-12-12 Thread Muhammad Gelbana
I'm contributing a url to the default start page:

public static void
contributeApplicationDefaults(MappedConfiguration
configuration) {
configuration.add(SymbolConstants.START_PAGE_NAME, "my/page");
}

How can I have a request object to point to my page at this point ?

On Thu, Dec 13, 2012 at 1:42 AM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Wed, 12 Dec 2012 20:05:51 -0200, Muhammad Gelbana 
> wrote:
>
>  I think this method> org/5.3.6/apidocs/org/apache/**tapestry5/services/**linktransform/**
>> ComponentEventLinkTransformer.**html#**decodeComponentEventRequest(**
>> org.apache.tapestry5.services.**Request)
>> >
>>
>> is the closest to what I need but I don't know how can I provide the
>> appropriate *"Request"* object for it, to generate a *"Link"*.
>>
>
> Just inject it through Tapestryy-IoC.
>
>
> --
> Thiago H. de Paula Figueiredo
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: [5.3.6] A homepage instead of "Index"

2012-12-12 Thread Thiago H de Paula Figueiredo
On Wed, 12 Dec 2012 20:05:51 -0200, Muhammad Gelbana   
wrote:


I think this  
method

is the closest to what I need but I don't know how can I provide the
appropriate *"Request"* object for it, to generate a *"Link"*.


Just inject it through Tapestryy-IoC.

--
Thiago H. de Paula Figueiredo

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [5.3.6] A homepage instead of "Index"

2012-12-12 Thread Muhammad Gelbana
I think this 
method
is
the closest to what I need but I don't know how can I provide the
appropriate *"Request"* object for it, to generate a *"Link"*.

Thank you.

On Wed, Dec 12, 2012 at 7:57 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> LinkTransformer


Re: [5.3.6] A homepage instead of "Index"

2012-12-12 Thread Thiago H de Paula Figueiredo
On Wed, 12 Dec 2012 15:37:56 -0200, Muhammad Gelbana   
wrote:



Thanks a lot that was exactly what I needed. One drawback is that I can't
inject a *PageRenderLinkSource* to generate the page's link  
automatically.


Actually, you can, but it will probably not generate a "/" URL. I haven't  
checked, though.



Is there a way to overcome that ?


Have you tried the LinkTransformer API?

--
Thiago H. de Paula Figueiredo

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [5.3.6] A homepage instead of "Index"

2012-12-12 Thread Muhammad Gelbana
Thanks a lot that was exactly what I needed. One drawback is that I can't
inject a *PageRenderLinkSource* to generate the page's link automatically.
Is there a way to overcome that ?

On Wed, Dec 12, 2012 at 12:11 AM, Dusko Jovanovski wrote:

> Try overriding the SymbolConstants.START_PAGE_NAME symbol.
>
>
> On Tue, Dec 11, 2012 at 10:55 PM, Muhammad Gelbana  >wrote:
>
> > I'm not sure if that's a usual requirement but here it is. I need to have
> > another page as a default homepage instead of the "Index" page. I can do
> > that by returning the page I need from an "Index" page method that
> handles
> > @SetupRender or @OnEvent(value=EventConstants.Activate) events, I'm not
> > quire sure at the moment but I'll look that up.
> >
> > The question is, can this be done without redirecting the user after
> > visiting the Index page ? More like having the page I desire as the
> default
> > home page instead of Index ?
> >
> > Also the tricky part is that I may have this page in a module (here is an
> > idea about what I
> > mean<
> http://tawus.wordpress.com/2011/04/20/tapestry-magic-3-plugin-blocks/
> > >).
> > So when that module *isn't* in the classpath, the "Index" page will be
> > displayed as usual.
> >
> > Thank you.
> >
>


Re: [5.3.6] A homepage instead of "Index"

2012-12-11 Thread Dusko Jovanovski
Try overriding the SymbolConstants.START_PAGE_NAME symbol.


On Tue, Dec 11, 2012 at 10:55 PM, Muhammad Gelbana wrote:

> I'm not sure if that's a usual requirement but here it is. I need to have
> another page as a default homepage instead of the "Index" page. I can do
> that by returning the page I need from an "Index" page method that handles
> @SetupRender or @OnEvent(value=EventConstants.Activate) events, I'm not
> quire sure at the moment but I'll look that up.
>
> The question is, can this be done without redirecting the user after
> visiting the Index page ? More like having the page I desire as the default
> home page instead of Index ?
>
> Also the tricky part is that I may have this page in a module (here is an
> idea about what I
> mean >).
> So when that module *isn't* in the classpath, the "Index" page will be
> displayed as usual.
>
> Thank you.
>