Re: how to redirect to a common url in PageRenderLinkTransformer.decodePageRenderRequest

2011-07-18 Thread Josh Canfield
> It's a good way to do the redirect.
> But I want the url remain /download, so it's a url rewrite, not redirect.

:) Your subject is "how to redirect..."

With tapestry rewriting you can change an incoming URI so that it
matches a tapestry page or component event and you can rewrite
outgoing links so that you have a different URI structure. You don't
see how you could use rewriting to move out of a tapestry into a
struts app.

If you have managed to get both tapestry and struts running from
within the same WAR file then you might be able to use
http://download.oracle.com/javaee/6/api/javax/servlet/ServletContext.html#getRequestDispatcher(java.lang.String)

But this isn't something that I've ever considered before this moment.

Josh


On Mon, Jul 18, 2011 at 9:00 PM, Bo Gao  wrote:
>> I'm not sure why you'd want to do this from the link transformer. Can
>> you explain?
>
> Now I have to Integrate struts and tapestry, let them work together.
> There is an old rewrite rule, /download to /page.do?p=download
> Now I use link transformer to do the rewrite.
>
>> My first choice would be to let it reach a page and have that page
>> class do the redirect from an onActivate handler.
>
>
> It's a good way to do the redirect.
> But I want the url remain /download, so it's a url rewrite, not redirect.
>
> Thanks
>
>
>
> On Jul 19, 2011, at 12:46 AM, Josh Canfield wrote:
>
>> I'm not sure why you'd want to do this from the link transformer. Can
>> you explain?
>>
>> My first choice would be to let it reach a page and have that page
>> class do the redirect from an onActivate handler.
>>
>> Josh
>>
>> On Mon, Jul 18, 2011 at 7:11 AM, Bo Gao  wrote:
 Just return a URL instance of a non-tapestry page from the event
 handler. I think that will do
>>>
>>> I do this in a PageRenderLinkTransformer, the interface is
>>> public PageRenderRequestParameters decodePageRenderRequest(Request request) 
>>> ;
>>> So I must return PageRenderRequestParameters, The first parameter must be a 
>>> valid page name.
>>> Is their a way that I can rewrite the url to a common url.
>>>
>>> On Jul 18, 2011, at 6:45 PM, Taha Hafeez wrote:
>>>
 Just return a URL instance of a non-tapestry page from the event
 handler. I think that will do


 On Mon, Jul 18, 2011 at 4:04 PM, Bo Gao  wrote:
> Thank you for your response,
>
> For example I want to redirect /download to another url "download.do"
> But the download.do is not a tapestry page, it's not handled by tapestry.
> How to do this?
>
>
> On Jul 18, 2011, at 6:18 PM, Taha Hafeez wrote:
>
>> Hi
>>
>> http://blog.tapestry5.de/index.php/2010/09/06/new-url-rewriting-api/
>>
>> regards
>> Taha
>>
>> On Mon, Jul 18, 2011 at 3:22 PM, Bo Gao  wrote:
>>> I want to redirect some url to another url, the url is not a tapestry 
>>> page.
>>> but decodePageRenderRequest returns a PageRenderRequestParameters
>>> How can I do this.
>>>
>>> --
>>> Bo Gao
>>> eli...@gmail.com
>>>
>>>
>>>
>>>
>>>
>>> -
>>> 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
>>
>
> --
> Bo Gao
> eli...@gmail.com
>
>
>
>
>
> -
> 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

>>>
>>> --
>>> Bo Gao
>>> eli...@gmail.com
>>>
>>>
>>>
>>>
>>>
>>> -
>>> 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
>>
>
> --
> Bo Gao
> eli...@gmail.com
>
>
>
>
>
> -
> 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..

Re: how to redirect to a common url in PageRenderLinkTransformer.decodePageRenderRequest

2011-07-18 Thread Bo Gao
> I'm not sure why you'd want to do this from the link transformer. Can
> you explain?

Now I have to Integrate struts and tapestry, let them work together.
There is an old rewrite rule, /download to /page.do?p=download
Now I use link transformer to do the rewrite.

> My first choice would be to let it reach a page and have that page
> class do the redirect from an onActivate handler.


It's a good way to do the redirect.
But I want the url remain /download, so it's a url rewrite, not redirect.

Thanks



On Jul 19, 2011, at 12:46 AM, Josh Canfield wrote:

> I'm not sure why you'd want to do this from the link transformer. Can
> you explain?
> 
> My first choice would be to let it reach a page and have that page
> class do the redirect from an onActivate handler.
> 
> Josh
> 
> On Mon, Jul 18, 2011 at 7:11 AM, Bo Gao  wrote:
>>> Just return a URL instance of a non-tapestry page from the event
>>> handler. I think that will do
>> 
>> I do this in a PageRenderLinkTransformer, the interface is
>> public PageRenderRequestParameters decodePageRenderRequest(Request request) ;
>> So I must return PageRenderRequestParameters, The first parameter must be a 
>> valid page name.
>> Is their a way that I can rewrite the url to a common url.
>> 
>> On Jul 18, 2011, at 6:45 PM, Taha Hafeez wrote:
>> 
>>> Just return a URL instance of a non-tapestry page from the event
>>> handler. I think that will do
>>> 
>>> 
>>> On Mon, Jul 18, 2011 at 4:04 PM, Bo Gao  wrote:
 Thank you for your response,
 
 For example I want to redirect /download to another url "download.do"
 But the download.do is not a tapestry page, it's not handled by tapestry.
 How to do this?
 
 
 On Jul 18, 2011, at 6:18 PM, Taha Hafeez wrote:
 
> Hi
> 
> http://blog.tapestry5.de/index.php/2010/09/06/new-url-rewriting-api/
> 
> regards
> Taha
> 
> On Mon, Jul 18, 2011 at 3:22 PM, Bo Gao  wrote:
>> I want to redirect some url to another url, the url is not a tapestry 
>> page.
>> but decodePageRenderRequest returns a PageRenderRequestParameters
>> How can I do this.
>> 
>> --
>> Bo Gao
>> eli...@gmail.com
>> 
>> 
>> 
>> 
>> 
>> -
>> 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
> 
 
 --
 Bo Gao
 eli...@gmail.com
 
 
 
 
 
 -
 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
>>> 
>> 
>> --
>> Bo Gao
>> eli...@gmail.com
>> 
>> 
>> 
>> 
>> 
>> -
>> 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
> 

--
Bo Gao
eli...@gmail.com





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



Re: mvn package - exclude lib folder?

2011-07-18 Thread nillehammer
For the dependency you want exluded use provided See the
servlet-api dependency in you pom.xml for an example

-
http://www.winfonet.eu
--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/mvn-package-exclude-lib-folder-tp4601084p4610576.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 + opentip.js bug / question

2011-07-18 Thread Taha Hafeez
Hi

I had to modify opentip.js to use tapestry's json return value. The
change is in the success handler which instead of simply displaying
the javascript displays the content sent from tapestry event handler.

   onSuccess: function(transport) {
 this.debug('Loading successfull.');
 Tapestry.loadScriptsInReply(transport, function()
   {
  this.content = transport.responseJSON.content;
   }.bind(this));
   }.bind(this),

The full js is at
https://github.com/tawus/tawus/blob/master/tawus-addons/src/main/resources/com/googlecode/tawus/addons/mixins/opentip/opentip.js

I will update the tutorial too. Thanks for pointing it out.


regards
Taha

