Re: URL handling ..

2011-11-07 Thread Gunnar Eketrapp
Thank's Kalle for the advice!  Now I know what has to be done!

I wonder how long the wonderful atmosphere in this list will continue.

I hope forever ...


2011/11/7 Kalle Korhonen kalle.o.korho...@gmail.com

 On Sun, Nov 6, 2011 at 10:26 PM, Gunnar Eketrapp
 gunnar.eketr...@gmail.com wrote:
  Now I am phasing another problem and that is that T5 seems to encode
  context string in a way that they are not displayed properly in the the
  browser.
  I.e. if I URL encode the swedish word Räksmörgås (=Shrimp sandwich) i
  get *r%C3%A4ksm%C3%B6rg%C3%A5s
  *which shows up correct in browser url.
  But if I add it as a context param T5 encodes it as
 *r$00e4ksm$00f6rg$00e5s
  *which is shown as that in the browser.
  I figure T5 has to do this but is there an easy way to get around this so
  that swedish words shows up nicely in the browser !?

 There's not been a T5 project where I haven't needed to override
 URLEncoder service. Take a look at T5's URLEncoderImpl, override it
 with your version and mark whichever characters you prefer as safe
 (i.e. not encoded).

 Kalle


  2011/11/6 Gunnar Eketrapp gunnar.eketr...@gmail.com
 
  I digged into this yesterday and created a transfomer for my url's.
 
  I managed to transform pages to swedish names with the group name up
 front.
  Pretty pretty ...
 
  Today I encountered a problem whit action methods that return Link's
 with
  swedish characters in them.
  It seems like the åäö get's screwed up when the request  makes it to the
  browser and back.
 
  See  this log extract that shows the Link as returned from the
  onActionFromEdit method as well as the logged request that it leads to.
 
  *2011-11-06 12:30:45.700 DEBUG utskicket.pages.wiki.WikiView - [ EXIT]
  onActionFromEdit [/VillaSkurusundet/wiki/ändra/start]*
  *2011-11-06 12:30:45.704 DEBUG u.s.UtskicketModule.RequestLogger -
 Request:
  /VillaSkurusundet/wiki/?dra/start (Method=GET, browser=Mozilla/5.0
  (Windows NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko)
 Chrome/15.0.874.106
  Safari/535.2, isXHR=false)*
  *
  *
  Due to this my transformer fails to decode the incoming request.
 
  Surely I have missed something ...
  Thanks in advance!
 
  ...
 
  @Log
  Object onActionFromEdit() {
  return
  linkRenderer.createPageRenderLinkWithContext(wiki/edit, groupId,
  pageName) ;
  }
 
  
 
 
  2011/11/4 Gunnar Eketrapp gunnar.eketr...@gmail.com
 
  Ok thx for the tip!
 
 
  2011/11/4 Alejandro Scandroli alejandroscandr...@gmail.com
 
  Hi Gunnar
 
  You can also take a look at how tapestry-rounting is implemented.
  http://tynamo.org/tapestry-routing+guide
  http://svn.codehaus.org/tynamo/trunk/tapestry-routing/
 
  It may not be exactly what you need and may not have a good
  performance in a site with lots of pages, but I think it can give you
  a good idea of what you need to do in order to achieve what you need.
 
  Cheers.
  Alejandro.
 
  On Thu, Nov 3, 2011 at 1:35 PM, Thiago H. de Paula Figueiredo
  thiag...@gmail.com wrote:
   On Thu, 03 Nov 2011 10:16:40 -0200, Gunnar Eketrapp
   gunnar.eketr...@gmail.com wrote:
  
   Can page name can be localized in an easy way !?  I would rather
 not
  give
   swedish names to my page classes unless I have to.
   Is it possible to freely name a page. E.g. so that it separates
 words
  with
   dashes, e.g. my-profile
   And finally if it is possible to name a page different from the
 class
  name
   should I go for Sweidsh chars in url's or should I not !?
   I think wikipedia is using local char's in their url's ... so
 perhaps
  that
   is the answer!?
  
   You can do almost whatever you want with URLs: you just need to
  implement
   the logic for mapping incoming URLs to page classes and activation
  context
   (if any) and the reverse (pages and activation context to rewritten
  URLs).
  
   --
   Thiago H. de Paula Figueiredo
   Independent Java, Apache Tapestry 5 and Hibernate consultant,
  developer, and
   instructor
   Owner, Ars Machina Tecnologia da Informação Ltda.
   http://www.arsmachina.com.br
  
  
 -
   To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
   For additional commands, e-mail: users-h...@tapestry.apache.org
  
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org
 
 
 
 
  --
  [Hem: 08-715 59 57, Mobil: 070-991 86 42]
  Allévägen 2A, 132 42 Saltsjö-Boo
 
 
 
 
  --
  [Hem: 08-715 59 57, Mobil: 070-991 86 42]
  Allévägen 2A, 132 42 Saltsjö-Boo
 
 
 
 
  --
  [Hem: 08-715 59 57, Mobil: 070-991 86 42]
  Allévägen 2A, 132 42 Saltsjö-Boo
 

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




