Re: Changing to default localization without extension for the language

2012-11-23 Thread Geoff Callender
Once I have gone to a specific locale I can't get back to the default locale in 
a way that leaves locale out of the URL.

eg. from 
http://localhost:8080/myapp/mypage
to 
http://localhost:8080/myapp/en_GB/mypage
and back to
http://localhost:8080/myapp/mypage

I have tried LocalizationSetter#setLocaleFromLocaleName("") but the locale 
won't change because it isn't supported.
So I tried adding "" to the SUPPORTED_LOCALES, and that gave me an invalid URL:

http://localhost:8080/myapp//mypage

Exactly the same effect using Locale.ROOT, because Locale.ROOT.toString() is "" 
and Locale.ROOT.getDisplayName() is "".

The source of the problem seems to be that locale starts off as null in 
ThreadLocaleImpl and PersistentLocaleImpl but it's not possible to set it back 
to null.

What have I missed?

On 20/11/2012, at 12:55 AM, Ivan Khalopik wrote:

> I don't understand your question.
> But if you change locale using PersistentLocale service it will be
> persisted in URL and be changed for next page request. The new localale
> should also be configured in "tapestry.supported-locales" symbol.
> If you want to chnge locale just for this request you can use
> ThreadLocale#setLocale(...) method.
> If you need both variants with safety and advantage of finding the closest
> supported locale use LocalizationSetter#setLocaleFromLocaleName("en")
> 
> All message catalogs will be accessed by tapestry with right choose. Just
> use .properties for default locale, _ro.properties to override properties
> for ro locale, _en.properties for en locale.
> If you want to change locale to default (not ro) use Locale.ROOT constant
> for java 6, and new Locale("") for older versions.
> 
> On Mon, Nov 19, 2012 at 3:10 PM, o3005659  wrote:
> 
>> I have made localization ro and en. Ro is by default, however I didn't
>> extend
>> my property files with_ro extension, but I simply put
>> thisispropertyfile.properties. Now I have implemented for English
>> 
>>  public String onActionFromGoEnglish()
>>{
>>persistentLocale.set(new Locale("en"));
>>return null;
>>}
>> 
>> however, I don't know how to access property files that have no _ro
>> extension in example when user switches from en to ro. What to points my
>> persistenLocale then?
>> 
>> 
>> 
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/Changing-to-default-localization-without-extension-for-the-language-tp5718092.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
>> 
>> 
> 
> 
> -- 
> BR
> Ivan


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



Re: Which phase of page lifecycle will not occur when we access page 2nd time?

2012-11-23 Thread Thiago H de Paula Figueiredo
On Fri, 23 Nov 2012 22:03:46 -0200, Geoff Callender  
 wrote:


Yes, every page render request and component event request does result  
in pageAttached(), onActivate() and pageDetached() being called.


But there's one other situation, shown in the example "When Tapestry  
creates a URL to this page". It results in pageAttached() and  
pageDetached() but no onActivate(). I just thought that might be worth  
being reminded of.


Agreed, even the initial question being about requests. :)

--
Thiago H. de Paula Figueiredo

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



Re: Which phase of page lifecycle will not occur when we access page 2nd time?

2012-11-23 Thread Geoff Callender
Yes, every page render request and component event request does result in 
pageAttached(), onActivate() and pageDetached() being called.

But there's one other situation, shown in the example "When Tapestry creates a 
URL to this page". It results in pageAttached() and pageDetached() but no 
onActivate(). I just thought that might be worth being reminded of.

Cheers,

Geoff

On 23/11/2012, at 3:54 AM, Lenny Primak wrote:

> Hmm... When does it not get called?  I always see onActivate in the JumpStart 
> link
> 
> On Nov 22, 2012, at 5:47 AM, Geoff Callender wrote:
> 
>> onActivate() is NOT always called. See 
>> http://jumpstart.doublenegative.com.au/jumpstart/examples/navigation/whatiscalledandwhen
>>  .
>> 
>> Geoff
>> 
>> On 22/11/2012, at 9:36 PM, Thiago H de Paula Figueiredo wrote:
>> 
>>> On Thu, 22 Nov 2012 05:45:10 -0200, Muhammad Gelbana  
>>> wrote:
>>> 
 So now with 5.3.6, since pooling is disabled, is it a single page instance 
 for each request?
