Re: T5: getting json value in tml

2011-02-04 Thread Angelo C.

turned out it has to be:
${js.get('name1')}
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-getting-json-value-in-tml-tp3370385p3370676.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: getting json value in tml

2011-02-04 Thread WINDEY Pieter AWL-IT
Never done this before,
But ${js.get('name1')}  should show you your value.
See http://www.json.org/javadoc/org/json/JSONObject.html for more info


-Original Message-
From: Angelo C. [mailto:angelochen...@gmail.com]
Sent: Friday 4 February 2011 03:51
To: users@tapestry.apache.org
Subject: T5: getting json value in tml


Hi,

How to get the value of a json object in tml file, following does not work:

in page class:

public JSONObject getJS() {
   JSONObject js = new JSONObject();
   js.put(name1,123);
   return js;
}


in the tmp,

 ${js} // this shows key/value pair
 ${js.name1}  // does not show anything

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-getting-json-value-in-tml-tp3370385p3370385.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




Atos Worldline SA/NV - Chaussee de Haecht 1442 Haachtsesteenweg
- 1130 Brussels - Belgium
RPM-RPR Bruxelles-Brussel - TVA-BTW BE 0418.547.872
Bankrekening-Compte Bancaire-Bank Account 310-0269424-44
BIC BBRUBEBB - IBAN BE55 3100 2694 2444

The information contained in this e-mail and any attachment thereto is 
confidential and may contain information which is protected by intellectual 
property rights.
This information is intended for the exclusive use of the recipient(s) named 
above.
This e-mail does not constitute any binding relationship or offer toward any of 
the addressees.
If you are not one of the addressees , one of their employees or a proxy holder 
entitled to hand over this message to the addressee(s), any use of the 
information contained herein (e.g. reproduction, divulgation, communication or 
distribution,...) is prohibited.
If you have received this message in error, please notify the sender and 
destroy it immediately after.
The integrity and security of this message cannot be guaranteed and it may be 
subject to data corruption, interception and unauthorized amendment, for which 
we accept no liability.


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



Re: T5: Recording errors for fields in a loop

2011-02-04 Thread Stephan Windmüller
On 02.02.2011 16:39, Benny Law wrote:

 Yes, I am doing cross-field validation (e.g. quantity is required if another
 property of the item has a certain value) and that's why it has to be done
 in onValidateForm(), or at least that's what I think.

We have a similar issue in our application. You can solve yours like this:

- Inject the textfield in your page
- In onValidateFromQuantatiy(String), store quantity.getControlName
  in a Map
- In onValidateForm, proceed with your validation. To record an error,
  set the saved controlName to the component and push it into
  recordError

HTH
 Stephan

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



Any known workarounds to support HTML5

2011-02-04 Thread Daniel Henze
There have been some discussions regarding the support of HTML5 in 
future versions of Tapestry, but so far I am only aware of a latest 
thread stating that HTML5 is not a standard yet and therefore won't be 
supported just yet.


As I understand the Parser needs a DTD to be able to work and since 
there is no official DTD for HTML5, that is a no go.


Does anybody know of a workaround to make use of HTML5 in T5.2?

regards
Daniel

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



Re: Any known workarounds to support HTML5

2011-02-04 Thread Thiago H. de Paula Figueiredo
On Fri, 04 Feb 2011 09:57:38 -0200, Daniel Henze dhe...@googlemail.com  
wrote:


There have been some discussions regarding the support of HTML5 in  
future versions of Tapestry, but so far I am only aware of a latest  
thread stating that HTML5 is not a standard yet and therefore won't be  
supported just yet.
As I understand the Parser needs a DTD to be able to work and since  
there is no official DTD for HTML5, that is a no go.

Does anybody know of a workaround to make use of HTML5 in T5.2?


Search the mailing list archives. You'll find at least one workaround. ;)

--
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



Tynamo Security and Tapestry case insensitive paths

2011-02-04 Thread Barry Books
First I'd like to say the Tynamo-Security/Shiro package is great, but
I've run into a simple problem I'm not sure how to solve. I don't
think it's really a Tynamo problem but an interaction between how
Shiro expects URLs to work and Tapestry case insensitive URLs. I was
working on a simple site with an admin account and an admin directory
so I added the following to the shiro.ini file:

[urls]
/admin/** = authc, roles[administrator]

The problem is if you go to /Admin the authentication is bypassed
because /admin != /Admin. I realize this is a feature but it does not
seem very desirable. I also realize I could annotate all my admin
pages and fix this but that's some amount of work and error prone. I
looked thru the Shiro docs and I don't see anyway to do a case
insensitive match. I thought I might be able to fix this with a
URLRewriter and map /Admin to /admin but that does not seem to work
either.

Am I missing something? Is there any simple way to resolve this?

Thanks
Barry

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



Re: Tynamo Conversations Java 5

2011-02-04 Thread Michael Gentry
The other day on the Cayenne list we were talking about dropping
support for Java 1.5 in Cayenne 3.1.  Someone pointed out that PowerPC
Macs (which are still in use -- desktops and servers) don't have the
option of Java 1.6 yet, so we decided to stick with Java 1.5 for the
time being since Java 1.6 didn't really provide anything necessary.

mrg


On Mon, Jan 31, 2011 at 11:16 AM, Kalle Korhonen
kalle.o.korho...@gmail.com wrote:
 I've always wondered how you can be progressive and conservative at
 the same time :) No reason except we didn't think that anybody would
 be using Java5 anymore together with tapestry apps. You could grab the
 source, set the compiler target version to 1.5 (we changed it in the
 latest parent to 1.6) and re-build, I believe it should work. If you
 provide a really good reason, we might re-consider deploying 1.5
 versions but nobody has asked before.

 Kalle


 On Mon, Jan 31, 2011 at 6:45 AM, Richard Schurig r.schu...@inka-kag.de 
 wrote:

 Hi all,

 does anybody know if there's a Tynamo Conversations JAR available for Java
 5? I just tried version 0.1.2 for Tapestry 5.1.0.5 running with Java 5 and
 it gives bad version number in .class file. Any reason why it requires
 Java 6?

 Thanks in advance
 Richard



  Ressourcen schonen, weniger drucken - Think before you print! 

 --
 Diese E-Mail sowie eventuelle Anhänge enthalten vertrauliche und / oder 
 rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat 
 sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte 
 sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren 
 oder Speichern sowie die unbefugte Weitergabe dieser E-Mail sind nicht 
 gestattet.

 This e-mail and any attachments may contain confidential and / or privileged 
 information. If you are not the intended recipient or have received this 
 e-mail in error, please notify the sender immediately and destroy this 
 e-mail . Any unauthorized copying, storing, disclosure or distribution of 
 the contents of this e-mail is strictly forbidden.

 -
 Internationale Kapitalanlagegesellschaft mbH
 Sitz: Düsseldorf, Yorckstraße 21, 40476 Düsseldorf, Handelsregister: 
 Amtsgericht Düsseldorf HRB 11533
 Geschäftsführung: Markus Hollmann, Alexander Poppe
 Vorsitzende des Aufsichtsrats: Carola Gräfin v. Schmettow

 -
 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



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



Re: Any known workarounds to support HTML5

2011-02-04 Thread Daniel Henze
Thanks Thiago! Searching in the title for HTML 5 not just HTML5 
helps. ;)


For me this patch did proof to be working just fine: 
https://issues.apache.org/jira/browse/TAP5-1040?page=com.atlassian.streams.streams-jira-plugin%3Aactivity-stream-issue-tab#issue-tabs


Also noteworthy to support HTML entities (e.g. for 
internationalisation,  special characters) is the following: 
https://issues.apache.org/jira/browse/TAP5-840


Cheers
Daniel

Am 04.02.2011 13:09, schrieb Thiago H. de Paula Figueiredo:
On Fri, 04 Feb 2011 09:57:38 -0200, Daniel Henze 
dhe...@googlemail.com wrote:


There have been some discussions regarding the support of HTML5 in 
future versions of Tapestry, but so far I am only aware of a latest 
thread stating that HTML5 is not a standard yet and therefore won't 
be supported just yet.
As I understand the Parser needs a DTD to be able to work and since 
there is no official DTD for HTML5, that is a no go.

Does anybody know of a workaround to make use of HTML5 in T5.2?


Search the mailing list archives. You'll find at least one workaround. ;)



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



Re: Tynamo Security and Tapestry case insensitive paths

2011-02-04 Thread Mark
Even if you map /Admin to /admin, wouldn't you also need to map
/aDmin, /adMin, /admIn, /admiN, /ADmin, /aDMin, etc. ?

Personally I just use the annotations, but I can see how that might be
a bit difficult to retrofit into an application.

Mark

On Fri, Feb 4, 2011 at 6:32 AM, Barry Books trs...@gmail.com wrote:
 First I'd like to say the Tynamo-Security/Shiro package is great, but
 I've run into a simple problem I'm not sure how to solve. I don't
 think it's really a Tynamo problem but an interaction between how
 Shiro expects URLs to work and Tapestry case insensitive URLs. I was
 working on a simple site with an admin account and an admin directory
 so I added the following to the shiro.ini file:

 [urls]
 /admin/** = authc, roles[administrator]

 The problem is if you go to /Admin the authentication is bypassed
 because /admin != /Admin. I realize this is a feature but it does not
 seem very desirable. I also realize I could annotate all my admin
 pages and fix this but that's some amount of work and error prone. I
 looked thru the Shiro docs and I don't see anyway to do a case
 insensitive match. I thought I might be able to fix this with a
 URLRewriter and map /Admin to /admin but that does not seem to work
 either.

 Am I missing something? Is there any simple way to resolve this?

 Thanks
 Barry

 -
 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



URL rewriting to create bookmarkable URLs

2011-02-04 Thread Stephan Schwab

Unfortunately I've been a bit out of the loop since version 5.2.x came out.
Hopefully someone can bring me up to speed on this. Instead of hacking
something together that may work I'd like to ask what the recommended
approach for this is.

In my application I would like to avoid using a session for each and
everything. So instead I want to carry around an ID in the URL and also get
bookmarkable URLs at the same time. I want to receive that ID as
EventContext.

So 

/myapp/ID/mypage

should become

/myapp/mypage/ID 

with the ID being passed in as EventContext to onActivate()

Of course I don't want any URLs without the ID to leak out.

Stephan

-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/URL-rewriting-to-create-bookmarkable-URLs-tp3371226p3371226.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: URL rewriting to create bookmarkable URLs

2011-02-04 Thread Igor Drobiazko
The approach is described here:

http://blog.tapestry5.de/index.php/2010/09/06/new-url-rewriting-api/

On Fri, Feb 4, 2011 at 4:56 PM, Stephan Schwab s...@caimito.net wrote:


 Unfortunately I've been a bit out of the loop since version 5.2.x came out.
 Hopefully someone can bring me up to speed on this. Instead of hacking
 something together that may work I'd like to ask what the recommended
 approach for this is.

 In my application I would like to avoid using a session for each and
 everything. So instead I want to carry around an ID in the URL and also get
 bookmarkable URLs at the same time. I want to receive that ID as
 EventContext.

 So

 /myapp/ID/mypage

 should become

 /myapp/mypage/ID

 with the ID being passed in as EventContext to onActivate()

 Of course I don't want any URLs without the ID to leak out.

 Stephan

 --
 View this message in context:
 http://tapestry.1045711.n5.nabble.com/URL-rewriting-to-create-bookmarkable-URLs-tp3371226p3371226.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




-- 
Best regards,

Igor Drobiazko
http://tapestry5.de


Re: URL rewriting to create bookmarkable URLs

2011-02-04 Thread Stephan Schwab

Hi Igor!

Yes, I read that. And rewriting incoming URLs works just fine.

But what about the other direction?

Let's say I have a page link in one of my *.tml

t:pageLink page=mypage...

Do I have to add the context to each and every page link manually or is
there a way that I can do this using some transformer? I don't want to end
up with /app/mypage/ID but /app/ID/mypage

Stephan

-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/URL-rewriting-to-create-bookmarkable-URLs-tp3371226p3371288.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: Recording errors for fields in a loop

2011-02-04 Thread Benny Law
Hi Stephan,

Thanks for providing this solution. I tried to implement this, but got stuck
on the last step. Could you tell me how you set the saved controlName to
the component? I couldn't find a public setter for this property. I
searched the whole class hierarchy for TextField and couldn't find anything.
Do I need to create a wrapper for it? Thanks.

Benny

On Fri, Feb 4, 2011 at 4:30 AM, Stephan Windmüller 
stephan.windmuel...@tu-dortmund.de wrote:

 On 02.02.2011 16:39, Benny Law wrote:

  Yes, I am doing cross-field validation (e.g. quantity is required if
 another
  property of the item has a certain value) and that's why it has to be
 done
  in onValidateForm(), or at least that's what I think.

 We have a similar issue in our application. You can solve yours like this:

 - Inject the textfield in your page
 - In onValidateFromQuantatiy(String), store quantity.getControlName
  in a Map
 - In onValidateForm, proceed with your validation. To record an error,
  set the saved controlName to the component and push it into
  recordError

 HTH
  Stephan

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




Re: Tynamo Security and Tapestry case insensitive paths

2011-02-04 Thread Barry Books
The fact that /aDmin, /Admin, /ADmin etc all work is exactly the
problem. That makes the whole url protection mechanism useless and
even worse it's not obvious it's not going to work. I just followed
the example and it seemed to work.

It's not really a big deal to add the annotations but in my case I've
got more admin pages than non admin pages and if I forget one then
that page is not protected. Plus one is compile time and the other is
run time so I can't do something like

[urls]
/hibernate/** = authc, roles[developer]

without recompiling the hibernate code.

Again I realize this is all a feature, but when all the features are
combined the result does not seem so good.

From looking at the code it seems Shiro is using the ServletRequest to
get the URL. That seems reasonable. Perhaps the solution is to create
a TapestryIniShiroFilter and do a case insensitive match there.

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



Re: Rewriting index.html using LinkTransformer

2011-02-04 Thread Thiago H. de Paula Figueiredo
On Wed, 02 Feb 2011 07:04:54 -0200, Olaf Tomczak olaf.tomc...@gmail.com  
wrote:



Hello,


Hi!


I recently migrated to Tapestry 5.2 and decided to re-implement
URLRewriter rules as LinkTransformers. Unfortunately there's a
problem. I have to rewrite all requests to *.html pages and route them
to my Index page (since the application was previously using html
pages and some users have it bookmarked). The
PageRenderLinkTransformer works for this purpose except for index.html
page. Since Index is a page name, requests to index.html are
automatically treated as component event requests (component html of
Index page) and are not passed through my transformer. Is there a way
to work around this issue?


I guess you hit a scenario which is not covered in LinkTransforms, as they  
only deal with event URL - event URL and page URL - page URL  
transformations, but not event URL (anything with a dot in it) - page  
render URL nor vice-versa.


--
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: T5: Recording errors for fields in a loop

2011-02-04 Thread Stephan Windmüller
On 04.02.2011 17:44, Benny Law wrote:

 Thanks for providing this solution. I tried to implement this, but got stuck
 on the last step. Could you tell me how you set the saved controlName to
 the component? I couldn't find a public setter for this property. I
 searched the whole class hierarchy for TextField and couldn't find anything.
 Do I need to create a wrapper for it? Thanks.

Sorry, I forgot. You need to implement a simple field (implementing
Field) which passes the methods

public void setControlName(String controlName);
public String getControlName();

to the public. Insert it in your tml and inject it in your java class,
acting as a dummy for the validation.

HTH
 Stephan

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



3500 character posted EventLink results in 413 error...where?

2011-02-04 Thread flavor8

Hello,

Our app can be persuaded to construct a 3500 character event link. Debugging
the javascript, I can see that the Ajax.Request is set up by Prototype, and
dispatched; then the Tapestry error console pops up with the message FULL
head, http status 413, null. 

The strange things are:

1) I can copy and paste the url, and the server handles it without issue. So
this doesn't appear to be a true HTTP error code.

2) With either tcpmon or tcpdump active, there appears to be nothing passing
across the wire when this link is ostensibly sent, leading me to think
that something is short circuiting in the XmlHttpRequest object. 

Anybody encountered similar? 

Thanks
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/3500-character-posted-EventLink-results-in-413-error-where-tp3371509p3371509.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



T5.3 and chenillekit

2011-02-04 Thread Sergio Esteves

Using chenillekit 1.3.0 with tapestry 5.3 I get the following error:
«
[INFO] ioc.RegistryBuilder Adding module definition for class 
org.apache.tapestry5.internal.services.InternalModule
2011-02-04 17:55:18.117:WARN::failed iptvrating: 
java.lang.RuntimeException: Error invoking service binder method 
org.apache.tapestry5.internal.services.InternalModule.bind(ServiceBinder) (at 
InternalModule.java:73): Implementing class
2011-02-04 17:55:18.119:WARN::Failed startup of context 
org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@aad0b{/iptvrating,\IPTVRating\src\main\webapp}
java.lang.RuntimeException: Error invoking service binder method 
org.apache.tapestry5.internal.services.InternalModule.bind(ServiceBinder) (at 
InternalModule.java:73): Implementing class
at 
org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.bind(DefaultModuleDefImpl.java:597)
 at 
org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.init(DefaultModuleDefImpl.java:156)

 at org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:124)
 at 
org.apache.tapestry5.internal.TapestryAppInitializer.addModules(TapestryAppInitializer.java:195)
 at 
org.apache.tapestry5.internal.TapestryAppInitializer.init(TapestryAppInitializer.java:145)

 at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:90)
 at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
 at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
 at 
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713)

 at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
 at 
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
 at 
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)

 at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
 at 
org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:115)
 at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
 at 
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
 at 
org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
 at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
 at 
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
 at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
 at 
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)

 at org.mortbay.jetty.Server.doStart(Server.java:224)
 at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
 at 
org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
 at 
org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:454)
 at 
org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:396)
 at 
org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:210)

 at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184)
 at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
 at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)
 at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
 at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
 at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
 at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
 at 
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
 at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)

 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:314)
 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:151)
 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:445)
 at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:168)
 at org.apache.maven.cli.MavenCli.main(MavenCli.java:132)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

 at java.lang.reflect.Method.invoke(Method.java:597)
 at 
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
 at 
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
 at 
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
 at 
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

»

Is there any workaround for this?

Thanks.

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

Re: 3500 character posted EventLink results in 413 error...where?

2011-02-04 Thread Thiago H. de Paula Figueiredo

On Fri, 04 Feb 2011 15:59:29 -0200, flavor8 tapes...@flavor8.com wrote:


Hello,


Hi!

Our app can be persuaded to construct a 3500 character event link.  
Debugging the javascript, I can see that the Ajax.Request is set up by  
Prototype, and dispatched; then the Tapestry error console pops up with  
the message FULL head, http status 413, null.


I don't know if this is the problem, but URLs with 3500 characters are not  
recommended. Some browsers have strict limits on URL length. Internet  
Explorer's limit is 2083.


--
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



Firefox 4 and required attribute

2011-02-04 Thread Nicolas Barrera
Hi,

I 've not tested it personally but my client has used ff4 with my t5
application.

The unexpected result is that ff checks for that field to have a value...
preventing tapestry own validation to execute.

is that a kind of issue on tapestry?, I really don't know but maybe the
required attribute is a new attribute from html5 or firefox propietary.


well, perhaps some one has already experienced that and has developed some
kind of workaround

cheers.



Nicolás.-


Re: AjaxFormLoop does not render informal parameters

2011-02-04 Thread Robson Paniago de Miranda
Hi,

Since I didn't receive any feedback about this issue, I would like to know
if my approach to server validation and the problem with old values stale in
FormValidator was correct (i.e, to push an other implementation of
FormSupport which overrides the naming of the controls for each iteration,
based on the clientValue of the iterator).

Thanks,
  Robson Paniago


2011/1/29 Robson Paniago de Miranda rpdmira...@gmail.com

 Hi,

 I'm using AjaxFormLoop component in one of my projects, and I noticed that
 this component does not render informal parameters.

 There is some modification that could be made to the template of this
 component that can allow it to render informal parameters (especially the
 class attribute)?

 BTW, I solved the problem described in bug TAP5-280 (
 https://issues.apache.org/jira/browse/TAP5-280) by storing commands that
 override the default behaviour of FormSupport, allocating new component ids
 concatenated with the client value of the loop's value.

 Att,
   Robson Paniago




Object is sticking around between sessions.

2011-02-04 Thread jackkurosaki
I have a page where a user fills out a form and submits it. The onSubmit method 
checks to make sure everything is valid, adds the submitted item to the 
database and then shows the next page.  If there is a problem, it sets the 
errors on the form and returns the current page by returning null.

This all works finebut

If the user fills out the form and there is an error, the next person to visit 
the page--even from another session will see the data that they filled out, but 
never was actually pushed to the database.

Obviously I want someone who shows up in a new session to get their own unique 
Item object to populate with their data and NOT see the previous person's data.

Two things that might have a bearing on this:

1. I am creating a new item that backs the form in the page .java file at its 
declaration.  So Item item = new Item(); 

2. I cam calling componentResources.discardPersistentFieldChanges(); but only 
after the Item has been saved to the database. So this doesn't happen if the 
checks in onSubmit fail and I set and error and return null.

Any suggestions or guidance?

Jack


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



Re: Object is sticking around between sessions.

2011-02-04 Thread Thiago H. de Paula Figueiredo

On Fri, 04 Feb 2011 18:31:53 -0200, jackkuros...@w9z.org wrote:


Two things that might have a bearing on this:
1. I am creating a new item that backs the form in the page .java file  
at its declaration.  So Item item = new Item();


Never initialize a field in its declaration unless it is an atomic value.  
That's the source of your problem. After the request is finished, all  
fields are reset to their initial declared values. As Item is a class,  
your item fields is always pointing to the same object. Use the prepare  
event or onActivate() instead.


By the way, use the validate form event to do validation instead of submit.

--
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: Object is sticking around between sessions.

2011-02-04 Thread jackkurosaki
Ok I tried putting the 
void onActivate() {
   item = new Item();
}

But now Ajax is acting funny.  Is onActivate called every time an Ajax response 
is requested?

Jack


-Original Message-
From: Thiago H. de Paula Figueiredo thiag...@gmail.com
Sent: Friday, February 4, 2011 3:46pm
To: Tapestry users users@tapestry.apache.org, jackkuros...@w9z.org
Subject: Re: Object is sticking around between sessions.

On Fri, 04 Feb 2011 18:31:53 -0200, jackkuros...@w9z.org wrote:

 Two things that might have a bearing on this:
 1. I am creating a new item that backs the form in the page .java file  
 at its declaration.  So Item item = new Item();

Never initialize a field in its declaration unless it is an atomic value.  
That's the source of your problem. After the request is finished, all  
fields are reset to their initial declared values. As Item is a class,  
your item fields is always pointing to the same object. Use the prepare  
event or onActivate() instead.

By the way, use the validate form event to do validation instead of submit.

-- 
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: Object is sticking around between sessions.

2011-02-04 Thread jackkurosaki
Here is what eventually seemed to work.  Is there a better way to do it?


I added @Persist to the item declaration:
@Persist
@Property
Item item;

If there isn't an item, I create one in onActivate.

public void onActivate() {
   if(item == null) item = new Item();
}

If everything is successful I call
   componentResources.discardPersistentFieldChanges();

Right before I return the next page. (I'm not sure if I need to do that or not.)

Thanks!

Jack

-Original Message-
From: jackkuros...@w9z.org
Sent: Friday, February 4, 2011 3:53pm
To: Tapestry users users@tapestry.apache.org
Subject: Re: Object is sticking around between sessions.

Ok I tried putting the 
void onActivate() {
   item = new Item();
}

But now Ajax is acting funny.  Is onActivate called every time an Ajax response 
is requested?

Jack


-Original Message-
From: Thiago H. de Paula Figueiredo thiag...@gmail.com
Sent: Friday, February 4, 2011 3:46pm
To: Tapestry users users@tapestry.apache.org, jackkuros...@w9z.org
Subject: Re: Object is sticking around between sessions.

On Fri, 04 Feb 2011 18:31:53 -0200, jackkuros...@w9z.org wrote:

 Two things that might have a bearing on this:
 1. I am creating a new item that backs the form in the page .java file  
 at its declaration.  So Item item = new Item();

Never initialize a field in its declaration unless it is an atomic value.  
That's the source of your problem. After the request is finished, all  
fields are reset to their initial declared values. As Item is a class,  
your item fields is always pointing to the same object. Use the prepare  
event or onActivate() instead.

By the way, use the validate form event to do validation instead of submit.

-- 
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




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



Re: Object is sticking around between sessions.

2011-02-04 Thread Thiago H. de Paula Figueiredo

On Fri, 04 Feb 2011 18:53:46 -0200, jackkuros...@w9z.org wrote:


Ok I tried putting the
void onActivate() {
   item = new Item();
}

But now Ajax is acting funny.  Is onActivate called every time an Ajax  
response is requested?


Yes. Every request to the page, AJAX or not, triggers onActivate(). Use  
onPrepare() instead. And just instantiate another item if the field is null


--
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: Object is sticking around between sessions.

2011-02-04 Thread Thiago H. de Paula Figueiredo

On Fri, 04 Feb 2011 19:08:06 -0200, jackkuros...@w9z.org wrote:


Here is what eventually seemed to work.  Is there a better way to do it?

I added @Persist to the item declaration:
@Persist
@Property
Item item;


I'd suggest using @Persist(flash) and invoking  
componentResources.discardPersistentFieldChanges() in the afterRender  
event:


void afterRender() {
componentResources.discardPersistentFieldChanges();
}

--
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: Object is sticking around between sessions.

2011-02-04 Thread jackkurosaki
Thanks Thiago! The only thing that didn't seem to work was changing @Persist to 
@Persist(flash) When I use Flash I start getting Ajax errors again.  With my 
limited knowledge my best guess is that the flash persistence isn't keeping the 
Item around when Ajax calls are made after the page has been rendered.  (The 
Ajax on the page is updated fields and adding objects to Item.)

Going back to @Persist works fine, but I want to make sure that it isn't 
something that is going to come back to bite me later. Is it better to use 
@Persist(flash) where possible just because it reduces the amount of memory 
used to hold the session or are there other reasons to avoid @Persist in this 
situation.

Thanks again.

Jack

-Original Message-
From: Thiago H. de Paula Figueiredo thiag...@gmail.com
Sent: Friday, February 4, 2011 4:10pm
To: Tapestry users users@tapestry.apache.org
Subject: Re: Object is sticking around between sessions.


I'd suggest using @Persist(flash) and invoking  
componentResources.discardPersistentFieldChanges() in the afterRender  
event:

void afterRender() {
componentResources.discardPersistentFieldChanges();
}




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



Unit Testing DAOs

2011-02-04 Thread matt...@mustardgrain.com

Hello,

I'm attempting to unit test my Hibernate DAOs and I haven't yet been 
successful in connecting to the database and adding an entity, although 
I believe I'm close to getting something successfully added. Currently 
my test looks like this:


@Test
public void userTest() {
RegistryBuilder builder = new RegistryBuilder();

builder.add(DaoModule.class);
builder.add(HibernateCoreModule.class);
Registry reg = builder.build();

userDao = reg.getService(UserDao.class);
User user = createUser();

userDao.addUser(user);
}

and this is my DaoModule:

public class DaoModule {

public static UserDao buildUserDao 
(@InjectService(HibernateSessionManager)

HibernateSessionManager sessionManager) {
UserDao userDao = new UserDao();
userDao.setSessionManager(sessionManager);
return userDao;
}
}

The problem I'm having is that when I attempt to persist a User object 
via session.persist() I get the error:
org.hibernate.MappingException: Unknown entity: 
com.mustardgrain.clientdailyupdate.entities.User
even though I'm using the import javax.persistence.Entity annotation. Am 
I close to correctly testing here or am I barking up the wrong tree?


Thanks, Matthew

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



Re: Unit Testing DAOs

2011-02-04 Thread Thiago H. de Paula Figueiredo
On Fri, 04 Feb 2011 19:37:03 -0200, matt...@mustardgrain.com  
matt...@mustardgrain.com wrote:



Hello,


Hi!

org.hibernate.MappingException: Unknown entity:  
com.mustardgrain.clientdailyupdate.entities.User

even though I'm using the import javax.persistence.Entity annotation.


You'll probably need to add your AppModule to the list of modules before  
building the Registry.


--
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: Unit Testing DAOs

2011-02-04 Thread matt...@mustardgrain.com

On 2/4/11 1:45 PM, Thiago H. de Paula Figueiredo wrote:
On Fri, 04 Feb 2011 19:37:03 -0200, matt...@mustardgrain.com 
matt...@mustardgrain.com wrote:



Hello,


Hi!

org.hibernate.MappingException: Unknown entity: 
com.mustardgrain.clientdailyupdate.entities.User

even though I'm using the import javax.persistence.Entity annotation.


You'll probably need to add your AppModule to the list of modules 
before building the Registry.


I've actually tried adding the AppModule before building as well, and 
when I added it I got this exception:
java.lang.IllegalArgumentException: Contribution 
com.mustardgrain.clientdailyupdate.services.AppModule.contributeRequestHandler(OrderedConfiguration, 
RequestFilter) (at AppModule.java:120) is for service 'RequestHandler', 
which does not exist.


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



Re: Unit Testing DAOs

2011-02-04 Thread matt...@mustardgrain.com

On 2/4/11 1:49 PM, matt...@mustardgrain.com wrote:

On 2/4/11 1:45 PM, Thiago H. de Paula Figueiredo wrote:
On Fri, 04 Feb 2011 19:37:03 -0200, matt...@mustardgrain.com 
matt...@mustardgrain.com wrote:



Hello,


Hi!

org.hibernate.MappingException: Unknown entity: 
com.mustardgrain.clientdailyupdate.entities.User

even though I'm using the import javax.persistence.Entity annotation.


You'll probably need to add your AppModule to the list of modules 
before building the Registry.


I've actually tried adding the AppModule before building as well, and 
when I added it I got this exception:
java.lang.IllegalArgumentException: Contribution 
com.mustardgrain.clientdailyupdate.services.AppModule.contributeRequestHandler(OrderedConfiguration, 
RequestFilter) (at AppModule.java:120) is for service 
'RequestHandler', which does not exist.


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

Also when I created a MockModule class, which created an EasyMock 
RequestHandler I still ended up with  org.hibernate.MappingException: 
Unknown entity: com.mustardgrain.clientdailyupdate.entities.User



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



Re: Unit Testing DAOs

2011-02-04 Thread Kalle Korhonen
If you are not using a (JPA) EntityManager or Tapestry's Hibernate
integration, you need to let Hibernate know about the entities
yourself. If you are really only testing the DAOs, you shouldn't need
to power up the IoC registry. Here's an excerpt of my persistence test
base class (with Mockito):

public abstract class PersistenceTest {
protected Session session;
protected Transaction transaction;
protected static SessionFactory sessionFactory;
protected HibernateSessionSource sessionSource;

@BeforeClass
public static void staticSetUp() {
AnnotationConfiguration configuration = new 
AnnotationConfiguration();
configuration.addAnnotatedClass(...);
configuration.addAnnotatedClass(...);
sessionFactory = configuration.buildSessionFactory();
}

@Before
public void beforeTest() {
session = sessionFactory.openSession();
transaction = session.beginTransaction();
sessionSource = mock(HibernateSessionSource.class);
when(sessionSource.create()).thenReturn(session);
}

@After
public void afterTest() {
if (transaction != null) if (transaction.isActive()) 
transaction.rollback();
}
}

Kalle


On Fri, Feb 4, 2011 at 2:26 PM, matt...@mustardgrain.com
matt...@mustardgrain.com wrote:
 On 2/4/11 1:49 PM, matt...@mustardgrain.com wrote:

 On 2/4/11 1:45 PM, Thiago H. de Paula Figueiredo wrote:

 On Fri, 04 Feb 2011 19:37:03 -0200, matt...@mustardgrain.com
 matt...@mustardgrain.com wrote:

 Hello,

 Hi!

 org.hibernate.MappingException: Unknown entity:
 com.mustardgrain.clientdailyupdate.entities.User
 even though I'm using the import javax.persistence.Entity annotation.

 You'll probably need to add your AppModule to the list of modules before
 building the Registry.

 I've actually tried adding the AppModule before building as well, and when
 I added it I got this exception:
 java.lang.IllegalArgumentException: Contribution
 com.mustardgrain.clientdailyupdate.services.AppModule.contributeRequestHandler(OrderedConfiguration,
 RequestFilter) (at AppModule.java:120) is for service 'RequestHandler',
 which does not exist.

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

 Also when I created a MockModule class, which created an EasyMock
 RequestHandler I still ended up with  org.hibernate.MappingException:
 Unknown entity: com.mustardgrain.clientdailyupdate.entities.User


 -
 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: Tynamo Security and Tapestry case insensitive paths

2011-02-04 Thread Barry Books
The problem is fixable in the Tynamo library so I filed a Jira and
included a fix.

http://jira.codehaus.org/browse/TYNAMO-75

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



Re: T5: Recording errors for fields in a loop

2011-02-04 Thread Benny Law
Thanks Stephan, I got it working now.
I wonder if built-in support for this has been requested as an enhancement?

Benny

On Fri, Feb 4, 2011 at 12:59 PM, Stephan Windmüller 
stephan.windmuel...@tu-dortmund.de wrote:

 On 04.02.2011 17:44, Benny Law wrote:

  Thanks for providing this solution. I tried to implement this, but got
 stuck
  on the last step. Could you tell me how you set the saved controlName to
  the component? I couldn't find a public setter for this property. I
  searched the whole class hierarchy for TextField and couldn't find
 anything.
  Do I need to create a wrapper for it? Thanks.

 Sorry, I forgot. You need to implement a simple field (implementing
 Field) which passes the methods

 public void setControlName(String controlName);
 public String getControlName();

 to the public. Insert it in your tml and inject it in your java class,
 acting as a dummy for the validation.

 HTH
  Stephan

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




Re: Firefox 4 and required attribute

2011-02-04 Thread Andreas Andreou
It's html5, see http://diveintohtml5.org/forms.html
eventually all browsers will somehow support this.

The question is who is outputting the attribute?

On Fri, Feb 4, 2011 at 21:06, Nicolas Barrera nbarr...@gmail.com wrote:
 Hi,

 I 've not tested it personally but my client has used ff4 with my t5
 application.

 The unexpected result is that ff checks for that field to have a value...
 preventing tapestry own validation to execute.

 is that a kind of issue on tapestry?, I really don't know but maybe the
 required attribute is a new attribute from html5 or firefox propietary.


 well, perhaps some one has already experienced that and has developed some
 kind of workaround

 cheers.



 Nicolás.-




-- 
Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
Tapestry PMC / Tacos developer
Open Source / JEE Consulting

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



Re: Tynamo Security and Tapestry case insensitive paths

2011-02-04 Thread Kalle Korhonen
Sorry for being a bit late to the party. Thanks Barry for reporting
and already proposing a patch. Yes, it really seems it's a feature of
Shiro. I do a find it a bit funny though (yes, I'm a Shiro committer
but haven't been on board from the beginning) that it's the default
behavior and that there's no configurable option to make it case
insensitive even if this is never an issue if your resource urls are
case sensitive. Regardless, Tapestry treating urls as case insensitive
makes this a bug in tapestry-security. Lowercasing all urls repeatedly
incurs a perfomance penalty, so I'll make this configurable (you may
have url normalizers etc. running in front of Tapestry app). I'll open
an issue against Shiro,  but will have a fix for tapestry-security
available sooner than that. The turn-around time for modifying and
releasing tap-sec is quite a bit faster than for Shiro. And just a
note on annotations vs url matching - I always suggest using both if
you are serious about security.

Kalle


On Fri, Feb 4, 2011 at 4:32 AM, Barry Books trs...@gmail.com wrote:
 First I'd like to say the Tynamo-Security/Shiro package is great, but
 I've run into a simple problem I'm not sure how to solve. I don't
 think it's really a Tynamo problem but an interaction between how
 Shiro expects URLs to work and Tapestry case insensitive URLs. I was
 working on a simple site with an admin account and an admin directory
 so I added the following to the shiro.ini file:

 [urls]
 /admin/** = authc, roles[administrator]

 The problem is if you go to /Admin the authentication is bypassed
 because /admin != /Admin. I realize this is a feature but it does not
 seem very desirable. I also realize I could annotate all my admin
 pages and fix this but that's some amount of work and error prone. I
 looked thru the Shiro docs and I don't see anyway to do a case
 insensitive match. I thought I might be able to fix this with a
 URLRewriter and map /Admin to /admin but that does not seem to work
 either.

 Am I missing something? Is there any simple way to resolve this?

 Thanks
 Barry

 -
 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: Rewriting index.html using LinkTransformer

2011-02-04 Thread Olaf Tomczak
Thiago,

2011/2/4 Thiago H. de Paula Figueiredo thiag...@gmail.com:
 On Wed, 02 Feb 2011 07:04:54 -0200, Olaf Tomczak olaf.tomc...@gmail.com
 wrote:

 Hello,

 Hi!

 I recently migrated to Tapestry 5.2 and decided to re-implement
 URLRewriter rules as LinkTransformers. Unfortunately there's a
 problem. I have to rewrite all requests to *.html pages and route them
 to my Index page (since the application was previously using html
 pages and some users have it bookmarked). The
 PageRenderLinkTransformer works for this purpose except for index.html
 page. Since Index is a page name, requests to index.html are
 automatically treated as component event requests (component html of
 Index page) and are not passed through my transformer. Is there a way
 to work around this issue?

 I guess you hit a scenario which is not covered in LinkTransforms, as they
 only deal with event URL - event URL and page URL - page URL
 transformations, but not event URL (anything with a dot in it) - page
 render URL nor vice-versa.

Thanks for confirming this for me. I've worked around the problem by
renaming start page to Main and creating PageRenderLinkTransformer
transforming /index to /main. I guess this works fine and does not
require using an external url rewriter.

Thanks,
Olaf Tomczak


 --
 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: T5: Recording errors for fields in a loop

2011-02-04 Thread Stephan Windmüller
On 05.02.2011 00:22, Benny Law wrote:

 Thanks Stephan, I got it working now.

You're welcome.

 I wonder if built-in support for this has been requested as an enhancement?

It has been asked a couple of times on this list, but since now my
workaround was the only way I got it working.

Regards
 Stephan

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