-- 
[Hem: 08-715 59 57, Mobil: 070-991 

Re: URL handling ..

2011-11-07 Thread Martin Strand

On Mon, 07 Nov 2011 07:46:47 +0100, Kalle Korhonen kalle.o.korho...@gmail.com 
wrote:


There's not been a T5 project where I haven't needed to override
URLEncoder service. Take a look at T5's URLEncoderImpl, override it
with your version and mark whichever characters you prefer as safe
(i.e. not encoded).

Kalle



I changed the default URLEncoder to assume everything is safe except for a 
few characters:

static final String ENCODED_NULL = $N;
static final String ENCODED_BLANK = $B;

private final BitSet unsafe = new BitSet(128);
{
  markUnSafe(/+$);
}

Just wondering, can you see any potential problems with this? I'm guessing 
there's a reason Tapestry doesn't do this by default.

We have a number of search result pages in a variety of languages, and we'd 
like Googlebot to see the search query properly encoded in the URL.

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



Re: URL handling ..

2011-11-07 Thread Thiago H. de Paula Figueiredo
On Mon, 07 Nov 2011 14:10:28 -0200, Martin Strand  
do.not.eat.yellow.s...@gmail.com wrote:


I changed the default URLEncoder to assume everything is safe except  
for a few characters:


static final String ENCODED_NULL = $N;
static final String ENCODED_BLANK = $B;

private final BitSet unsafe = new BitSet(128);
{
   markUnSafe(/+$);
}

Just wondering, can you see any potential problems with this? I'm  
guessing there's a reason Tapestry doesn't do this by default.


I guess you won't have any problems. As far as I can remember, the  
URLEncoder old implementation didn't have any character encoding besides  
URL encoding. It was changed to deal with slashes and null and blank page  
activation context values better than before. I don't know why any non  
US-ASCII character is encoded, though.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: URL handling ..

2011-11-06 Thread Gunnar Eketrapp
I digged into this yesterday and created a transfomer for my url's.

I managed to transform pages to swedish names with the group name up front.
Pretty pretty ...

Today I encountered a problem whit action methods that return Link's with
swedish characters in them.
It seems like the åäö get's screwed up when the request  makes it to the
browser and back.

See  this log extract that shows the Link as returned from the
onActionFromEdit method as well as the logged request that it leads to.

*2011-11-06 12:30:45.700 DEBUG utskicket.pages.wiki.WikiView - [ EXIT]
onActionFromEdit [/VillaSkurusundet/wiki/ändra/start]*
*2011-11-06 12:30:45.704 DEBUG u.s.UtskicketModule.RequestLogger - Request:
/VillaSkurusundet/wiki/?dra/start (Method=GET, browser=Mozilla/5.0 (Windows
NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.106
Safari/535.2, isXHR=false)*
*
*
Due to this my transformer fails to decode the incoming request.

Surely I have missed something ...
Thanks in advance!

...

@Log
Object onActionFromEdit() {
return
linkRenderer.createPageRenderLinkWithContext(wiki/edit, groupId,
pageName) ;
}




2011/11/4 Gunnar Eketrapp gunnar.eketr...@gmail.com

 Ok thx for the tip!


 2011/11/4 Alejandro Scandroli alejandroscandr...@gmail.com

 Hi Gunnar

 You can also take a look at how tapestry-rounting is implemented.
 http://tynamo.org/tapestry-routing+guide
 http://svn.codehaus.org/tynamo/trunk/tapestry-routing/

 It may not be exactly what you need and may not have a good
 performance in a site with lots of pages, but I think it can give you
 a good idea of what you need to do in order to achieve what you need.

 Cheers.
 Alejandro.

 On Thu, Nov 3, 2011 at 1:35 PM, Thiago H. de Paula Figueiredo
 thiag...@gmail.com wrote:
  On Thu, 03 Nov 2011 10:16:40 -0200, Gunnar Eketrapp
  gunnar.eketr...@gmail.com wrote:
 
  Can page name can be localized in an easy way !?  I would rather not
 give
  swedish names to my page classes unless I have to.
  Is it possible to freely name a page. E.g. so that it separates words
 with
  dashes, e.g. my-profile
  And finally if it is possible to name a page different from the class
 name
  should I go for Sweidsh chars in url's or should I not !?
  I think wikipedia is using local char's in their url's ... so perhaps
 that
  is the answer!?
 
  You can do almost whatever you want with URLs: you just need to
 implement
  the logic for mapping incoming URLs to page classes and activation
 context
  (if any) and the reverse (pages and activation context to rewritten
 URLs).
 
  --
  Thiago H. de Paula Figueiredo
  Independent Java, Apache Tapestry 5 and Hibernate consultant,
 developer, and
  instructor
  Owner, Ars Machina Tecnologia da Informação Ltda.
  http://www.arsmachina.com.br
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org
 
 

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




 --
 [Hem: 08-715 59 57, Mobil: 070-991 86 42]
 Allévägen 2A, 132 42 Saltsjö-Boo




-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: URL handling ..

2011-11-06 Thread Gunnar Eketrapp
Hi!

I will answer this myself for someone else that encounters the same problem
(=equal stupid).

The problem was that my LinkTransformer had to encode the swedish page
names in the path passes to LinkImpl.

I did this in this way (slashes shall not be encoded!)

private String urlEncodedPath(String path) {
StringBuilder b = new StringBuilder();
for (String s : path.split(/)) {
if (b.length()  0)
b.append(/);
b.append(URLEncoder.encode(s, UTF-8));
}
return b.toString();
}

Now I am phasing another problem and that is that T5 seems to encode
context string in a way that they are not displayed properly in the the
browser.

I.e. if I URL encode the swedish word Räksmörgås (=Shrimp sandwich) i
get *r%C3%A4ksm%C3%B6rg%C3%A5s
*which shows up correct in browser url.

But if I add it as a context param T5 encodes it as *r$00e4ksm$00f6rg$00e5s
*which is shown as that in the browser.

I figure T5 has to do this but is there an easy way to get around this so
that swedish words shows up nicely in the browser !?

Thanks in advance!


2011/11/6 Gunnar Eketrapp gunnar.eketr...@gmail.com

 I digged into this yesterday and created a transfomer for my url's.

 I managed to transform pages to swedish names with the group name up front.
 Pretty pretty ...

 Today I encountered a problem whit action methods that return Link's with
 swedish characters in them.
 It seems like the åäö get's screwed up when the request  makes it to the
 browser and back.

 See  this log extract that shows the Link as returned from the
 onActionFromEdit method as well as the logged request that it leads to.

 *2011-11-06 12:30:45.700 DEBUG utskicket.pages.wiki.WikiView - [ EXIT]
 onActionFromEdit [/VillaSkurusundet/wiki/ändra/start]*
 *2011-11-06 12:30:45.704 DEBUG u.s.UtskicketModule.RequestLogger - Request:
 /VillaSkurusundet/wiki/?dra/start (Method=GET, browser=Mozilla/5.0
 (Windows NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.106
 Safari/535.2, isXHR=false)*
 *
 *
 Due to this my transformer fails to decode the incoming request.

 Surely I have missed something ...
 Thanks in advance!

 ...

 @Log
 Object onActionFromEdit() {
 return
 linkRenderer.createPageRenderLinkWithContext(wiki/edit, groupId,
 pageName) ;
 }

 


 2011/11/4 Gunnar Eketrapp gunnar.eketr...@gmail.com

 Ok thx for the tip!


 2011/11/4 Alejandro Scandroli alejandroscandr...@gmail.com

 Hi Gunnar

 You can also take a look at how tapestry-rounting is implemented.
 http://tynamo.org/tapestry-routing+guide
 http://svn.codehaus.org/tynamo/trunk/tapestry-routing/

 It may not be exactly what you need and may not have a good
 performance in a site with lots of pages, but I think it can give you
 a good idea of what you need to do in order to achieve what you need.

 Cheers.
 Alejandro.

 On Thu, Nov 3, 2011 at 1:35 PM, Thiago H. de Paula Figueiredo
 thiag...@gmail.com wrote:
  On Thu, 03 Nov 2011 10:16:40 -0200, Gunnar Eketrapp
  gunnar.eketr...@gmail.com wrote:
 
  Can page name can be localized in an easy way !?  I would rather not
 give
  swedish names to my page classes unless I have to.
  Is it possible to freely name a page. E.g. so that it separates words
 with
  dashes, e.g. my-profile
  And finally if it is possible to name a page different from the class
 name
  should I go for Sweidsh chars in url's or should I not !?
  I think wikipedia is using local char's in their url's ... so perhaps
 that
  is the answer!?
 
  You can do almost whatever you want with URLs: you just need to
 implement
  the logic for mapping incoming URLs to page classes and activation
 context
  (if any) and the reverse (pages and activation context to rewritten
 URLs).
 
  --
  Thiago H. de Paula Figueiredo
  Independent Java, Apache Tapestry 5 and Hibernate consultant,
 developer, and
  instructor
  Owner, Ars Machina Tecnologia da Informação Ltda.
  http://www.arsmachina.com.br
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org
 
 

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




 --
 [Hem: 08-715 59 57, Mobil: 070-991 86 42]
 Allévägen 2A, 132 42 Saltsjö-Boo




 --
 [Hem: 08-715 59 57, Mobil: 070-991 86 42]
 Allévägen 2A, 132 42 Saltsjö-Boo




-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: URL handling ..

2011-11-06 Thread Kalle Korhonen
On Sun, Nov 6, 2011 at 10:26 PM, Gunnar Eketrapp
gunnar.eketr...@gmail.com wrote:
 Now I am phasing another problem and that is that T5 seems to encode
 context string in a way that they are not displayed properly in the the
 browser.
 I.e. if I URL encode the swedish word Räksmörgås (=Shrimp sandwich) i
 get *r%C3%A4ksm%C3%B6rg%C3%A5s
 *which shows up correct in browser url.
 But if I add it as a context param T5 encodes it as *r$00e4ksm$00f6rg$00e5s
 *which is shown as that in the browser.
 I figure T5 has to do this but is there an easy way to get around this so
 that swedish words shows up nicely in the browser !?

There's not been a T5 project where I haven't needed to override
URLEncoder service. Take a look at T5's URLEncoderImpl, override it
with your version and mark whichever characters you prefer as safe
(i.e. not encoded).

Kalle


 2011/11/6 Gunnar Eketrapp gunnar.eketr...@gmail.com

 I digged into this yesterday and created a transfomer for my url's.

 I managed to transform pages to swedish names with the group name up front.
 Pretty pretty ...

 Today I encountered a problem whit action methods that return Link's with
 swedish characters in them.
 It seems like the åäö get's screwed up when the request  makes it to the
 browser and back.

 See  this log extract that shows the Link as returned from the
 onActionFromEdit method as well as the logged request that it leads to.

 *2011-11-06 12:30:45.700 DEBUG utskicket.pages.wiki.WikiView - [ EXIT]
 onActionFromEdit [/VillaSkurusundet/wiki/ändra/start]*
 *2011-11-06 12:30:45.704 DEBUG u.s.UtskicketModule.RequestLogger - Request:
 /VillaSkurusundet/wiki/?dra/start (Method=GET, browser=Mozilla/5.0
 (Windows NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.106
 Safari/535.2, isXHR=false)*
 *
 *
 Due to this my transformer fails to decode the incoming request.

 Surely I have missed something ...
 Thanks in advance!

     ...

     @Log
     Object onActionFromEdit() {
         return
 linkRenderer.createPageRenderLinkWithContext(wiki/edit, groupId,
 pageName) ;
     }

     


 2011/11/4 Gunnar Eketrapp gunnar.eketr...@gmail.com

 Ok thx for the tip!


 2011/11/4 Alejandro Scandroli alejandroscandr...@gmail.com

 Hi Gunnar

 You can also take a look at how tapestry-rounting is implemented.
 http://tynamo.org/tapestry-routing+guide
 http://svn.codehaus.org/tynamo/trunk/tapestry-routing/

 It may not be exactly what you need and may not have a good
 performance in a site with lots of pages, but I think it can give you
 a good idea of what you need to do in order to achieve what you need.

 Cheers.
 Alejandro.

 On Thu, Nov 3, 2011 at 1:35 PM, Thiago H. de Paula Figueiredo
 thiag...@gmail.com wrote:
  On Thu, 03 Nov 2011 10:16:40 -0200, Gunnar Eketrapp
  gunnar.eketr...@gmail.com wrote:
 
  Can page name can be localized in an easy way !?  I would rather not
 give
  swedish names to my page classes unless I have to.
  Is it possible to freely name a page. E.g. so that it separates words
 with
  dashes, e.g. my-profile
  And finally if it is possible to name a page different from the class
 name
  should I go for Sweidsh chars in url's or should I not !?
  I think wikipedia is using local char's in their url's ... so perhaps
 that
  is the answer!?
 
  You can do almost whatever you want with URLs: you just need to
 implement
  the logic for mapping incoming URLs to page classes and activation
 context
  (if any) and the reverse (pages and activation context to rewritten
 URLs).
 
  --
  Thiago H. de Paula Figueiredo
  Independent Java, Apache Tapestry 5 and Hibernate consultant,
 developer, and
  instructor
  Owner, Ars Machina Tecnologia da Informação Ltda.
  http://www.arsmachina.com.br
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org
 
 

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




 --
 [Hem: 08-715 59 57, Mobil: 070-991 86 42]
 Allévägen 2A, 132 42 Saltsjö-Boo




 --
 [Hem: 08-715 59 57, Mobil: 070-991 86 42]
 Allévägen 2A, 132 42 Saltsjö-Boo




 --
 [Hem: 08-715 59 57, Mobil: 070-991 86 42]
 Allévägen 2A, 132 42 Saltsjö-Boo


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



Re: URL handling ..

2011-11-04 Thread Alejandro Scandroli
Hi Gunnar

You can also take a look at how tapestry-rounting is implemented.
http://tynamo.org/tapestry-routing+guide
http://svn.codehaus.org/tynamo/trunk/tapestry-routing/

It may not be exactly what you need and may not have a good
performance in a site with lots of pages, but I think it can give you
a good idea of what you need to do in order to achieve what you need.

Cheers.
Alejandro.

On Thu, Nov 3, 2011 at 1:35 PM, Thiago H. de Paula Figueiredo
thiag...@gmail.com wrote:
 On Thu, 03 Nov 2011 10:16:40 -0200, Gunnar Eketrapp
 gunnar.eketr...@gmail.com wrote:

 Can page name can be localized in an easy way !?  I would rather not give
 swedish names to my page classes unless I have to.
 Is it possible to freely name a page. E.g. so that it separates words with
 dashes, e.g. my-profile
 And finally if it is possible to name a page different from the class name
 should I go for Sweidsh chars in url's or should I not !?
 I think wikipedia is using local char's in their url's ... so perhaps that
 is the answer!?

 You can do almost whatever you want with URLs: you just need to implement
 the logic for mapping incoming URLs to page classes and activation context
 (if any) and the reverse (pages and activation context to rewritten URLs).

 --
 Thiago H. de Paula Figueiredo
 Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
 instructor
 Owner, Ars Machina Tecnologia da Informação Ltda.
 http://www.arsmachina.com.br

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



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



Re: URL handling ..

2011-11-04 Thread Gunnar Eketrapp
Ok thx for the tip!

2011/11/4 Alejandro Scandroli alejandroscandr...@gmail.com

 Hi Gunnar

 You can also take a look at how tapestry-rounting is implemented.
 http://tynamo.org/tapestry-routing+guide
 http://svn.codehaus.org/tynamo/trunk/tapestry-routing/

 It may not be exactly what you need and may not have a good
 performance in a site with lots of pages, but I think it can give you
 a good idea of what you need to do in order to achieve what you need.

 Cheers.
 Alejandro.

 On Thu, Nov 3, 2011 at 1:35 PM, Thiago H. de Paula Figueiredo
 thiag...@gmail.com wrote:
  On Thu, 03 Nov 2011 10:16:40 -0200, Gunnar Eketrapp
  gunnar.eketr...@gmail.com wrote:
 
  Can page name can be localized in an easy way !?  I would rather not
 give
  swedish names to my page classes unless I have to.
  Is it possible to freely name a page. E.g. so that it separates words
 with
  dashes, e.g. my-profile
  And finally if it is possible to name a page different from the class
 name
  should I go for Sweidsh chars in url's or should I not !?
  I think wikipedia is using local char's in their url's ... so perhaps
 that
  is the answer!?
 
  You can do almost whatever you want with URLs: you just need to implement
  the logic for mapping incoming URLs to page classes and activation
 context
  (if any) and the reverse (pages and activation context to rewritten
 URLs).
 
  --
  Thiago H. de Paula Figueiredo
  Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
 and
  instructor
  Owner, Ars Machina Tecnologia da Informação Ltda.
  http://www.arsmachina.com.br
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org
 
 

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




-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: URL handling ..

2011-11-03 Thread Emmanuel DEMEY
Hi,

If you need more informations about LinkTransformer, this post is very
helpful :
http://blog.tapestry5.de/index.php/2010/09/06/new-url-rewriting-api/

Emmanuel

2011/11/2 Thiago H. de Paula Figueiredo thiag...@gmail.com

 On Wed, 02 Nov 2011 16:53:37 -0200, Gunnar Eketrapp 
 gunnar.eketr...@gmail.com wrote:

  Hi !


 Hi!

  
 *https://utskicket.se/GroupA/**economy/accounting/2011*https://utskicket.se/GroupA/economy/accounting/2011*
 and not
 *https://utskicket.se/economy/**accounting/GroupA/2011*https://utskicket.se/economy/accounting/GroupA/2011*
 I just found the LinkTransforner interfaces and I guess that's the way to
 go.


 Yep!


  Is there any hidden lurks or should this be easy.


 The API use itself should be easy, but sometimes the URL transformation
 logic itself you'll write is the hard part. You need to correctly identify
 URLs that should be rewritten then rewrite the correctly.

 --
 Thiago H. de Paula Figueiredo
 Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
 and instructor
 Owner, Ars Machina Tecnologia da Informação Ltda.
 http://www.arsmachina.com.br

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




-- 
Emmanuel DEMEY
Ingénieur Etude et Développement
ATOS Worldline
+33 (0)6 47 47 42 02
demey.emman...@gmail.com
http://emmanueldemey.fr

Twitter : @gillespie59


Re: URL handling ..

2011-11-03 Thread Gunnar Eketrapp
OK thanks to both of you!

Some more questions !

Can page name can be localized in an easy way !?  I would rather not give
swedish names to my page classes unless I have to.

Is it possible to freely name a page. E.g. so that it separates words with
dashes, e.g. my-profile

And finally if it is possible to name a page different from the class name
should I go for Sweidsh chars in url's or should I not !?
I think wikipedia is using local char's in their url's ... so perhaps that
is the answer!?

Thanks in advance to all of you!
/Gunnar Eketrapp



2011/11/3 Emmanuel DEMEY demey.emman...@gmail.com

 Hi,

 If you need more informations about LinkTransformer, this post is very
 helpful :
 http://blog.tapestry5.de/index.php/2010/09/06/new-url-rewriting-api/

 Emmanuel

 2011/11/2 Thiago H. de Paula Figueiredo thiag...@gmail.com

  On Wed, 02 Nov 2011 16:53:37 -0200, Gunnar Eketrapp 
  gunnar.eketr...@gmail.com wrote:
 
   Hi !
 
 
  Hi!
 
   *https://utskicket.se/GroupA/**economy/accounting/2011*
 https://utskicket.se/GroupA/economy/accounting/2011*
  and not
  *https://utskicket.se/economy/**accounting/GroupA/2011*
 https://utskicket.se/economy/accounting/GroupA/2011*
  I just found the LinkTransforner interfaces and I guess that's the way
 to
  go.
 
 
  Yep!
 
 
   Is there any hidden lurks or should this be easy.
 
 
  The API use itself should be easy, but sometimes the URL transformation
  logic itself you'll write is the hard part. You need to correctly
 identify
  URLs that should be rewritten then rewrite the correctly.
 
  --
  Thiago H. de Paula Figueiredo
  Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
  and instructor
  Owner, Ars Machina Tecnologia da Informação Ltda.
  http://www.arsmachina.com.br
 
  --**--**-
  To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org
 users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org
 
 


 --
 Emmanuel DEMEY
 Ingénieur Etude et Développement
 ATOS Worldline
 +33 (0)6 47 47 42 02
 demey.emman...@gmail.com
 http://emmanueldemey.fr

 Twitter : @gillespie59




-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: URL handling ..

2011-11-03 Thread Thiago H. de Paula Figueiredo
On Thu, 03 Nov 2011 10:16:40 -0200, Gunnar Eketrapp  
gunnar.eketr...@gmail.com wrote:



Can page name can be localized in an easy way !?  I would rather not give
swedish names to my page classes unless I have to.
Is it possible to freely name a page. E.g. so that it separates words  
with dashes, e.g. my-profile
And finally if it is possible to name a page different from the class  
name should I go for Sweidsh chars in url's or should I not !?
I think wikipedia is using local char's in their url's ... so perhaps  
that is the answer!?


You can do almost whatever you want with URLs: you just need to implement  
the logic for mapping incoming URLs to page classes and activation context  
(if any) and the reverse (pages and activation context to rewritten URLs).


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



URL handling ..

2011-11-02 Thread Gunnar Eketrapp
Hi !

I have a T5 site that is about to be launched with lots of pages.

The site will help various associations up here in Sweden with their
administration. (Members register, Billing, Economy, Agendas, Protocol,
Wiki, bla, bla)

The domain name will be *utskicket.se*

Now to my question. For a page economy/accounting and customer like
GroupA and accounting year 2011

I would like the URL's to be like

*https://utskicket.se/GroupA/economy/accounting/2011*

and not

*https://utskicket.se/economy/accounting/GroupA/2011*


I.e. the first part of the path should denote the group and not a page or
page directory.

I just found the LinkTransforner interfaces and I guess that's the way to
go.

Is there any hidden lurks or should this be easy. I have quite a big site
with lots of components and ajax requests and if this is a no brainer I
will wait until upcoming releases.

It would however be nice if it could be so from the start.

Thanks in advance,
Gunnar Eketrapp


Re: URL handling ..

2011-11-02 Thread Thiago H. de Paula Figueiredo
On Wed, 02 Nov 2011 16:53:37 -0200, Gunnar Eketrapp  
gunnar.eketr...@gmail.com wrote:



Hi !


Hi!


*https://utskicket.se/GroupA/economy/accounting/2011*
and not
*https://utskicket.se/economy/accounting/GroupA/2011*
I just found the LinkTransforner interfaces and I guess that's the way to
go.


Yep!


Is there any hidden lurks or should this be easy.


The API use itself should be easy, but sometimes the URL transformation  
logic itself you'll write is the hard part. You need to correctly identify  
URLs that should be rewritten then rewrite the correctly.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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