On Tue, Jul 19, 2011 at 2:47 AM, spargonaut  wrote:
> Hi!
>
> I was following a post from Taha over on Java Magic (
> http://tawus.wordpress.com/2011/07/12/a-tooltip-component-for-tapestry/ Here
> ) for creating tool tips using the opentip.js library.
>
> I have followed his post almost verbatim, and have it all working except for
> one small part.  When the user scrolls their mouse over the element that is
> supposed to activate the tool tip, a message appears, although it seems to
> be showing a JSON object containing the message, as opposed to only the
> message.
>
> i.e. in the tool tip box, its displaying:
> { "content" : "Term Groups allow information ..." }
>
> When it should only be showing:
> Term Groups allow information ...
>
>
> I've gone over everything I've implemented from the post with a fine toothed
> comb and appear to have everything correct, but I may very well be missing
> something.
>
> A big thanks to Taha for his awesome tutorials and community involvement,
> and of course thank you to anyone who might be able to help me shed some
> light on my problem.
>
> cheers
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/T5-opentip-js-bug-question-tp4601227p4601227.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
>
>

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



T5 + opentip.js bug / question

2011-07-18 Thread spargonaut
Hi!

I was following a post from Taha over on Java Magic (
http://tawus.wordpress.com/2011/07/12/a-tooltip-component-for-tapestry/ Here
) for creating tool tips using the opentip.js library.

I have followed his post almost verbatim, and have it all working except for
one small part.  When the user scrolls their mouse over the element that is
supposed to activate the tool tip, a message appears, although it seems to
be showing a JSON object containing the message, as opposed to only the
message.

i.e. in the tool tip box, its displaying:
{ "content" : "Term Groups allow information ..." }

When it should only be showing:
Term Groups allow information ...


I've gone over everything I've implemented from the post with a fine toothed
comb and appear to have everything correct, but I may very well be missing
something.

A big thanks to Taha for his awesome tutorials and community involvement,
and of course thank you to anyone who might be able to help me shed some
light on my problem.

cheers

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-opentip-js-bug-question-tp4601227p4601227.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: Tapestry5/Hibernate Persistence

2011-07-18 Thread tompeter
Thanks Thiago, that's good to know!

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry5-Hibernate-Persistence-tp4600362p4601140.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: mvn package - exclude lib folder?

2011-07-18 Thread Thiago H. de Paula Figueiredo
On Mon, 18 Jul 2011 17:29:26 -0300, Federico Weyermann  
 wrote:



Hi guys!


Hi!


Quick question, is there a way to tell mvn package to exclude the "lib"
directory when packaging a tapestry application?


The same way you'll would do in a non-Tapestry application. If you're  
using Maven, why do you add files to the WEB-INF/lib folder manually? It  
doesn't make much sense.


--
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: Tapestry5/Hibernate Persistence

2011-07-18 Thread Thiago H. de Paula Figueiredo

On Mon, 18 Jul 2011 17:28:19 -0300, tompeter  wrote:


It is not possible that a second user reads the entity before the
HibernateSessionManager has committed the changes of User 1? I ask  
because I use injected org.hibernate.Session for reading the values.


This isn't related to Tapestry at all, just to Hibernate itself, but the  
answer is yes. If you want to add an automatic check for it, check the  
otimistic lock section in the Hibernate documentation.


--
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: Another case of "Block parameters are only allowed directly within component elements."

2011-07-18 Thread Thiago H. de Paula Figueiredo
Remove dependencies until you find which one is causing the problem.  
m2eclipse's pom.xml editor has a nice dependency hierarchy view which  
shows all the dependencies, transitive or not.


On Mon, 18 Jul 2011 17:07:02 -0300, gs_tapestry  
 wrote:



I modified the three places you mentioned (and excluded transitive
dependencies) and fresh build my application. I am still getting the same
error during application start. Below is the trace. I could not figure  
out

which piece caused the issue.  Thanks.


EMM 19515 [main] INFO  org.springframework.web.context.ContextLoader  -  
Root

WebApplicationContext: initialization completed in 19515 ms
EMM 19687 [main] INFO  org.apache.tapestry5.ioc.RegistryBuilder  - Adding
module definition for class
org.apache.tapestry5.ioc.services.TapestryIOCModule
EMM 2 [main] INFO  org.apache.tapestry5.ioc.RegistryBuilder  - Adding
module definition for class org.chenillekit.core.ChenilleKitCoreModule
EMM 20015 [main] INFO  org.apache.tapestry5.ioc.RegistryBuilder  - Adding
module definition for class  
org.chenillekit.google.ChenilleKitGoogleModule

EMM 20031 [main] INFO  org.apache.tapestry5.ioc.RegistryBuilder  - Adding
module definition for class org.chenillekit.image.ChenilleKitImageModule
EMM 20047 [main] INFO  org.apache.tapestry5.ioc.RegistryBuilder  - Adding
module definition for class
org.chenillekit.tapestry.core.ChenilleKitCoreModule
Jul 18, 2011 4:00:05 PM org.apache.catalina.core.StandardContext  
filterStart

SEVERE: Exception starting filter emuseum
java.lang.NoClassDefFoundError:
org/apache/tapestry5/internal/services/ResourceCache
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.privateGetPublicMethods(Class.java:2547)
at java.lang.Class.getMethods(Class.java:1410)
at
org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.(DefaultModuleDefImpl.java:145)
	at  
org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:131)
	at  
org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:159)

at
org.apache.tapestry5.ioc.IOCUtilities.addModulesInList(IOCUtilities.java:137)
at
org.apache.tapestry5.ioc.IOCUtilities.addModulesInManifest(IOCUtilities.java:107)
at
org.apache.tapestry5.ioc.IOCUtilities.addDefaultModules(IOCUtilities.java:77)
at
org.apache.tapestry5.internal.TapestryAppInitializer.(TapestryAppInitializer.java:140)
at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:90)
at
com.gallerysystems.emuseum.TapestryFilterProxy.init(TapestryFilterProxy.java:86)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
at
org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:115)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3838)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4488)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at  
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at  
org.apache.catalina.core.StandardService.start(StandardService.java:519)
	at  
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.ClassNotFoundException:
org.apache.tapestry5.internal.services.ResourceCache
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 31 more
EMM 20047 [main] INFO
org.springframework.web.context.support.XmlWebApplicationContext  -  
Closing

org.springframework.web.context.support.XmlWebApplicationContext@19a32e0:
display name [Root WebApplicationContext]; startup date [Mon Jul 18  
15:59:45

EDT 2011]; root of context hierarchy
EMM 20047 [main] INFO
org.springframework.context.support.GenericApplicationContext  - Closing
org.springframework.context.support.GenericApplicationContext@2803d5:
display n

Re: Tapestry5/Hibernate Persistence

2011-07-18 Thread tompeter
Great, thank you!
I am using the @CommitAfter Annotation now.
Just to make sure:
It is not possible that a second user reads the entity before the
HibernateSessionManager has committed the changes of User 1? I ask because I
use injected org.hibernate.Session for reading the values.

Thanks,
Tom

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry5-Hibernate-Persistence-tp4600362p4601078.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: PageActivationContext Coercion Exceptions

2011-07-18 Thread Mark
Thanks, Kalle.  I'll check that out.

I also found that you can intercept the exceptions which I had
overlooked in the docs:
http://tapestry.apache.org/component-events.html

Mark

On Sun, Jul 17, 2011 at 10:49 PM, Kalle Korhonen
 wrote:
> I haven't tried, but using tapestry-exceptionpage
> (http://tynamo.org/tapestry-exceptionpage+guide) you should be able to
> map UnknownValueException to your 404 page.
>
> Kalle
>
>
> On Sun, Jul 17, 2011 at 8:13 PM, Mark  wrote:
>> I have an app with several pages like:
>>
>> www.app.com/itemInfo/1
>>
>> where 1 is the page activation context and gets coerced into the
>> object using Tapestry-Hibernate.  This works great, but... the graphic
>> designer accidentally added a link into the header without the http. I
>> fixed it, but not before Google indexed the site. Now the GoogleBot
>> keeps calling urls like:
>>
>> www.app.com/itemInfo/www.example.com
>>
>> Obviously www.example.com can't be turned into a Long and then into
>> the object so it gives an exception.
>>
>> Is there an easy way to globally say, "if type coercion fails, just
>> return a 404?"  If not is there a way to catch the exception?
>>
>> Mark
>>
>> -
>> 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: Another case of "Block parameters are only allowed directly within component elements."

2011-07-18 Thread gs_tapestry
I modified the three places you mentioned (and excluded transitive
dependencies) and fresh build my application. I am still getting the same
error during application start. Below is the trace. I could not figure out
which piece caused the issue.  Thanks.


EMM 19515 [main] INFO  org.springframework.web.context.ContextLoader  - Root
WebApplicationContext: initialization completed in 19515 ms
EMM 19687 [main] INFO  org.apache.tapestry5.ioc.RegistryBuilder  - Adding
module definition for class
org.apache.tapestry5.ioc.services.TapestryIOCModule
EMM 2 [main] INFO  org.apache.tapestry5.ioc.RegistryBuilder  - Adding
module definition for class org.chenillekit.core.ChenilleKitCoreModule
EMM 20015 [main] INFO  org.apache.tapestry5.ioc.RegistryBuilder  - Adding
module definition for class org.chenillekit.google.ChenilleKitGoogleModule
EMM 20031 [main] INFO  org.apache.tapestry5.ioc.RegistryBuilder  - Adding
module definition for class org.chenillekit.image.ChenilleKitImageModule
EMM 20047 [main] INFO  org.apache.tapestry5.ioc.RegistryBuilder  - Adding
module definition for class
org.chenillekit.tapestry.core.ChenilleKitCoreModule
Jul 18, 2011 4:00:05 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter emuseum
java.lang.NoClassDefFoundError:
org/apache/tapestry5/internal/services/ResourceCache
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.privateGetPublicMethods(Class.java:2547)
at java.lang.Class.getMethods(Class.java:1410)
at
org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.(DefaultModuleDefImpl.java:145)
at 
org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:131)
at 
org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:159)
at
org.apache.tapestry5.ioc.IOCUtilities.addModulesInList(IOCUtilities.java:137)
at
org.apache.tapestry5.ioc.IOCUtilities.addModulesInManifest(IOCUtilities.java:107)
at
org.apache.tapestry5.ioc.IOCUtilities.addDefaultModules(IOCUtilities.java:77)
at
org.apache.tapestry5.internal.TapestryAppInitializer.(TapestryAppInitializer.java:140)
at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:90)
at
com.gallerysystems.emuseum.TapestryFilterProxy.init(TapestryFilterProxy.java:86)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
at
org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:115)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3838)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4488)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:519)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.ClassNotFoundException:
org.apache.tapestry5.internal.services.ResourceCache
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 31 more
EMM 20047 [main] INFO 
org.springframework.web.context.support.XmlWebApplicationContext  - Closing
org.springframework.web.context.support.XmlWebApplicationContext@19a32e0:
display name [Root WebApplicationContext]; startup date [Mon Jul 18 15:59:45
EDT 2011]; root of context hierarchy
EMM 20047 [main] INFO 
org.springframework.context.support.GenericApplicationContext  - Closing
org.springframework.context.support.GenericApplicationContext@2803d5:
display name [JavaConfig internal application context]; startup date [Mon
Jul 18 16:00:03 EDT 2011]; parent:
org.springframework.web.context.support.XmlWebApplicationContext@19a32e0
Jul 18, 2011 4:00:05 PM org.apache.catalina.core.StandardContext sta

Re: Eventlink zone update explorer 9 error

2011-07-18 Thread Taha Tapestry
You can check it at 
http://tawus.wordpress.com/2011/04/16/tapestry-magic-2-ajax-with-graceful-degradation/

I can file a jira and patch for it

Regards
Taha 

On Jul 18, 2011, at 10:33 PM, Josh Canfield  wrote:

>> I think @XHR can be included in tapestry-core. I use it all the time to 
>> avoid these problems
> 
> Do you have a reference to source for it? Also, is there an
> "improvement" defect filed?
> 
> -
> 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: Tapestry5/Hibernate Persistence

2011-07-18 Thread Михаил Слободянюк
Hi!
Problem in you Step 4. Use
http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/hibernate/HibernateSessionManager.html
 method 
*commit
*()or @CommitAfter annotation. See
http://tapestry.apache.org/hibernate-user-guide.html

2011/7/18 tompeter 

> Hi,
>
> I hope you can help me answer a Tapestry5/Hibernate question.
> In an onSuccessFromForm Method I want to update a database entity only if a
> specific value of that entity is null.
>
> This is how I do it:
> Step 1: I read the entity with something like: myObject =
> (Object)criteria.list().get(0);
> Step 2: I check if myObject.specificValue == null ;
> Step 3: If it is null I update the object and do
> _session.persist(myUpdatedObject)
> Step 4: I commit by :session.getTransaction().commit();
>
> I inject the session with Tapestry annotation and think I am save, but
> still
> not sure about:
> Is this the correct implementation or is it possible that User2 updates the
> entity after User1 has read the entity and before User1 has persisted the
> entity?
>
> Thanks for your help and all best,
> Tom
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Tapestry5-Hibernate-Persistence-tp4600362p4600362.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
>
>


Tapestry5/Hibernate Persistence

2011-07-18 Thread tompeter
Hi,

I hope you can help me answer a Tapestry5/Hibernate question.
In an onSuccessFromForm Method I want to update a database entity only if a
specific value of that entity is null.

This is how I do it:
Step 1: I read the entity with something like: myObject =
(Object)criteria.list().get(0);
Step 2: I check if myObject.specificValue == null ;
Step 3: If it is null I update the object and do
_session.persist(myUpdatedObject)
Step 4: I commit by :session.getTransaction().commit();

I inject the session with Tapestry annotation and think I am save, but still
not sure about:
Is this the correct implementation or is it possible that User2 updates the
entity after User1 has read the entity and before User1 has persisted the
entity? 

Thanks for your help and all best,
Tom

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry5-Hibernate-Persistence-tp4600362p4600362.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: Eventlink zone update explorer 9 error

2011-07-18 Thread Josh Canfield
> I think @XHR can be included in tapestry-core. I use it all the time to avoid 
> these problems

Do you have a reference to source for it? Also, is there an
"improvement" defect filed?

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



Re: javascript & layout problem

2011-07-18 Thread Josh Canfield
> Inside test.js, I used jQuery, but an error show up telling that jQuery is
> not recognized. But if I change User class to reimport jQuery the problem
> solved.


The problem sounds like the order your scripts are getting included.
When you add the import to your page it moves the jquery import before
test.js.

You might be able to use a JavaScriptStack to solve it
(http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/javascript/JavaScriptStack.html).

This thread might also help:

http://tapestry.1045711.n5.nabble.com/Javascript-include-order-td2436634.html

Instead of using the annotation use RenderSupport.addScriptLink() in
an AfterRender handler to ensure that jquery get's imported first...

Josh

On Sat, Jul 16, 2011 at 8:01 AM, Rendy Tapestry
 wrote:
> Hi All,
>
> I am using tapestry layout component, in page class I add @Import annotation
> to import jquery library. I have another page that is being used along with
> the layout component and having @Import annotation to import specific
> javascript for that page. That javascript used jquery inside it, the problem
> is, jQuery() is not recognized in that script. Solution I have right now, is
> reimport the same jquery library in the page class, every time I need
> jquery. In my opinion that is bothersome.
>
> Here is the detail :
>
> @Import(library = "context:javascript/jquery-1.6.2.min.js")
> public class Layout
> {
> ...
> }
>
>
> and
> @Import(library = "context:javascript/test.js")
> public class User
> {
> ...
> }
>
> Inside test.js, I used jQuery, but an error show up telling that jQuery is
> not recognized. But if I change User class to reimport jQuery the problem
> solved.
>
> @Import(library = {"context:javascript/jquery-1.6.2.min.js",
> "context:javascript/test.js"})
> public class User
> {
> ...
> }
>
> Any suggestion please ?
>
>
> Thanks,
> Rendy.
>

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



