Confirm("are you sure want to delete") in

2008-12-11 Thread Tan cyb...@n
hi,

i'm a newbie in  tapestry.  may i know is it possible to do like:



I have tried to put in  as well, but after choose cancel.  it will
still submit.  May i know how to avoid the postback?
Thank you.

Tan


BeanEditForm Component in Tapestry 5

2008-12-11 Thread mraible

I'm working on a simple CRUD example for Tapestry 5 (version 5.0.18) today in
order to create the necessary FreeMarker templates for AppFuse's Maven
Plugin. Here's my form class:

package org.appfuse.webapp.pages;

import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.appfuse.model.Person;

public class PersonForm {

   @Persist
   private Person person;

   public Person getPerson() {
   return person;
   }

   public void setPerson(Person person) {
   this.person = person;
   }
}

My PersonForm.tml:

http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
   
   Create New Person

   
   


Pretty simple. The Person.java object is as follows:

package org.appfuse.model;

import javax.persistence.*;

@Entity
public class Person {
   private Long id;
   private String firstName;

   public void setFirstName(String firstName) {
   this.firstName = firstName;
   }

   public void setId(Long id) {
   this.id = id;
   }

   public void setLastName(String lastName) {
   this.lastName = lastName;
   }

   private String lastName;

   @Id
   @GeneratedValue(strategy = GenerationType.AUTO)
   public Long getId() {
   return this.id;
   }

   @Column(name = "first_name", length = 50)
   public String getFirstName() {
   return this.firstName;
   }

   @Column(name = "last_name", length = 50)
   public String getLastName() {
   return this.lastName;
   }

   public String toString() {
   return firstName + ' ' + lastName;
   }
}

When I access http://localhost:8080/personform, I get
the following error:

Render queue error in
AfterRender[PersonForm:beaneditform.editor.loop]: Failure reading
parameter 'validate' of component core/PropertyEditBlocks:numberfield:
No object of type org.apache.tapestry5.services.PropertyEditContext is
available from the Environment. Available types are
org.apache.tapestry5.RenderSupport,
org.apache.tapestry5.ValidationDecorator,
org.apache.tapestry5.ValidationTracker,
org.apache.tapestry5.internal.services.ClientBehaviorSupport,
org.apache.tapestry5.internal.services.DocumentLinker,
org.apache.tapestry5.services.BeanEditContext,
org.apache.tapestry5.services.FormSupport,
org.apache.tapestry5.services.Heartbeat.

Any ideas?

Thanks,

Matt
-- 
View this message in context: 
http://www.nabble.com/BeanEditForm-Component-in-Tapestry-5-tp20964358p20964358.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: [T5] 5.0.17 URLEncoderImpl.decode error

2008-12-11 Thread Thiago H. de Paula Figueiredo
Em Thu, 11 Dec 2008 16:37:31 -0300, Blower, Andy  
 escreveu:


The main reason for this is Tapestry's new encoding scheme makes some of  
my application's URL's incredibly ugly with its $00xx replacements  
everywhere.


What do you all think?


I agree, and the $00XX replacement is even more particularly ugly for us  
Brazilians and any other people with languages that have accented  
characters. The URLs become unreadable, and one of the best selling points  
is the beauty and cleaniness of their URLs.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: AW: AW: Advantages of various .tml storage locations?