>>> 
>>> Yes.
>>> 
 And how does it differ from the activation context event if they are both 
 executed when the page is first loaded ?
>>> 
>>> That's a completely different thing. The singletonness of Tapestry 5.2+ is 
>>> about fields and the activation context is about invoking an event handler 
>>> method.
>>> 
 My *guess* is that tapestry loads the page for the first time
 (@PageLoaded),
>>> 
>>> Correct.
>>> 
 attaches it to the client's session (that is created by
 default)
>>> 
>>> That's not correct. Tapestry doesn't create an user session by default. 
>>> It's created when needed (a write to the session). In addition, page 
>>> instances aren't attached to sessions. I guess you're talking about the 
>>> per-thread map used to store the field values. If yes, then you were 
>>> correct, just used the wrong words. :)
>>> 
 and then executes the ActivationContext even whenever a request is made to 
 the page, am I correct ?
>>> 
>>> Correct.
>>> 
>>> -- 
>>> Thiago H. de Paula Figueiredo
>>> 
>>> -
>>> 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
> 


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



Re: Adding a progress listener to UploadedFile

2012-11-23 Thread Lance Java
In tapestry 5.2+ you have the option of annotations or naming conventions.
Prior to 5.2 you can only use naming conventions. 

See methods starting with "contribute" here 
 http://tapestry.apache.org/tapestry-ioc-configuration.html



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Adding-a-progress-listener-to-UploadedFile-tp5718197p5718219.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: Jquery Tooltip on production mode

2012-11-23 Thread Lance Java
Yui isn't on your build path
Have you done a clean deploy or a dirty deploy? 



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Jquery-Tooltip-on-production-mode-tp5718174p5718216.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: Adding a progress listener to UploadedFile

2012-11-23 Thread dkeenan
Thanks. I wasn't able to use the following annotation and method...

@Contribute(ServiceOverride.class)
  public static void
setupApplicationServiceOverrides(MappedConfiguration
configuration)
  {
configuration.addInstance(SomeServiceType.class,
SomeServiceTypeOverrideImpl.class);
  }

I have a suspicion I am on an earlier version of tapestry 5 (I am still on
5.1.0.5).

I have managed to override MultipartDecoderImpl in a very hacky way which
has allowed me to set the progress listener. It's an early POC I'm doing so,
happy that it works, but will look into upgrading tapestry soon if need be.

Thanks for your help.




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Adding-a-progress-listener-to-UploadedFile-tp5718197p5718215.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-JQuery: use of GoogleMap component

2012-11-23 Thread Emmanuel DEMEY
Sorry for the delay on the Tapestry5-jQuery mailing list. I will try to
find a solution right now.


2012/11/23 David Canteros 

> Thank you for your answers!
>
> I didn't know about the exanpe library, i looks very good!
> However I'm already using Tapestry-Jquery so I'll try first the solution
> proposed by arterzatij.
>
> The tapestry-jquery developers should be noticed about this problem,I
> posted this on the google-group of the project , but  with no concrete
> answers...
>
> --
> David Germán Canteros
>
>
> 2012/11/23 Lance Java 
>
> > I haven't used the gmap in tapestry-jquery but I have used the gmap
> > component
> > from exanpe without any trouble at all.
> >
> > Demo:
> > http://exanpe-t5-lib.appspot.com/components/googlemap/example2
> >
> > Source:
> > https://github.com/exanpe/exanpe-t5-lib
> >
> > Demo Source:
> > https://github.com/exanpe/exanpe-t5-demo
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://tapestry.1045711.n5.nabble.com/Tapestry-JQuery-use-of-GoogleMap-component-tp5718195p5718201.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
> >
> >
>



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

Twitter : @EmmanuelDemey


Re: Disabling HMAC check

2012-11-23 Thread TG
Works like a charm. Thanks guy!



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Disabling-HMAC-check-tp5718156p5718212.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: Jquery Tooltip on production mode

2012-11-23 Thread Lance Java
Type "mvn dependency:tree" at the command line to show your dependency
hierarchy



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Jquery-Tooltip-on-production-mode-tp5718174p5718210.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 pass the object itself by eventlink?

2012-11-23 Thread Thiago H de Paula Figueiredo