Re: how to redirect to a common url in PageRenderLinkTransformer.decodePageRenderRequest

2011-07-18 Thread Josh Canfield
I'm not sure why you'd want to do this from the link transformer. Can
you explain?

My first choice would be to let it reach a page and have that page
class do the redirect from an onActivate handler.

Josh

On Mon, Jul 18, 2011 at 7:11 AM, Bo Gao  wrote:
>> Just return a URL instance of a non-tapestry page from the event
>> handler. I think that will do
>
> I do this in a PageRenderLinkTransformer, the interface is
> public PageRenderRequestParameters decodePageRenderRequest(Request request) ;
> So I must return PageRenderRequestParameters, The first parameter must be a 
> valid page name.
> Is their a way that I can rewrite the url to a common url.
>
> On Jul 18, 2011, at 6:45 PM, Taha Hafeez wrote:
>
>> Just return a URL instance of a non-tapestry page from the event
>> handler. I think that will do
>>
>>
>> On Mon, Jul 18, 2011 at 4:04 PM, Bo Gao  wrote:
>>> Thank you for your response,
>>>
>>> For example I want to redirect /download to another url "download.do"
>>> But the download.do is not a tapestry page, it's not handled by tapestry.
>>> How to do this?
>>>
>>>
>>> On Jul 18, 2011, at 6:18 PM, Taha Hafeez wrote:
>>>
 Hi

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

 regards
 Taha

 On Mon, Jul 18, 2011 at 3:22 PM, Bo Gao  wrote:
> I want to redirect some url to another url, the url is not a tapestry 
> page.
> but decodePageRenderRequest returns a PageRenderRequestParameters
> How can I do this.
>
> --
> Bo Gao
> eli...@gmail.com
>
>
>
>
>
> -
> 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

>>>
>>> --
>>> Bo Gao
>>> eli...@gmail.com
>>>
>>>
>>>
>>>
>>>
>>> -
>>> 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
>>
>
> --
> Bo Gao
> eli...@gmail.com
>
>
>
>
>
> -
> 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: Tapestry Zone and jquery

2011-07-18 Thread George Christman
I figured out how to use it, just as simple as you said, only thing left to
figure out is how to call a jquery function from my class. I'm using
afterRender. 

 void afterRender() {
javasScriptSupport.addScript(
"$('%s').observe(Tapestry.ZONE_UPDATED_EVENT, function() { "
//+ "alert('works');"
+ "$('zoneUpdater')"
+ "});",
shiptoZone.getClientId()); 
} 



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-Zone-and-jquery-tp4599457p4600289.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: Another case of "Block parameters are only allowed directly within component elements."

2011-07-18 Thread Thiago H. de Paula Figueiredo
On Mon, 18 Jul 2011 13:01:36 -0300, gs_tapestry  
 wrote:



I checked my application. It doesn't have any direct reference to
ResourceCache and it compiled without error.


You have, but indirectly. ;)


   
org.apache.tapestry
tapestry-spring
5.0.18



Shouldn't it be ${tapestry.version} instead of 5.0.18?



tapestry5-treegrid
tapestry5-treegrid
5.0.15



Be sure to exclude all transitive dependencies of this package, which is  
quite old.




us.antera.t5restfulws
t5-restful-webservices
0.2.1



Check the transitive dependencies of this one too.

--
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: Another case of "Block parameters are only allowed directly within component elements."

2011-07-18 Thread gs_tapestry
I checked my application. It doesn't have any direct reference to
ResourceCache and it compiled without error.

Regarding the mixed Tapestry JAR, I did run into such issue at the beginning
of migration from T5.0. Below are related maven dependence. Do you see any
potential issue?


org.apache.tapestry
tapestry-core
${tapestry.version}



org.apache.tapestry
tapestry-spring
5.0.18



org.apache.tapestry
tapestry-upload
${tapestry.version}


   
 org.chenillekit
 chenillekit-tapestry
 1.3.0
 
  
  org.apache.tapestry
  tapestry-core
  
  
   org.apache.tapestry
   tapestry-spring
  
  
org.apache.tapestry
tapestry-ioc
  
  
org.apache.tapestry
tapestry-func
   
  
jboss
javassist
  
  
commons-beanutils
commons-beanutils-core
  
  
commons-beanutils
 commons-beanutils
  
  


tapestry5-treegrid
tapestry5-treegrid
5.0.15





us.antera.t5restfulws
t5-restful-webservices
0.2.1



Thanks,
Simon

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Another-case-of-Block-parameters-are-only-allowed-directly-within-component-elements-tp4585262p4600121.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: Tapestry Zone and jquery

2011-07-18 Thread Thiago H. de Paula Figueiredo
On Mon, 18 Jul 2011 12:35:23 -0300, George Christman  
 wrote:


Is there any good doc on how to use the Tapestry.ZONE_UPDATE_EVENT ? I  
don't completely understand it just yet.


It's quite simple: it's the name of the event tiggered the HTML element  
generated by the Zone component when a zone has just been updated from an  
AJAX request.



I'm aware of the css approach, however I was under the understanding it
wouldn't function in older browsers.


Older browsers = Internet Explorer. Firefox, Opera and Safari has been  
supporting it for many years.


--
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: Tapestry Zone and jquery

2011-07-18 Thread George Christman
Is there any good doc on how to use the Tapestry.ZONE_UPDATE_EVENT ? I don't
completely understand it just yet. 

I'm aware of the css approach, however I was under the understanding it
wouldn't function in older browsers. 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-Zone-and-jquery-tp4599457p4600041.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: Eventlink zone update explorer 9 error

2011-07-18 Thread Taha Tapestry
I think @XHR can be included in tapestry-core. I use it all the time to avoid 
these problems

Regards
Taha 

On Jul 18, 2011, at 8:17 PM, "Thiago H. de Paula Figueiredo" 
 wrote:

> On Mon, 18 Jul 2011 11:08:42 -0300, CHAUVEL  wrote:
> 
>> Hi,
> 
> Hi!
> 
>> I have a tapestry 5 app. I have an eventlink that updates a zone.
>> Works perfectly in explorer 8, firefox and chrome, but with explroer 9 I
>> get:
>> 
>> ioc.Registry A component event handler method returned the value Block[Body
>> of Busqueda:cargosgrillazone, at
>> classpath:com/tida/servir/pages/Busqueda.tml, line 244]. Return type
>> org.apache.tapestry5.internal.structure.BlockImpl can not be handled.
> 
> This means the request wasn't made through AJAX. @Inject Request and use its 
> isXHR() method to know when a request is AJAX or not. If not, return null. 
> This way, your page works with and without JavaScript enabled.
> 
> -- 
> 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: javascript & layout problem

2011-07-18 Thread Михаил Слободянюк
If you want include some script in *all* pages you may conribute to
MarkupRenderer
service. See org.apache.tapestry5.services.TapestryModule as example

Mihail

16 июля 2011 г. 19:05 пользователь Rendy Tapestry
написал:

> Hi Mihail,
>
> Thank you for your response. If that is how the correct thing should
> happened, I will accept it. I come to this question because in Tapestry 4,
> I
> am using decorator to build a template. In default.jsp I put an import to
> jquery lib once and never import it again in every page that use the
> template.
>
> Thanks,
> Rendy
>
> 2011/7/16 Михаил Слободянюк 
>
> > Hi, Rendy!
> >
> > You must import every used script in every page/component class same as
> > import other used java classes.
> >
> > Mihail Slobodyanuk.
> >
> > 2011/7/16 Rendy Tapestry 
> >
> > > Hi All,
> > >
> > > I am using tapestry layout component, in page class I add @Import
> > > annotation
> > > to import jquery library. I have another page that is being used along
> > with
> > > the layout component and having @Import annotation to import specific
> > > javascript for that page. That javascript used jquery inside it, the
> > > problem
> > > is, jQuery() is not recognized in that script. Solution I have right
> now,
> > > is
> > > reimport the same jquery library in the page class, every time I need
> > > jquery. In my opinion that is bothersome.
> > >
> > > Here is the detail :
> > >
> > > @Import(library = "context:javascript/jquery-1.6.2.min.js")
> > > public class Layout
> > > {
> > > ...
> > > }
> > >
> > >
> > > and
> > > @Import(library = "context:javascript/test.js")
> > > public class User
> > > {
> > > ...
> > > }
> > >
> > > Inside test.js, I used jQuery, but an error show up telling that jQuery
> > is
> > > not recognized. But if I change User class to reimport jQuery the
> problem
> > > solved.
> > >
> > > @Import(library = {"context:javascript/jquery-1.6.2.min.js",
> > > "context:javascript/test.js"})
> > > public class User
> > > {
> > > ...
> > > }
> > >
> > > Any suggestion please ?
> > >
> > >
> > > Thanks,
> > > Rendy.
> > >
> >
>


Re: Eventlink zone update explorer 9 error

2011-07-18 Thread Thiago H. de Paula Figueiredo

On Mon, 18 Jul 2011 11:08:42 -0300, CHAUVEL  wrote:


Hi,


Hi!


I have a tapestry 5 app. I have an eventlink that updates a zone.
Works perfectly in explorer 8, firefox and chrome, but with explroer 9 I
get:

ioc.Registry A component event handler method returned the value  
Block[Body

of Busqueda:cargosgrillazone, at
classpath:com/tida/servir/pages/Busqueda.tml, line 244]. Return type
org.apache.tapestry5.internal.structure.BlockImpl can not be handled.


This means the request wasn't made through AJAX. @Inject Request and use  
its isXHR() method to know when a request is AJAX or not. If not, return  
null. This way, your page works with and without JavaScript enabled.


--
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: Eventlink zone update explorer 9 error

2011-07-18 Thread Taha Tapestry
You should always check request.isXHR() and if it returns true then it is an 
Ajax call otherwise it is a non-Ajax call. The reason might be an error in ie9 
which causes a non-Ajax call

Regards
Taha 

On Jul 18, 2011, at 7:38 PM, CHAUVEL  wrote:

> Hi,
> I have a tapestry 5 app. I have an eventlink that updates a zone.
> Works perfectly in explorer 8, firefox and chrome, but with explroer 9 I
> get:
> 
> ioc.Registry A component event handler method returned the value Block[Body
> of Busqueda:cargosgrillazone, at
> classpath:com/tida/servir/pages/Busqueda.tml, line 244]. Return type
> org.apache.tapestry5.internal.structure.BlockImpl can not be handled.
> 
> The tml for the code is:
> #  Cargos  
> 
>
>
>  
> 
> Cargos Asignados
> 
>zone="cargosGrillaZone" busqueda = "true"/>
>  
>No hay trabajador seleccionado
>  
>  
> 
>
>
> 
> 
>Object onToCargo(Trabajador persona) {
>actual = persona;
>return cargosGrillaZone.getBody();
>}
> 
> Regards,
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Eventlink-zone-update-explorer-9-error-tp4599684p4599684.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
> 

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



Re: Tapestry Zone and jquery

2011-07-18 Thread Thiago H. de Paula Figueiredo
On Mon, 18 Jul 2011 11:29:10 -0300, George Christman  
 wrote:



jQuery(document).ready(function($) {
$('label.req').prepend('* ');
$('label').append(':');
}


The ready() event (which is just the dom:loaded event) is only triggered  
by the browser JavaScript DOM when a full page render is done, so Tapestry  
is working as it should here. Tapestry zones trigger the  
Tapestry.ZONE_UPDATED_EVENT event, so you can run whatever you want when a  
zone is updated.


By the way, you replace the code above with CSS with :before and :after.  
See example here: http://www.w3schools.com/cssref/sel_after.asp.


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



Eventlink zone update explorer 9 error

2011-07-18 Thread CHAUVEL
Hi,
I have a tapestry 5 app. I have an eventlink that updates a zone.
Works perfectly in explorer 8, firefox and chrome, but with explroer 9 I
get:

ioc.Registry A component event handler method returned the value Block[Body
of Busqueda:cargosgrillazone, at
classpath:com/tida/servir/pages/Busqueda.tml, line 244]. Return type
org.apache.tapestry5.internal.structure.BlockImpl can not be handled.

The tml for the code is:
#  Cargos  



  

Cargos Asignados
 

  
No hay trabajador seleccionado
  
  





Object onToCargo(Trabajador persona) {
actual = persona;
return cargosGrillaZone.getBody();
}

Regards,


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Eventlink-zone-update-explorer-9-error-tp4599684p4599684.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: Tapestry Zone and jquery

2011-07-18 Thread George Christman
This is one example, however the problem is much more common when using
jQuery UI with tapestry zones. The zone works perfectly, jquery doesn't seem
to be firing on zone reloads, only when the entire page is reloaded.




 
  
  
 


Object onValueChangedFromLocation(IfasShipto ifasShipto) {
getPurchaseRequest().setIfasShipto(ifasShipto);
return shiptoZone.getBody();
}

js.

jQuery.noConflict();
jQuery(document).ready(function($) {
$('label.req').prepend('* ');
$('label').append(':');
}

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-Zone-and-jquery-tp4599457p4599771.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: Another case of "Block parameters are only allowed directly within component elements."

2011-07-18 Thread Thiago H. de Paula Figueiredo
On Mon, 18 Jul 2011 10:18:29 -0300, gs_tapestry  
 wrote:



Hi Thiago,


Hi!

Wish you had a good weekend. Sorry for the lose of Brazilian national  
soccer team.


Fortunately I only watched the last 15 minutes.

I spent a few hours trying upgrade to T.5.3.0. While starting  
application, i got error "java.lang.NoClassDefFoundError:

org/apache/tapestry5/internal/services/ResourceCache".


You've probably got mixed Tapestry JAR versions or you're using some  
package which uses ResourceCache, which is inside the internal package and  
therefore should only be used by Tapestry itself.


--
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: how to redirect to a common url in PageRenderLinkTransformer.decodePageRenderRequest

2011-07-18 Thread Bo Gao
> Just return a URL instance of a non-tapestry page from the event
> handler. I think that will do

I do this in a PageRenderLinkTransformer, the interface is 
public PageRenderRequestParameters decodePageRenderRequest(Request request) ;
So I must return PageRenderRequestParameters, The first parameter must be a 
valid page name.
Is their a way that I can rewrite the url to a common url.

On Jul 18, 2011, at 6:45 PM, Taha Hafeez wrote:

> Just return a URL instance of a non-tapestry page from the event
> handler. I think that will do
> 
> 
> On Mon, Jul 18, 2011 at 4:04 PM, Bo Gao  wrote:
>> Thank you for your response,
>> 
>> For example I want to redirect /download to another url "download.do"
>> But the download.do is not a tapestry page, it's not handled by tapestry.
>> How to do this?
>> 
>> 
>> On Jul 18, 2011, at 6:18 PM, Taha Hafeez wrote:
>> 
>>> Hi
>>> 
>>> http://blog.tapestry5.de/index.php/2010/09/06/new-url-rewriting-api/
>>> 
>>> regards
>>> Taha
>>> 
>>> On Mon, Jul 18, 2011 at 3:22 PM, Bo Gao  wrote:
 I want to redirect some url to another url, the url is not a tapestry page.
 but decodePageRenderRequest returns a PageRenderRequestParameters
 How can I do this.
 
 --
 Bo Gao
 eli...@gmail.com
 
 
 
 
 
 -
 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
>>> 
>> 
>> --
>> Bo Gao
>> eli...@gmail.com
>> 
>> 
>> 
>> 
>> 
>> -
>> 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
> 

--
Bo Gao
eli...@gmail.com





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



Re: Tapestry Zone and jquery

2011-07-18 Thread Thiago H. de Paula Figueiredo
On Mon, 18 Jul 2011 10:16:10 -0300, George Christman  
 wrote:


Hello all, I'm using some jquery to handle some of my UI elements which  
works perfectly until I add a tapestry zone to the mix. When a zone is  
reloaded, the jquery javascript no longer applies the styles to the  
elements. I see

jquery offers live which is good for key down and clicks etc, but would
require an action from the user once the zone has been reloaded rather  
than automatically applied. Any suggestions?


Code and template please. And return zone.getBody() instead of the zone  
itself when returning from an AJAX event handler method.


--
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: Another case of "Block parameters are only allowed directly within component elements."

2011-07-18 Thread gs_tapestry
Hi Thiago,

Wish you had a good weekend. Sorry for the lose of Brazilian national soccer
team.

I spent a few hours trying upgrade to T.5.3.0. While starting application, i
got error "java.lang.NoClassDefFoundError:
org/apache/tapestry5/internal/services/ResourceCache". I searched and found
both Howard Lewis and you have some comments other post regarding it. Please
advise any solution you have.  

Thanks,
Simon

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Another-case-of-Block-parameters-are-only-allowed-directly-within-component-elements-tp4585262p4599467.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



Tapestry Zone and jquery

2011-07-18 Thread George Christman
Hello all, I'm using some jquery to handle some of my UI elements which works
perfectly until I add a tapestry zone to the mix. When a zone is reloaded,
the jquery javascript no longer applies the styles to the elements. I see
jquery offers live which is good for key down and clicks etc, but would
require an action from the user once the zone has been reloaded rather than
automatically applied. Any suggestions?

jquery live url.
http://api.jquery.com/live/

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-Zone-and-jquery-tp4599457p4599457.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: subdoamin when https else root, possible?

2011-07-18 Thread Angelo C.
right, I was thinking maybe there is a simpler solution. then again, that
requirement looks good to me, when a viewer sees:

https://safe.sample.com instead of https://sample.com, that make him feel
better:)

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/subdoamin-when-https-else-root-possible-tp4598875p4599336.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: javascript & layout problem

2011-07-18 Thread Rendy Tapestry
I was try it, but its still not working.

Thanks,
Rendy.

On Sat, Jul 16, 2011 at 11:26 PM, Taha Tapestry wrote:

> Did you try directly inserting the script in layout by using script tag
> inside head tag
>
> Regards
> Taha
>
> On Jul 16, 2011, at 9:35 PM, Rendy Tapestry 
> wrote:
>
> > Hi Mihail,
> >
> > Thank you for your response. If that is how the correct thing should
> > happened, I will accept it. I come to this question because in Tapestry
> 4, I
> > am using decorator to build a template. In default.jsp I put an import to
> > jquery lib once and never import it again in every page that use the
> > template.
> >
> > Thanks,
> > Rendy
> >
> > 2011/7/16 Михаил Слободянюк 
> >
> >> Hi, Rendy!
> >>
> >> You must import every used script in every page/component class same as
> >> import other used java classes.
> >>
> >> Mihail Slobodyanuk.
> >>
> >> 2011/7/16 Rendy Tapestry 
> >>
> >>> Hi All,
> >>>
> >>> I am using tapestry layout component, in page class I add @Import
> >>> annotation
> >>> to import jquery library. I have another page that is being used along
> >> with
> >>> the layout component and having @Import annotation to import specific
> >>> javascript for that page. That javascript used jquery inside it, the
> >>> problem
> >>> is, jQuery() is not recognized in that script. Solution I have right
> now,
> >>> is
> >>> reimport the same jquery library in the page class, every time I need
> >>> jquery. In my opinion that is bothersome.
> >>>
> >>> Here is the detail :
> >>>
> >>> @Import(library = "context:javascript/jquery-1.6.2.min.js")
> >>> public class Layout
> >>> {
> >>> ...
> >>> }
> >>>
> >>>
> >>> and
> >>> @Import(library = "context:javascript/test.js")
> >>> public class User
> >>> {
> >>> ...
> >>> }
> >>>
> >>> Inside test.js, I used jQuery, but an error show up telling that jQuery
> >> is
> >>> not recognized. But if I change User class to reimport jQuery the
> problem
> >>> solved.
> >>>
> >>> @Import(library = {"context:javascript/jquery-1.6.2.min.js",
> >>> "context:javascript/test.js"})
> >>> public class User
> >>> {
> >>> ...
> >>> }
> >>>
> >>> Any suggestion please ?
> >>>
> >>>
> >>> Thanks,
> >>> Rendy.
> >>>
> >>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5 + tests (source code included)

2011-07-18 Thread Taha Hafeez
Can you share the full source code as a zip/jar, I will look into that
(Sorry, too busy to create an new example)

regards
Taha

On Mon, Jul 18, 2011 at 5:30 PM, Julien Martin  wrote:
> Hello again,
> Do I need to add my CheetahPageTester to some configuration somewhere?
> J.
>
> 2011/7/18 Julien Martin 
>
>> Hello Taha,
>>
>> Thanks for your replies!
>>
>> Regarding Tapestry + Spring + tests, you put me on the right track yet I
>> have not being able to get it to work.
>>
>> Here is my PageTester class:
>>
>> *package com.cheetah.web;
>>
>> import org.apache.tapestry5.TapestryFilter;
>> import org.apache.tapestry5.internal.spring.SpringModuleDef;
>> import org.apache.tapestry5.ioc.Registry;
>> import org.apache.tapestry5.ioc.def.ModuleDef;
>> import org.apache.tapestry5.test.PageTester;
>> import org.springframework.mock.web.MockServletContext;
>>
>>
>> public class CheetahPageTester extends PageTester {
>>
>>     private MockServletContext servletContext;
>>
>>     public CheetahPageTester(String appPackage, String appName, String
>> contextPath, Class... moduleClasses) {
>>         super(appPackage, appName, contextPath, moduleClasses);
>>         Registry registry = this.getRegistry();
>>         // Set Tapestry registry in mock servlet context
>>         servletContext.setAttribute(TapestryFilter.REGISTRY_CONTEXT_NAME,
>> registry);
>>     }
>>
>>     public CheetahPageTester(String appPackage, String appName) {
>>         super(appPackage, appName);
>>     }
>>
>>     @Override
>>     protected ModuleDef[] provideExtraModuleDefs() {
>>         // Set spring configuration files location
>>         servletContext = new MockServletContext();
>>         servletContext.addInitParameter("contextConfigLocation",
>> "classpath*:cheetah-web-application-context.xml");
>>         return new ModuleDef[]{
>>                 new SpringModuleDef(servletContext)
>>         };
>>     }
>>
>>
>> }*
>>
>> and the relevant bit in my test class:
>> * CheetahPageTester tester = new CheetahPageTester(appPackage, appName,
>> "src/main/webapp");*
>>
>> I get exactly the same exception as before... Any idea why? What else might
>> I have got wrong?
>>
>> Regards,
>> Julien.
>>
>>
>> 2011/7/18 Taha Hafeez 
>>
>>> Hi
>>>
>>> Follow this :
>>> http://spreadthesource.com/2010/08/start-spring-application-context-for-your-tapestry-unit-tests/
>>>
>>> regards
>>> Taha
>>>
>>> On Mon, Jul 18, 2011 at 3:01 AM, Julien Martin  wrote:
>>> > Hello,
>>> >
>>> > I am not able to test my Tapestry application. What is very odd is that
>>> the
>>> > exception is not thrown when I run the app in a browser.
>>> >
>>> > Can anyone please help?
>>> >
>>> > Thanks in advance,
>>> >
>>> > Julien.
>>> >
>>> > Here is the test class:
>>> > *
>>> > public class CreateJobPostingTest {
>>> >
>>> >    @Test
>>> >    public void test1() {
>>> >        String appPackage = "com.cheetah.web";
>>> >        String appName = "app";
>>> >        PageTester tester = new PageTester(appPackage, appName,
>>> > "src/main/webapp");
>>> >        Document doc = tester.renderPage("recruiters/createjobposting");
>>> >        Element createJobPostingForm =
>>> > doc.getElementById("createJobPostingForm");
>>> >        Map fieldValues = new HashMap();
>>> >        fieldValues.put("jobPostingTitle", "Développeur
>>> > java/Tapestry/Junit");
>>> >        fieldValues.put("jobPostingBody", "Poste de de développeur
>>> agile/XP
>>> > qui travaillera en TDD exclusivement");
>>> >        Document docFromForm = tester.submitForm(createJobPostingForm,
>>> > fieldValues);
>>> >        assertTrue(docFromForm.toString().contains("TDD exclusivement"));
>>> >    }
>>> >
>>> >    @Test
>>> >    @Ignore
>>> >    public void test2() {
>>> >        assertTrue(false);
>>> >    }
>>> > }*
>>> >
>>> > Here is the class being tested:
>>> >
>>> > *
>>> > import com.cheetah.domain.JobPosting;
>>> > import org.apache.tapestry5.EventConstants;
>>> >
>>> > import org.apache.tapestry5.annotations.*;
>>> > import org.apache.tapestry5.corelib.components.BeanEditForm;
>>> >
>>> > public class CreateJobPosting {
>>> >
>>> >    @InjectComponent
>>> >    private BeanEditForm createJobPostingForm;
>>> >
>>> >    @InjectPage
>>> >    private ConfirmationPage confirmationPage;
>>> >
>>> >    @SessionState
>>> >    @Property
>>> >    private JobPosting jobPosting;
>>> >
>>> >    @Log
>>> >    @OnEvent(value = EventConstants.VALIDATE)
>>> >    void validateCreateJobPostingForm() {
>>> >        if (createJobPostingForm.isValid()) {
>>> >            if (jobPosting.getJobPostingTitle().contains("toto")) {
>>> >                createJobPostingForm.recordError("pas de toto svp");
>>> >            }
>>> >        }
>>> >    }
>>> >
>>> >    @OnEvent(value = EventConstants.SUCCESS)
>>> >    @DiscardAfter
>>> >    Object displayConfirmationPage() {
>>> >        this.confirmationPage.setupJobPosting(this.jobPosting);
>>> >        return ConfirmationPage.class;
>>> >    }
>>> >
>>> >
>>> > }*
>>> >
>>> >
>>> > Here is the s

Re: subdoamin when https else root, possible?

2011-07-18 Thread Taha Hafeez
If I understand correctly, the problem in your case is that the links
generated are not absolute e.g. PageLink for MyPage.class generates
'/mypage', so when on a secure page, the secure domain will be used by
the browser. If you want the links to be consistent you have you
create your own links with Link.toAbsoluteURI() (:

On Mon, Jul 18, 2011 at 4:49 PM, Angelo C.  wrote:
> not sure if that applicable in my case. let me explain a little more, with my
> BaseURLService:
>
> 1. In the  www.sample.com/view, login page's link is:
> https://www.safe.sample.com/login, that's what I want.
>
> 2. When you are in the login page, view page's link become:
> http://www.safe.sample.com/view, i want it to be http://www.sample.com/view
>
> ?
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/subdoamin-when-https-else-root-possible-tp4598875p4599062.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
>
>

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



Re: T5 + tests (source code included)

2011-07-18 Thread Julien Martin
Hello again,
Do I need to add my CheetahPageTester to some configuration somewhere?
J.

2011/7/18 Julien Martin 

> Hello Taha,
>
> Thanks for your replies!
>
> Regarding Tapestry + Spring + tests, you put me on the right track yet I
> have not being able to get it to work.
>
> Here is my PageTester class:
>
> *package com.cheetah.web;
>
> import org.apache.tapestry5.TapestryFilter;
> import org.apache.tapestry5.internal.spring.SpringModuleDef;
> import org.apache.tapestry5.ioc.Registry;
> import org.apache.tapestry5.ioc.def.ModuleDef;
> import org.apache.tapestry5.test.PageTester;
> import org.springframework.mock.web.MockServletContext;
>
>
> public class CheetahPageTester extends PageTester {
>
> private MockServletContext servletContext;
>
> public CheetahPageTester(String appPackage, String appName, String
> contextPath, Class... moduleClasses) {
> super(appPackage, appName, contextPath, moduleClasses);
> Registry registry = this.getRegistry();
> // Set Tapestry registry in mock servlet context
> servletContext.setAttribute(TapestryFilter.REGISTRY_CONTEXT_NAME,
> registry);
> }
>
> public CheetahPageTester(String appPackage, String appName) {
> super(appPackage, appName);
> }
>
> @Override
> protected ModuleDef[] provideExtraModuleDefs() {
> // Set spring configuration files location
> servletContext = new MockServletContext();
> servletContext.addInitParameter("contextConfigLocation",
> "classpath*:cheetah-web-application-context.xml");
> return new ModuleDef[]{
> new SpringModuleDef(servletContext)
> };
> }
>
>
> }*
>
> and the relevant bit in my test class:
> * CheetahPageTester tester = new CheetahPageTester(appPackage, appName,
> "src/main/webapp");*
>
> I get exactly the same exception as before... Any idea why? What else might
> I have got wrong?
>
> Regards,
> Julien.
>
>
> 2011/7/18 Taha Hafeez 
>
>> Hi
>>
>> Follow this :
>> http://spreadthesource.com/2010/08/start-spring-application-context-for-your-tapestry-unit-tests/
>>
>> regards
>> Taha
>>
>> On Mon, Jul 18, 2011 at 3:01 AM, Julien Martin  wrote:
>> > Hello,
>> >
>> > I am not able to test my Tapestry application. What is very odd is that
>> the
>> > exception is not thrown when I run the app in a browser.
>> >
>> > Can anyone please help?
>> >
>> > Thanks in advance,
>> >
>> > Julien.
>> >
>> > Here is the test class:
>> > *
>> > public class CreateJobPostingTest {
>> >
>> >@Test
>> >public void test1() {
>> >String appPackage = "com.cheetah.web";
>> >String appName = "app";
>> >PageTester tester = new PageTester(appPackage, appName,
>> > "src/main/webapp");
>> >Document doc = tester.renderPage("recruiters/createjobposting");
>> >Element createJobPostingForm =
>> > doc.getElementById("createJobPostingForm");
>> >Map fieldValues = new HashMap();
>> >fieldValues.put("jobPostingTitle", "Développeur
>> > java/Tapestry/Junit");
>> >fieldValues.put("jobPostingBody", "Poste de de développeur
>> agile/XP
>> > qui travaillera en TDD exclusivement");
>> >Document docFromForm = tester.submitForm(createJobPostingForm,
>> > fieldValues);
>> >assertTrue(docFromForm.toString().contains("TDD exclusivement"));
>> >}
>> >
>> >@Test
>> >@Ignore
>> >public void test2() {
>> >assertTrue(false);
>> >}
>> > }*
>> >
>> > Here is the class being tested:
>> >
>> > *
>> > import com.cheetah.domain.JobPosting;
>> > import org.apache.tapestry5.EventConstants;
>> >
>> > import org.apache.tapestry5.annotations.*;
>> > import org.apache.tapestry5.corelib.components.BeanEditForm;
>> >
>> > public class CreateJobPosting {
>> >
>> >@InjectComponent
>> >private BeanEditForm createJobPostingForm;
>> >
>> >@InjectPage
>> >private ConfirmationPage confirmationPage;
>> >
>> >@SessionState
>> >@Property
>> >private JobPosting jobPosting;
>> >
>> >@Log
>> >@OnEvent(value = EventConstants.VALIDATE)
>> >void validateCreateJobPostingForm() {
>> >if (createJobPostingForm.isValid()) {
>> >if (jobPosting.getJobPostingTitle().contains("toto")) {
>> >createJobPostingForm.recordError("pas de toto svp");
>> >}
>> >}
>> >}
>> >
>> >@OnEvent(value = EventConstants.SUCCESS)
>> >@DiscardAfter
>> >Object displayConfirmationPage() {
>> >this.confirmationPage.setupJobPosting(this.jobPosting);
>> >return ConfirmationPage.class;
>> >}
>> >
>> >
>> > }*
>> >
>> >
>> > Here is the second "ConfirmationPage" page:
>> > *
>> > import com.cheetah.domain.JobPosting;
>> > import com.cheetah.service.CheetahService;
>> > import org.apache.tapestry5.EventConstants;
>> > import org.apache.tapestry5.annotations.DiscardAfter;
>> > import org.apache.tapestry5.annotations.OnEvent;
>> > import org.apache.tapestry5.annotations.Persist;
>> > im

Re: subdoamin when https else root, possible?

2011-07-18 Thread Angelo C.
not sure if that applicable in my case. let me explain a little more, with my
BaseURLService:

1. In the  www.sample.com/view, login page's link is:
https://www.safe.sample.com/login, that's what I want.

2. When you are in the login page, view page's link become:
http://www.safe.sample.com/view, i want it to be http://www.sample.com/view

?

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/subdoamin-when-https-else-root-possible-tp4598875p4599062.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: how to redirect to a common url in PageRenderLinkTransformer.decodePageRenderRequest

2011-07-18 Thread Taha Hafeez
Just return a URL instance of a non-tapestry page from the event
handler. I think that will do


On Mon, Jul 18, 2011 at 4:04 PM, Bo Gao  wrote:
> Thank you for your response,
>
> For example I want to redirect /download to another url "download.do"
> But the download.do is not a tapestry page, it's not handled by tapestry.
> How to do this?
>
>
> On Jul 18, 2011, at 6:18 PM, Taha Hafeez wrote:
>
>> Hi
>>
>> http://blog.tapestry5.de/index.php/2010/09/06/new-url-rewriting-api/
>>
>> regards
>> Taha
>>
>> On Mon, Jul 18, 2011 at 3:22 PM, Bo Gao  wrote:
>>> I want to redirect some url to another url, the url is not a tapestry page.
>>> but decodePageRenderRequest returns a PageRenderRequestParameters
>>> How can I do this.
>>>
>>> --
>>> Bo Gao
>>> eli...@gmail.com
>>>
>>>
>>>
>>>
>>>
>>> -
>>> 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
>>
>
> --
> Bo Gao
> eli...@gmail.com
>
>
>
>
>
> -
> 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: how to redirect to a common url in PageRenderLinkTransformer.decodePageRenderRequest

2011-07-18 Thread Bo Gao
Thank you for your response,

For example I want to redirect /download to another url "download.do"
But the download.do is not a tapestry page, it's not handled by tapestry. 
How to do this?


On Jul 18, 2011, at 6:18 PM, Taha Hafeez wrote:

> Hi
> 
> http://blog.tapestry5.de/index.php/2010/09/06/new-url-rewriting-api/
> 
> regards
> Taha
> 
> On Mon, Jul 18, 2011 at 3:22 PM, Bo Gao  wrote:
>> I want to redirect some url to another url, the url is not a tapestry page.
>> but decodePageRenderRequest returns a PageRenderRequestParameters
>> How can I do this.
>> 
>> --
>> Bo Gao
>> eli...@gmail.com
>> 
>> 
>> 
>> 
>> 
>> -
>> 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
> 

--
Bo Gao
eli...@gmail.com





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



Re: subdoamin when https else root, possible?

2011-07-18 Thread Taha Hafeez
Hi Angelo

This might help
http://tapestry.1045711.n5.nabble.com/example-BaseURLSource-T5-td2427659.html

regards
Taha

On Mon, Jul 18, 2011 at 3:42 PM, Angelo C.  wrote:
> Hi,
>
> I use @secure on some pages(login, setup, etc), with following BaseURL
> service, it works well.
>
> now, there is this new requirement, when in https mode, the domain should be
> a subdomain:
> safe.sample.com not a root domain, sample.com, this cause problems to
> existing pages,
> example, a non @secure page View become http://www.safe.sample.com/view,
> instead of http://www.sample.com/view
>
> solutions?
>
> Angelo
>
>
>
> public  static void contributeAlias(Configuration
> configuration)
>   {
>       BaseURLSource source = new BaseURLSource()
>       {
>           public String getBaseURL(boolean secure)
>           {
>               String protocol = secure ? "https" : "http";
>               int port = secure ? 8443 : 8080;
>               return String.format("%s://www.%s", protocol, "sample.com");
>           }
>       };
>
>       configuration.add(AliasContribution.create(BaseURLSource.class,
> source));
>   }
>
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/subdoamin-when-https-else-root-possible-tp4598875p4598875.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
>
>

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



Re: how to redirect to a common url in PageRenderLinkTransformer.decodePageRenderRequest

2011-07-18 Thread Taha Hafeez
Hi

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

regards
Taha

On Mon, Jul 18, 2011 at 3:22 PM, Bo Gao  wrote:
> I want to redirect some url to another url, the url is not a tapestry page.
> but decodePageRenderRequest returns a PageRenderRequestParameters
> How can I do this.
>
> --
> Bo Gao
> eli...@gmail.com
>
>
>
>
>
> -
> 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



subdoamin when https else root, possible?

2011-07-18 Thread Angelo C.
Hi,

I use @secure on some pages(login, setup, etc), with following BaseURL
service, it works well.

now, there is this new requirement, when in https mode, the domain should be
a subdomain:
safe.sample.com not a root domain, sample.com, this cause problems to
existing pages,
example, a non @secure page View become http://www.safe.sample.com/view,
instead of http://www.sample.com/view

solutions?

Angelo
 


public  static void contributeAlias(Configuration
configuration)
   {
   BaseURLSource source = new BaseURLSource()
   {
   public String getBaseURL(boolean secure)
   {
   String protocol = secure ? "https" : "http";
   int port = secure ? 8443 : 8080;
   return String.format("%s://www.%s", protocol, "sample.com");
   }
   };

   configuration.add(AliasContribution.create(BaseURLSource.class,
source));
   }


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/subdoamin-when-https-else-root-possible-tp4598875p4598875.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



how to redirect to a common url in PageRenderLinkTransformer.decodePageRenderRequest

2011-07-18 Thread Bo Gao
I want to redirect some url to another url, the url is not a tapestry page.
but decodePageRenderRequest returns a PageRenderRequestParameters
How can I do this.

--
Bo Gao
eli...@gmail.com





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