2008-12-11 Thread Christian Edward Gruber
It may, but I always change /src/*/resources folders from source  
folders to class folders, since they are resources, not code, so they  
don't really need to go through Eclipse's incremental compiler.   
That's just me though.  Either way works.


Christian.

On 11-Dec-08, at 10:27 , Daniel Jue wrote:

+1 to that.  I have also been using the src/main/resources dir since  
cutting
my teeth with Maven and T5.  The Tapestry related directories there  
mirror

the packages under src/main/java, for both page classes and component
classes.
In eclipse the src/main/java and src/main/resources are both listed as
"source directories", so the tml files will get copied out to the same
location as the .class files.  (I think this works just using the  
Eclipse

java builder, and may not even need the maven builder)

The Loom plugin for Eclipse/T5 supports this structure.

On Thu, Dec 11, 2008 at 7:26 AM, Otho  wrote:

Uhm... I use the resource folder since the beginning of dabbling  
around

with
Tap5 and never had any issues. In fact it's the first thing I do when
creating a new app via the archetype to create the packages under the
resource directory and moving Index.tml there.




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



RE: [T5] 5.0.17 URLEncoderImpl.decode error

2008-12-11 Thread Blower, Andy
I think the new URL encoding scheme should have some characters added to the 
safe list, including @.

According to the BNF for URLs (http://www.w3.org/Addressing/URL/url-spec.html), 
the following characters are perfectly valid for URLs:

$...@.&+-!*"'(),

-_. are already in the safe list, and I'm proposing that the others from the 
list above are all added as well. (except $ of course)

The main reason for this is Tapestry's new encoding scheme makes some of my 
application's URL's incredibly ugly with its $00xx replacements everywhere.

What do you all think?

Andy

> -Original Message-
> From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com]
> Sent: 10 December 2008 23:28
> To: Tapestry users
> Subject: Re: [T5] 5.0.17 URLEncoderImpl.decode error
>
> Em Wed, 10 Dec 2008 19:19:44 -0300, Leon Derks 
> escreveu:
>
> > Hello
>
> Hi!
>
> > I do get an java.lang.IllegalArgumentException
> > It says: "Input string 'u...@company.com' is not valid; the character
> > '@' at position 5 is not valid."
> > I didn't had this problem in tapestry 5.0.14.
> > I searched in the changes, but couldn't find a change that would
> cause
> > this error.
>
> That's here: https://issues.apache.org/jira/browse/TAP5-302. Look at
> the
> last comment. The default URL encoding used by Tapestry was changed in
> 5.0.16.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
> -
> 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: AW: AW: Advantages of various .tml storage locations?

2008-12-11 Thread Daniel Jue
+1 to that.  I have also been using the src/main/resources dir since cutting
my teeth with Maven and T5.  The Tapestry related directories there mirror
the packages under src/main/java, for both page classes and component
classes.
In eclipse the src/main/java and src/main/resources are both listed as
"source directories", so the tml files will get copied out to the same
location as the .class files.  (I think this works just using the Eclipse
java builder, and may not even need the maven builder)

The Loom plugin for Eclipse/T5 supports this structure.

On Thu, Dec 11, 2008 at 7:26 AM, Otho <[EMAIL PROTECTED]> wrote:

> Uhm... I use the resource folder since the beginning of dabbling around
> with
> Tap5 and never had any issues. In fact it's the first thing I do when
> creating a new app via the archetype to create the packages under the
> resource directory and moving Index.tml there.
>


Re: Persistance

2008-12-11 Thread Peter Stavrinides
I think this feature would set Tapestry 5 even further apart from the rest, go 
vote for it at:
https://issues.apache.org/jira/browse/TAP5-411

cheers,
Peter

- Original Message -
From: "Hugo Palma" <[EMAIL PROTECTED]>
To: "Tapestry users" 
Sent: Thursday, 11 December, 2008 12:52:37 PM GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: Re: Persistance

I myself have found the need for such a persistence strategy.
I would suggest creating an issue for this so that people can vote and
follow it.

On Fri, Nov 28, 2008 at 10:23 AM, Peter Stavrinides <
[EMAIL PROTECTED]> wrote:

> Hi,
>
> I have been thinking about persistence lately... and after moving all our
> apps from Tapestry 4 to Tapestry 5 this past year, I have noticed distinct
> patterns emerge in the way pages fit together and use persistence, and I
> have been searching all the while for best practices... here are some
> comments on how persistence evolved in my code:
>
> @Persist - I tended to use it a lot in the beginning, but far less now, I
> have found it optimal not to clutter the session, and therefore persist only
> a select few fields (mostly primitives).
>
> @Persist("flash") - I moved to flash persistence wherever I could, as it
> helps limit the number of queries required, but its not always feasible to
> use. On the odd occasion I also ran into problems with render methods when
> pages were complex.
>
> I now use mostly onActivate and onPassivate, this has proven to be the most
> reliable pattern, and the most scalable. It does require a bit more
> boilerplate code for checking that URL parameters are passed correctly,
> particularly for pages that have 'optional parameters'... the one downside
> is that I have a few more queries now.
>
> So whats missing in an ideal world? A read in a post some time ago that
> conversational patterns may be added in 5.1, that would be great! but what
> would be ideal in my humble view is a proper page persistence Strategy,
> where a value is retained until the user leaves the page. In truth someone
> posted such a solution which used a cookie, and it seemed to behave exactly
> as it should, nevertheless I am still against relying on a cookie. I
> understand this may be difficult to implement due to Tapestry's inner
> workings, particularly the way pages are pooled, but since conversational
> state covers some of this ground (the difference being a conversation is
> tied to not only the page, but the window so each tab is treated as a new
> conversation), I thought to at least to ask if it could be considered at
> some point if at all feasible. I would also love to hear other peoples
> thoughts/opinions on this.
>
> cheers,
> Peter
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tap 5 / 4.1 - Dirty Form Warning?

2008-12-11 Thread Andreas Andreou
it still in tacos :
http://tacos.sourceforge.net/tacos4.1/tacos-core/tapdocs/index.html

Also, sources are easy to follow at :
http://fisheye3.atlassian.com/browse/tacos/tacos-4.1/trunk/tacos-core/src/java/net/sf/tacos/components

so you can further customize or port it

On Thu, Dec 11, 2008 at 2:14 PM, Mike Oestereter
<[EMAIL PROTECTED]> wrote:
> Hi
>
> We may have to port a Tapestry 4.0 app to either Tapestry 4.1 or
> (preferably) 5.0 depending on how easy it would be.
>
> The 4.0 uses the tacos:DirtyFormWarning quite a lot. And we can't find
> such a component in Tapestry 4.1 or 5.0.
>
> Do you know of a similar component or feature in Tapestry 4.1 or 5.0?
>
> Many Thanks
>
> Mike
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AW: AW: Advantages of various .tml storage locations?

2008-12-11 Thread Otho
Uhm... I use the resource folder since the beginning of dabbling around with
Tap5 and never had any issues. In fact it's the first thing I do when
creating a new app via the archetype to create the packages under the
resource directory and moving Index.tml there.

As I am talking about archetypes... The Tapestry quickstart vanished from
the list I get with mvn archetype:generate lately, probably since the update
to maven 2.0.9. Any reason for this?

Regards,
Otho

2008/12/9 Christian Edward Gruber <[EMAIL PROTECTED]>

> No problem.  Turns out it works for pages too.  I've moved my .tml files
> into /src/main/resources (since I don't mind the split) without difficulty.
>
> Christian.
>
>
> On 9-Dec-08, at 06:52 , Maximilian Weißböck wrote:
>
>  Thanks Christian! Exactly what I was looking for!
>>
>> Max
>>
>>
>>  -Ursprüngliche Nachricht-
>>> Von: Christian Edward Gruber [mailto:[EMAIL PROTECTED]
>>> Gesendet: Freitag, 5. Dezember 2008 17:06
>>> An: Tapestry users
>>> Betreff: Re: AW: Advantages of various .tml storage locations?
>>>
>>> It's not a fix, it's a design.  Code goes in /src/main/java. Resources
>>> go in /src/main/resources.  It's part of having a place for
>>> everything, and everything in its place.
>>>
>>> You could hack it by a custom execution of the resources plugin
>>> pointing to your "alternative resources location" (ie, src/main/java)
>>> but this isn't something that needs a solution - it's how the tool
>>> works.
>>>
>>> Actually, i think you could set the resources location to src/main/
>>> java anyway... one sec...
>>>
>>> Yep.
>>>
>>> Use the ... section of the pom
>>> to point at resources in /src/main/java.  eg:
>>>
>>> 
>>>
>>>/
>>>true
>>>${basedir}/src/main/java
>>> **/*.tml 
>>>
>>> 
>>> This should pick up .tml files in /src/main/java.  Not maven best
>>> practice, but if it works for you, have fun.  I still expect it will
>>> only work for components, not pages.  Howard?  True?
>>>
>>> Christian.
>>>
>>> On 5-Dec-08, at 06:05 , Maximilian Weißböck wrote:
>>>
>>>  I would much prefer solution number 1. as it keeps things
 on the same place that belong together.

 Sadly maven build does not work with this solution.
 Is there any maven guru how knows how to "fix" this?

 Thanks, Max

  -Ursprüngliche Nachricht-
> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von
> James
> Hillyerd
> Gesendet: Donnerstag, 4. Dezember 2008 23:06
> An: Tapestry users
> Betreff: Advantages of various .tml storage locations?
>
> What are the pros/cons of keeping page .tml in:
>
> 1. src/main/java
>
> vs
>
> 2. src/main/resources
>
> vs
>
> 3. src/main/webapp
>
> ?
>
>
> I see JumpStart uses #1, and the tutorial uses #3.  Seems like it
> would
> easier to use #1 or #2 so at least the components and pages .tml
> are in
> the
> same directory tree.
>
> Thanks.
>
> -james
>
> --
> James A. Hillyerd <[EMAIL PROTECTED]>
>

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: [ANN] tapestry5-appfuse

2008-12-11 Thread Otho
Only one remark so far.

You should maybe complete the doc page? :)

Regards,
Otho

2008/12/9 SergeEby <[EMAIL PROTECTED]>

>
> Hi,
>
> Version 1.0.1 of the tapestry5-appfuse project has been released.
> It's built with Tapestry 5.0.18 and has several improvements and bug fixes.
>
> See details here:
> http://code.google.com/p/tapestry5-appfuse/
>
> Feedback would be appreciated.
>
>
> /Serge
> --
> View this message in context:
> http://www.nabble.com/-ANN--tapestry5-appfuse-tp20915072p20915072.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Tap 5 / 4.1 - Dirty Form Warning?