Answering the question in the subject: just pass it.

On Fri, 23 Nov 2012 15:52:11 -0200, membersound  wrote:


How can I just pass the object of an eventlink within a table row?


The same way you'd do it if it wasn't inside a table row.


The following does not work, I don't understand why:


Implement a ValueEncoder for it and contribute it to the  
ValueEncoderSource service.


The 'why' is that Tapestry doesn't know how to map your object to a String  
and vice-versa.


--
Thiago H. de Paula Figueiredo

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



How to pass the object itself by eventlink?

2012-11-23 Thread membersound
How can I just pass the object of an eventlink within a table row?

The following does not work, I don't understand why:


 
  Create
Object
 



class MyPage {
   @Property
   Object object;

   @Property
   List objects;

   public void onCreateObject(Object object) {
   object.getXX();
   }
}

[ERROR] TapestryModule.RequestExceptionHandler Processing of request failed
with uncaught exception: Exception in method My.onCreateObject($Song),
parameter #1: Could not find a coercion from type java.lang.String to type
$Object.
org.apache.tapestry5.runtime.ComponentEventException: Exception in method
MyPage.onCreateObject($Song), parameter #1: Could not find a coercion from
type java.lang.String to type $Object.




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-pass-the-object-itself-by-eventlink-tp5718208.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: Jquery Tooltip on production mode

2012-11-23 Thread arterzatij
I try this:

 



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Jquery-Tooltip-on-production-mode-tp5718174p5718207.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: Jquery Tooltip on production mode

2012-11-23 Thread arterzatij
Seems like YUI pom avoiding is still no working. There are configuration that
I missing?


Thanks!

 



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Jquery-Tooltip-on-production-mode-tp5718174p5718206.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: Adding a progress listener to UploadedFile

2012-11-23 Thread Lance Java
http://tapestry.apache.org/ioc-cookbook-overriding-ioc-services.html



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Adding-a-progress-listener-to-UploadedFile-tp5718197p5718205.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-JQuery: use of GoogleMap component

2012-11-23 Thread David Canteros
Thank you for your answers!

I didn't know about the exanpe library, i looks very good!
However I'm already using Tapestry-Jquery so I'll try first the solution
proposed by arterzatij.

The tapestry-jquery developers should be noticed about this problem,I
posted this on the google-group of the project , but  with no concrete
answers...

--
David Germán Canteros


2012/11/23 Lance Java 

> I haven't used the gmap in tapestry-jquery but I have used the gmap
> component
> from exanpe without any trouble at all.
>
> Demo:
> http://exanpe-t5-lib.appspot.com/components/googlemap/example2
>
> Source:
> https://github.com/exanpe/exanpe-t5-lib
>
> Demo Source:
> https://github.com/exanpe/exanpe-t5-demo
>
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Tapestry-JQuery-use-of-GoogleMap-component-tp5718195p5718201.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: Adding a progress listener to UploadedFile

2012-11-23 Thread Lance Java
You will need to override (or perhaps decorate) the MultipartDecoder. Most
likely, you will extend MultipartDecoderImpl and extend the following method
to add your progress listener:



Note that the MultipartDecoder has per-thread scope

https://github.com/apache/tapestry5/blob/trunk/tapestry-upload/src/main/java/org/apache/tapestry5/upload/services/UploadModule.java
https://github.com/apache/tapestry5/blob/trunk/tapestry-upload/src/main/java/org/apache/tapestry5/upload/internal/services/MultipartDecoderImpl.java



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Adding-a-progress-listener-to-UploadedFile-tp5718197p5718202.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-JQuery: use of GoogleMap component

2012-11-23 Thread Lance Java
I haven't used the gmap in tapestry-jquery but I have used the gmap component
from exanpe without any trouble at all.

Demo:
http://exanpe-t5-lib.appspot.com/components/googlemap/example2

Source:
https://github.com/exanpe/exanpe-t5-lib

Demo Source:
https://github.com/exanpe/exanpe-t5-demo




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-JQuery-use-of-GoogleMap-component-tp5718195p5718201.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: Jquery Tooltip on production mode

2012-11-23 Thread Lance Java
Can you send another screenshot now that YUI is not compressing the
javascript?



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Jquery-Tooltip-on-production-mode-tp5718174p5718200.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