2008-12-11 Thread Mike Oestereter
Hi

We may have to port a Tapestry 4.0 app to either Tapestry 4.1 or
(preferably) 5.0 depending on how easy it would be.

The 4.0 uses the tacos:DirtyFormWarning quite a lot. And we can't find
such a component in Tapestry 4.1 or 5.0.

Do you know of a similar component or feature in Tapestry 4.1 or 5.0?

Many Thanks

Mike

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect before page render

2008-12-11 Thread Otho
If you use Spring Security you can also check against the SecurityContext.

Regards,
Otho

2008/12/11 Allex Juang <[EMAIL PROTECTED]>

> Thanks Peter, It works.
>
> Allex J.
>
> Peter Stavrinides 提到:
>
>> Use an application state object (it is session scoped), so on your login
>> page you could have:
>>
>> @ApplicationState
>> private UserStateTracker stateTracker;
>>
>> @InjectPage
>> private Home homePage;
>>
>> Object onActivate(){
>>  if(stateTracker.isSignedIn()){
>>  //user is already signed in so redirect
>>  return homePage;
>>  }
>> }
>>
>>
>> If you need something slightly more complex (i.e.:filtering per request)
>> then you need to implement a request filter and do the checking there:
>>
>> public class PageAccessController implements RequestFilter {
>>
>>  public PageAccessController(ApplicationStateManager asm) {
>>asm_ = asm;
>>  }
>>
>>  public boolean service(Request request, Response response,
>>RequestHandler handler) throws IOException {
>> UserStateTracker stateTracker =
>> asm_.get(UserStateTracker.class);
>>
>>   if(!stateTracker.isSignedIn())
>>   //user is not signed in so redirect him to the login page
>>
>>  }
>>
>>
>> }
>>
>> You also will need a contribution in your AppModule:
>> public static void contributeRequestHandler(
>>OrderedConfiguration configuration,
>>@InjectService("TimingFilter") RequestFilter
>> filter,@InjectService("PageAccessController")
>> RequestFilter pageAccessController) {
>>configuration.add("Timing", filter);
>>configuration.add("PageAccessController",
>> pageAccessController,
>>"before:PageRender");
>>}
>>
>> cheers,
>> Peter
>>
>> - Original Message -
>> From: "Allex Juang" <[EMAIL PROTECTED]>
>> To: "Tapestry users" 
>> Sent: Wednesday, 10 December, 2008 9:31:29 AM GMT +02:00 Athens, Beirut,
>> Bucharest, Istanbul
>> Subject: Redirect before page render
>>
>> Hi,
>>
>> I have a Login page, and user will navigate to, say, Work page after
>> success authenticate process.
>> But when an authenticated user access Login page, I wish to just redirect
>> to Work page.
>> How can I do that?
>>
>> Allex J.
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>> __ NOD32 3680 (20081210) Information __
>>
>> This message was checked by NOD32 antivirus system.
>> http://www.eset.com
>>
>>
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Persistance

2008-12-11 Thread Hugo Palma
I myself have found the need for such a persistence strategy.
I would suggest creating an issue for this so that people can vote and
follow it.

On Fri, Nov 28, 2008 at 10:23 AM, Peter Stavrinides <
[EMAIL PROTECTED]> wrote:

> Hi,
>
> I have been thinking about persistence lately... and after moving all our
> apps from Tapestry 4 to Tapestry 5 this past year, I have noticed distinct
> patterns emerge in the way pages fit together and use persistence, and I
> have been searching all the while for best practices... here are some
> comments on how persistence evolved in my code:
>
> @Persist - I tended to use it a lot in the beginning, but far less now, I
> have found it optimal not to clutter the session, and therefore persist only
> a select few fields (mostly primitives).
>
> @Persist("flash") - I moved to flash persistence wherever I could, as it
> helps limit the number of queries required, but its not always feasible to
> use. On the odd occasion I also ran into problems with render methods when
> pages were complex.
>
> I now use mostly onActivate and onPassivate, this has proven to be the most
> reliable pattern, and the most scalable. It does require a bit more
> boilerplate code for checking that URL parameters are passed correctly,
> particularly for pages that have 'optional parameters'... the one downside
> is that I have a few more queries now.
>
> So whats missing in an ideal world? A read in a post some time ago that
> conversational patterns may be added in 5.1, that would be great! but what
> would be ideal in my humble view is a proper page persistence Strategy,
> where a value is retained until the user leaves the page. In truth someone
> posted such a solution which used a cookie, and it seemed to behave exactly
> as it should, nevertheless I am still against relying on a cookie. I
> understand this may be difficult to implement due to Tapestry's inner
> workings, particularly the way pages are pooled, but since conversational
> state covers some of this ground (the difference being a conversation is
> tied to not only the page, but the window so each tab is treated as a new
> conversation), I thought to at least to ask if it could be considered at
> some point if at all feasible. I would also love to hear other peoples
> thoughts/opinions on this.
>
> cheers,
> Peter
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


[T5.0.17] tapestry-hibernate with EJB/JPA, it is possible?

2008-12-11 Thread Ovidiu Hurducas
Hi!
I want to use EJB3 Persistence with tapestry-hibernate.
I've configured an persistence unit in persistence.xml file.However is keep
trying to find the hibernate configuration.

The exception message is:
org.hibernate.HibernateException: /hibernate.cfg.xml not found

As far as I know all the configuration from persistence.xml is sufficient,
no other hibernate config is needed.

Am I missing something?

Thanks!

--Ovidiu


Re: [T5] 5.0.17 URLEncoderImpl.decode error

2008-12-11 Thread Jan Vissers
> He Martijn,
>
> The URL is not really generated. I was playing with Freemarker (Java
> template engine).
> I tried it to send a mail...
> The URL is in the mail template and the email param is replaced by
> freemarker:
> http://localhost:8090/tapestry/test/user/${user.userEmail}"/>
>
> My test was to send an email with freemarker with a link in it. I want
> to be able to click that link and show the email on the screen.
> So for me it is not handy that the URL encoding has changed, because I
> can not use the  org.apache.tapestry5.internal.services.URLEncoderImpl
> inside my template.

---> Are you sure about this. Looks to me you *can* use it.

Take a look at:

http://freemarker.sourceforge.net/docs/api/freemarker/template/TemplateMethodModelEx.html

http://freemarker.sourceforge.net/docs/ref_directive_function.html

>
> Any ideas how I can solve this?
>
> greetz,
> Leon
>
>
> Martijn Brinkers wrote:
>> I guess the URL is generated outside of Tapestry? because if you
>> passivate or create a link from Tapestry the parameters are encoded with
>> the Tapestry 'special' encoding.
>>
>> You can probably use the default encoder implementation if you want to
>> encode from outside of Tapestry:
>>
>> org.apache.tapestry5.internal.services.URLEncoderImpl
>>
>> Martijn Brinkers
>>
>>
>> On Wed, 2008-12-10 at 23:43 +0100, Leon Derks wrote:
>>
>>> Hi Martijn,
>>>
>>> Thanks!
>>> Yes,  http://localhost:8090/tapestry/test/user/user$0040company.com
>>> works, when I change the @ into $0040 manually.
>>>
>>> But how can I automatically translate @ into $0040, because my code
>>> still generates the '@' character in the url.
>>>
>>> greetz,
>>> Leon
>>>
>>>
>>> Martijn Brinkers wrote:
>>>
 The URL encoder has been changed.

 @ for example is now encoded as $0040

 See https://issues.apache.org/jira/browse/TAP5-302


 Search the archive for what and why things have changed
 http://tapestry.markmail.org

 Martijn Brinkers



 On Wed, 2008-12-10 at 23:19 +0100, Leon Derks wrote:


> Hello
> This evening I tried tapestry 5.0.17
>
> When I type in the following url in my application:
> http://localhost:8090/tapestry/test/user/[EMAIL PROTECTED]
>
> I do get an java.lang.IllegalArgumentException
> It says: "Input string '[EMAIL PROTECTED]' is not valid; the character
> '@' at position 5 is not valid."
> Stacktrace:
>
> org.apache.tapestry5.internal.services.URLEncoderImpl.decode(URLEncoderImpl.java:143)
>
> org.apache.tapestry5.internal.services.ContextPathEncoderImpl.decodePath(ContextPathEncoderImpl.java:70)
>
> org.apache.tapestry5.internal.services.PageRenderDispatcher.process(PageRenderDispatcher.java:88)
>
> org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:71)
>
> org.apache.tapestry5.services.TapestryModule$17.service(TapestryModule.java:1029)
>
> I didn't had this problem in tapestry 5.0.14.
> I searched in the changes, but couldn't find a change that would
> cause
> this error.
>
> Any ideas?
>
> Leon
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 __ NOD32 3682 (20081210) Informatie __

 Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
 http://www.nod32.nl





>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>> __ NOD32 3682 (20081210) Informatie __
>>
>> Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
>> http://www.nod32.nl
>>
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T5] 5.0.17 URLEncoderImpl.decode error

2008-12-11 Thread Martijn Brinkers
I had a similar requirement and decided not use the activation context
for this but do it the 'old fashioned' way with parameters
(ie. ?email=blabla) by injecting the Request service.

If your freemaker code runs inside a Tapestry application I guess you
can add the URLEncoder service to the freemaker context and use if from
a freemarker template

Martijn


On Thu, 2008-12-11 at 09:34 +0100, Leon Derks wrote:
> He Martijn,
> 
> The URL is not really generated. I was playing with Freemarker (Java 
> template engine).
> I tried it to send a mail...
> The URL is in the mail template and the email param is replaced by 
> freemarker:
> http://localhost:8090/tapestry/test/user/${user.userEmail}"/>
> 
> My test was to send an email with freemarker with a link in it. I want 
> to be able to click that link and show the email on the screen.
> So for me it is not handy that the URL encoding has changed, because I 
> can not use the  org.apache.tapestry5.internal.services.URLEncoderImpl 
> inside my template.
> 
> Any ideas how I can solve this?
> 
> greetz,
> Leon
> 
> 
> Martijn Brinkers wrote:
> > I guess the URL is generated outside of Tapestry? because if you
> > passivate or create a link from Tapestry the parameters are encoded with
> > the Tapestry 'special' encoding.
> >
> > You can probably use the default encoder implementation if you want to
> > encode from outside of Tapestry: 
> >
> > org.apache.tapestry5.internal.services.URLEncoderImpl 
> >
> > Martijn Brinkers
> >
> >
> > On Wed, 2008-12-10 at 23:43 +0100, Leon Derks wrote:
> >   
> >> Hi Martijn,
> >>
> >> Thanks!
> >> Yes,  http://localhost:8090/tapestry/test/user/user$0040company.com 
> >> works, when I change the @ into $0040 manually.
> >>
> >> But how can I automatically translate @ into $0040, because my code 
> >> still generates the '@' character in the url.
> >>
> >> greetz,
> >> Leon
> >>
> >>
> >> Martijn Brinkers wrote:
> >> 
> >>> The URL encoder has been changed. 
> >>>
> >>> @ for example is now encoded as $0040
> >>>
> >>> See https://issues.apache.org/jira/browse/TAP5-302
> >>>
> >>>
> >>> Search the archive for what and why things have changed
> >>> http://tapestry.markmail.org
> >>>
> >>> Martijn Brinkers
> >>>
> >>>
> >>>
> >>> On Wed, 2008-12-10 at 23:19 +0100, Leon Derks wrote:
> >>>   
> >>>   
>  Hello
>  This evening I tried tapestry 5.0.17
> 
>  When I type in the following url in my application:
>  http://localhost:8090/tapestry/test/user/[EMAIL PROTECTED]
> 
>  I do get an java.lang.IllegalArgumentException
>  It says: "Input string '[EMAIL PROTECTED]' is not valid; the character 
>  '@' at position 5 is not valid."
>  Stacktrace:
>  
>  org.apache.tapestry5.internal.services.URLEncoderImpl.decode(URLEncoderImpl.java:143)
>  
>  org.apache.tapestry5.internal.services.ContextPathEncoderImpl.decodePath(ContextPathEncoderImpl.java:70)
>  
>  org.apache.tapestry5.internal.services.PageRenderDispatcher.process(PageRenderDispatcher.java:88)
>  
>  org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:71)
>  
>  org.apache.tapestry5.services.TapestryModule$17.service(TapestryModule.java:1029)
> 
>  I didn't had this problem in tapestry 5.0.14.
>  I searched in the changes, but couldn't find a change that would cause 
>  this error.
> 
>  Any ideas?
> 
>  Leon
> 
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
> 
>  
>  
> >>> -
> >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>> For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>> __ NOD32 3682 (20081210) Informatie __
> >>>
> >>> Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
> >>> http://www.nod32.nl
> >>>
> >>>
> >>>
> >>>   
> >>>   
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >> 
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> > __ NOD32 3682 (20081210) Informatie __
> >
> > Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
> > http://www.nod32.nl
> >
> >
> >
> >   
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECT

Re: [T5] 5.0.17 URLEncoderImpl.decode error

2008-12-11 Thread Leon Derks

He Martijn,

The URL is not really generated. I was playing with Freemarker (Java 
template engine).

I tried it to send a mail...
The URL is in the mail template and the email param is replaced by 
freemarker:

http://localhost:8090/tapestry/test/user/${user.userEmail}"/>

My test was to send an email with freemarker with a link in it. I want 
to be able to click that link and show the email on the screen.
So for me it is not handy that the URL encoding has changed, because I 
can not use the  org.apache.tapestry5.internal.services.URLEncoderImpl 
inside my template.


Any ideas how I can solve this?

greetz,
Leon


Martijn Brinkers wrote:

I guess the URL is generated outside of Tapestry? because if you
passivate or create a link from Tapestry the parameters are encoded with
the Tapestry 'special' encoding.

You can probably use the default encoder implementation if you want to
encode from outside of Tapestry: 

org.apache.tapestry5.internal.services.URLEncoderImpl 


Martijn Brinkers


On Wed, 2008-12-10 at 23:43 +0100, Leon Derks wrote:
  

Hi Martijn,

Thanks!
Yes,  http://localhost:8090/tapestry/test/user/user$0040company.com 
works, when I change the @ into $0040 manually.


But how can I automatically translate @ into $0040, because my code 
still generates the '@' character in the url.


greetz,
Leon


Martijn Brinkers wrote:

The URL encoder has been changed. 


@ for example is now encoded as $0040

See https://issues.apache.org/jira/browse/TAP5-302


Search the archive for what and why things have changed
http://tapestry.markmail.org

Martijn Brinkers



On Wed, 2008-12-10 at 23:19 +0100, Leon Derks wrote:
  
  

Hello
This evening I tried tapestry 5.0.17

When I type in the following url in my application:
http://localhost:8090/tapestry/test/user/[EMAIL PROTECTED]

I do get an java.lang.IllegalArgumentException
It says: "Input string '[EMAIL PROTECTED]' is not valid; the character 
'@' at position 5 is not valid."

Stacktrace:

org.apache.tapestry5.internal.services.URLEncoderImpl.decode(URLEncoderImpl.java:143)

org.apache.tapestry5.internal.services.ContextPathEncoderImpl.decodePath(ContextPathEncoderImpl.java:70)

org.apache.tapestry5.internal.services.PageRenderDispatcher.process(PageRenderDispatcher.java:88)

org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:71)

org.apache.tapestry5.services.TapestryModule$17.service(TapestryModule.java:1029)


I didn't had this problem in tapestry 5.0.14.
I searched in the changes, but couldn't find a change that would cause 
this error.


Any ideas?

Leon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__ NOD32 3682 (20081210) Informatie __

Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
http://www.nod32.nl



  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



__ NOD32 3682 (20081210) Informatie __

Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
http://www.nod32.nl



  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]