Re: Keeping the session alive pattern?

2013-02-08 Thread Lance Java
I had no idea he was already using tapestry-security until you mentioned it.
I thought my comments were clear that the security frameworks have solved
this problem, I guess I was not. 



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Keeping-the-session-alive-pattern-tp5719771p5719861.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 call locale properties file based on urls

2013-02-08 Thread karthi
Hi everyone,

I am developing a web application in tapestry  now I want to call locale
properties file  this properties file call should depends on the calling
url.

Eg.,

My app name is Club

 I have properties file under my WEB-INF folder as

Club_en.properties
Club_de.properties
Club_it.properties

 in AppModule extended the supported locales to

configuration.add(SymbolConstants.SUPPORTED_LOCALES, en,de,it);

*** Now this works well  this filter call based on client browser's
preference language

I want to call this properties file bases on url called 

*** For eg., When I called this app as de.club.mobi/Club then my application
should use the properties file Club_de.properties file

How can I achieve this? Anyone give me some ideas?

Regards,
Karthi.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-call-locale-properties-file-based-on-urls-tp5719862.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-5.4-alpha-2 css overriding

2013-02-08 Thread Lance Java
Note that @Import does not need to be used at the class level. You can
specify @Import on one of the later render phases, eg: afterRender()



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-5-4-alpha-2-css-overriding-tp5719856p5719863.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 call locale properties file based on urls

2013-02-08 Thread Lance Java
Tapestry has built in support for including the language in the URL. If you
set the locale on the PersistentLocale service, the first folder in the URL
will be the language http://tapestry.apache.org/localization.html

There is also a ThreadLocale service which is ultimately used for message
lookup. If you want your own custom logic then I suggest that you contribute
a RequestFilter to the RequestHandler service. The RequestFilter will set
the locale on ThreadLocale by inspecting the Request. It's probably best to
contribute your filter before:*



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-call-locale-properties-file-based-on-urls-tp5719862p5719865.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 call locale properties file based on urls

2013-02-08 Thread karthi
Thanks for your reply.

the first folder in the URL will be the language?

Here, Can't understand? could you elaborate?

If my called url is de.club.mobi/club 
then will my club_de.properties invoke automatically?



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-call-locale-properties-file-based-on-urls-tp5719862p5719866.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 call locale properties file based on urls

2013-02-08 Thread karthi
One more question:

You said: If you set the locale on the PersistentLocale service

How to set PersistentLocale service?

I just tried to inject in my page but it doesn't gives any effect rather it
throws null pointer exception.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-call-locale-properties-file-based-on-urls-tp5719862p5719867.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 call locale properties file based on urls

2013-02-08 Thread Lance Java
Tapestry's built in language support is as follows
www.myserver.com/Clubs - persistant locale is null
www.myserver.com/de/Clubs - persistant locale is de

If you are happy enough with that then use the built in support. If not, use
my second suggestion.





--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-call-locale-properties-file-based-on-urls-tp5719862p5719868.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 call locale properties file based on urls

2013-02-08 Thread Lance Java
All of the services I mentioned (PersistantLocale, ThreadLocale, Request and
RequestHandler) are tapestry managed services. I suggest you familiarize
yourself with tapestry IOC

http://tapestry.apache.org/defining-tapestry-ioc-services.html
http://tapestry.apache.org/tapestry-ioc-configuration.html



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-call-locale-properties-file-based-on-urls-tp5719862p5719869.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 call locale properties file based on urls

2013-02-08 Thread René Bernhardsgrütter
Hi karthi and Lance Java,

@karthi, if you try the second solution and it doesn't work as expected,
try it with ComponentRequestFilter instead of RequestFilter. I had there
a tricky problem this week, see here:
https://mail-archives.apache.org/mod_mbox/tapestry-users/201302.mbox/%3c51123b7f.20...@gmail.com%3E

I didn't want to use the url solution, now I store the locale
information in a cookie.

René

On 08.02.2013 12:10, Lance Java wrote:
 Tapestry has built in support for including the language in the URL. If you
 set the locale on the PersistentLocale service, the first folder in the URL
 will be the language http://tapestry.apache.org/localization.html

 There is also a ThreadLocale service which is ultimately used for message
 lookup. If you want your own custom logic then I suggest that you contribute
 a RequestFilter to the RequestHandler service. The RequestFilter will set
 the locale on ThreadLocale by inspecting the Request. It's probably best to
 contribute your filter before:*



 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/How-to-call-locale-properties-file-based-on-urls-tp5719862p5719865.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 call locale properties file based on urls

2013-02-08 Thread Lance Java
René, tapestry also supports locale specific assets (eg images) so a
ComponentRequestFilter is too late in the request-processing pipeline
(http://tapestry.apache.org/request-processing.html).

I think your main problem is that you have contributed your localeFilter
after:* so it won't run until after all of the components have rendered
which is pretty useless. If you contribute it before:* I assume it would
work.

Also, in your code, I can see a few problems:

1. You have not specified an interface in you bind methods

eg:
public static void bind(ServiceBinder binder) {
   binder.bind(TimingFilter.class).withId(TimingFilter);
   binder.bind(LocaleRequestFilter.class).withId(LocaleRequestFilter);
}

should be:
public static void bind(ServiceBinder binder) {
   binder.bind(RequestFilter.class, TimingFilter.class).withSimpleId();
   binder.bind(RequestFilter.class,
LocaleRequestFilter.class).withSimpleId();
}

2. You inject services but never use them

eg:
public void contributeRequestHandler(OrderedConfigurationRequestFilter
configuration,
   final Logger logger,
   final RequestGlobals requestGlobals,
   final Cookies cookies,
   final LocalizationSetter localizationSetter,
   @InjectService(TimingFilter) RequestFilter timingFilter,
   @InjectService(LocaleRequestFilter) RequestFilter localeRequestFilter)
{
  configuration.add(TimingFilter, new TimingFilter(logger));
  configuration.add(LocaleRequestFilter, new
LocaleRequestFilter(requestGlobals, cookies, localizationSetter),
after:*);
}

should be:
public void contributeRequestHandler(OrderedConfigurationRequestFilter
configuration,
   final Logger logger,
   final RequestGlobals requestGlobals,
   final Cookies cookies,
   final LocalizationSetter localizationSetter,
   @InjectService(TimingFilter) RequestFilter timingFilter,
   @InjectService(LocaleRequestFilter) RequestFilter localeRequestFilter)
{
  configuration.add(TimingFilter, timingFilter);
  configuration.add(LocaleRequestFilter, localeRequestFilter,
before:*)
}




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-call-locale-properties-file-based-on-urls-tp5719862p5719871.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 call locale properties file based on urls

2013-02-08 Thread René Bernhardsgrütter
I also contributed the RequestFilter in different phases (before:*,
before:SetupRender, before:BeginRender) because, to me, this should
set the locale before any template is rendered.

But it didn't work. I've tried now again and set the things you said
before. By the way, thanks for the tips :-) . I removed the unnecesary
interfaces and cleaned up after I mailed the, how it worked. It still
doesn't work.


My code now:
public static void bind(ServiceBinder binder) {
binder.bind(AjaxUploadDecoder.class,
AjaxUploadDecoderImpl.class).scope(ScopeConstants.PERTHREAD); // I also
use this, that should not affect the locale
binder.bind(TimingFilter.class).withSimpleId();
binder.bind(LocaleRequestFilter.class).withSimpleId();
}

public static void contributeRequestHandler(
OrderedConfigurationRequestFilter configuration,
@InjectService(TimingFilter) TimingFilter timingFilter,
@InjectService(LocaleRequestFilter) LocaleRequestFilter
localeRequestFilter) {
configuration.add(TimingFilter, timingFilter);
configuration.add(LocaleRequestFilter, localeRequestFilter,
before:*);
}

And the LocaleRequestFilter.java:
public class LocaleRequestFilter implements RequestFilter {

private Cookies cookies;
private LocalizationSetter localizationSetter;

public LocaleRequestFilter(Cookies cookies, LocalizationSetter
localizationSetter) {
this.cookies = cookies;
this.localizationSetter = localizationSetter;
}

@Override
public boolean service(Request request, Response response,
RequestHandler handler) throws IOException {
TranslatedLanguage preferredLanguage;

String languageValueInCookie =
cookies.readCookieValue(PlainTraySetting.COOKIE_LANGUAGE_VALUE_NAME);
// some logic to set the correct locale to prefferedLanguage,
which is an enum.

   
localizationSetter.setLocaleFromLocaleName(preferredLanguage.toString());
return handler.service(request, response);
}
}

On 08.02.2013 12:59, Lance Java wrote:
 René, tapestry also supports locale specific assets (eg images) so a
 ComponentRequestFilter is too late in the request-processing pipeline
 (http://tapestry.apache.org/request-processing.html).

 I think your main problem is that you have contributed your localeFilter
 after:* so it won't run until after all of the components have rendered
 which is pretty useless. If you contribute it before:* I assume it would
 work.

 Also, in your code, I can see a few problems:

 1. You have not specified an interface in you bind methods

 eg:
 public static void bind(ServiceBinder binder) {
binder.bind(TimingFilter.class).withId(TimingFilter);
binder.bind(LocaleRequestFilter.class).withId(LocaleRequestFilter);
 }

 should be:
 public static void bind(ServiceBinder binder) {
binder.bind(RequestFilter.class, TimingFilter.class).withSimpleId();
binder.bind(RequestFilter.class,
 LocaleRequestFilter.class).withSimpleId();
 }

 2. You inject services but never use them

 eg:
 public void contributeRequestHandler(OrderedConfigurationRequestFilter
 configuration,
final Logger logger,
final RequestGlobals requestGlobals,
final Cookies cookies,
final LocalizationSetter localizationSetter,
@InjectService(TimingFilter) RequestFilter timingFilter,
@InjectService(LocaleRequestFilter) RequestFilter localeRequestFilter)
 {
   configuration.add(TimingFilter, new TimingFilter(logger));
   configuration.add(LocaleRequestFilter, new
 LocaleRequestFilter(requestGlobals, cookies, localizationSetter),
 after:*);
 }

 should be:
 public void contributeRequestHandler(OrderedConfigurationRequestFilter
 configuration,
final Logger logger,
final RequestGlobals requestGlobals,
final Cookies cookies,
final LocalizationSetter localizationSetter,
@InjectService(TimingFilter) RequestFilter timingFilter,
@InjectService(LocaleRequestFilter) RequestFilter localeRequestFilter)
 {
   configuration.add(TimingFilter, timingFilter);
   configuration.add(LocaleRequestFilter, localeRequestFilter,
 before:*)
 }




 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/How-to-call-locale-properties-file-based-on-urls-tp5719862p5719871.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 call locale properties file based on urls

2013-02-08 Thread Lance Java
 I also contributed the RequestFilter in different phases (before:*,
before:SetupRender, before:BeginRender) because, to me, this should set
the locale before any template is rendered.
I've never heard of filters named SetupRender or BeginRender so I'm
pretty sure before:SetupRender has no effect.

 I removed the unnecesary interfaces and cleaned up
Interfaces are very necessary!!!. They are crucial to tapestry to support
lazy loading etc. You should NEVER refer to your services by their concrete
type.

eg:
binder.bind(TimingFilter.class).withSimpleId();

Should be:
binder.bind(RequestFilter.class, TimingFilter.class).withSimpleId();

eg:
public static void
contributeRequestHandler(OrderedConfigurationRequestFilter configuration,
@InjectService(TimingFilter) TimingFilter timingFilter) {

should be:
public static void
contributeRequestHandler(OrderedConfigurationRequestFilter configuration,
@InjectService(TimingFilter) RequestFilter timingFilter) {

I'm still not sure why your filter doesn't work when contributed before:*.
Have you tried some logging / breakpoints? Are you sure that
ThreadLocale.setLocale() is being called?





--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-call-locale-properties-file-based-on-urls-tp5719862p5719873.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 call locale properties file based on urls

2013-02-08 Thread Lance Java
René, I think I've figured out what your problem is. You should not be using
LocalizationSetter as this is backed by the PersistantLocale which is
ultimately responsible for including the language as the first folder in the
URL.

As I said initially, if you want your own custom logic (ie storing in a
cookie) then I suggest you use ThreadLocale instead.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-call-locale-properties-file-based-on-urls-tp5719862p5719874.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



Dynamic OptionModel Implementation: How To?

2013-02-08 Thread sommeralex
Hello!

I have objects (Messages) and each message may have some attributes
associated with. Each attribute is part of one attribute family. 

Example: 

Attribute-Family Age has the attributes young, adult, old. 
Attribute-Family Relation has the attributes single, couple, family. 

Both the Attribute Families are dynamic as well as their attributes itself.
So they should be generated or manipulated at runtime. (in 99,9% of the
cases, i will only add attributes for attribute families and will only add
completely new attribute-families (so i wont change or delete attributes or
their families)

Each message may be associated with ONE attribute for each or some
attribute-families. 

Example:

Message m1 gets adult and single as attribute values. 
Message m2 gets young
Message m3 gets couple

For this, I need a dynamic approach with the OptionModel. 

There should be a list being populated with t:selects for each attribute
familiy with their corresponding attributes. 


loop through all attribute-families:

t:select1 should show young, adult, old 
t:select2 should show single, couple, family
and so on.. 

My current (non dynamic) implementation comes with enums, but what i really
need is a list implementation for the OptionModel. So my first look was
this;

http://tapestry.apache.org/using-select-with-a-list.html

this should direct me to the right solution. the point is, i need to program
this module efficiently. Therefore, i have three questions:


*Q1*
Contributing value encoders to app module wont help, due to the reason that
the value encoders are not really dynamic in my case (e.g. if iam creating a
new attribute-family, i would need to add a value encoder also for each
attribute family at runtime / but i guess this is not possible, is it?)

*Q2*
What i understood so far is that the added value encoders to app module will
populate the option model somehow static so that the model itself will be
only generated once

/Well, in short, this design allows you to avoid storing (via @Persist,
@SessionAttribute or @SessionState) the entire (potentially large) list of
objects in the session or rebuilding the whole list of objects again (though
only one is needed) when the form is submitted. /

but if it is only generated once, how then will the list get updated if i am
enhancing the list?

*Q3*
If I have thousands of users creating messages, and for each message the
optionModel would be generated again (for all attribute families which are
expected to increase), this would result in many unnecessary database
queries. 

I will probably cope with 20-500 families and each family will have a
growing list of attributes. 

Adding attributes or attributes-familiies is not time-critical. So another
approach would be to hold somewhere a static list of value encoders which
are updating themselves in a specific interval. Is this possible?

i guess that i have misunderstood some things, right?

alex

  









--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Dynamic-OptionModel-Implementation-How-To-tp5719875.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 call locale properties file based on urls

2013-02-08 Thread René Bernhardsgrütter
 I've never heard of filters named SetupRender or BeginRender so I'm
 pretty sure before:SetupRender has no effect
I just tried this while I was trying to get it work.

 Interfaces are very necessary!!!. They are crucial to tapestry to support
 lazy loading etc. You should NEVER refer to your services by their concrete
 type.

 Should be:
 binder.bind(RequestFilter.class, TimingFilter.class).withSimpleId();
 should be:
 public static void
 contributeRequestHandler(OrderedConfigurationRequestFilter configuration,
 @InjectService(TimingFilter) RequestFilter timingFilter) {;

Ok, I didn't know that.  

Now the code is:

binder.bind(RequestFilter.class, TimingFilter.class).withSimpleId();
binder.bind(RequestFilter.class, 
LocaleRequestFilter.class).withSimpleId();

and:

public static void contributeRequestHandler(
OrderedConfigurationRequestFilter configuration,
@InjectService(TimingFilter) RequestFilter timingFilter,
@InjectService(LocaleRequestFilter) RequestFilter 
localeRequestFilter) {
configuration.add(TimingFilter, timingFilter);
configuration.add(LocaleRequestFilter, localeRequestFilter, 
before:*);
}

 René, I think I've figured out what your problem is. You should not be using
 LocalizationSetter as this is backed by the PersistantLocale which is
 ultimately responsible for including the language as the first folder in the
 URL.

I've also changed this, to:

public class LocaleRequestFilter implements RequestFilter {

private Cookies cookies;
private ThreadLocale threadLocale;

public LocaleRequestFilter(Cookies cookies, ThreadLocale threadLocale) {
this.cookies = cookies;
this.threadLocale = threadLocale;
}

@Override
public boolean service(Request request, Response response, RequestHandler 
handler) throws IOException {
TranslatedLanguage preferredLanguage;

String languageValueInCookie = 
cookies.readCookieValue(PlainTraySetting.COOKIE_LANGUAGE_VALUE_NAME);
String languageValueInHttpRequest = request.getLocale().getLanguage();

if (languageValueInCookie != null) {
preferredLanguage = 
TranslatedLanguage.findLanguage(languageValueInCookie);
} else {
preferredLanguage = 
TranslatedLanguage.findLanguage(languageValueInHttpRequest);
}

if (preferredLanguage == null) {
preferredLanguage = PlainTraySetting.DEFAULT_LANGUAGE;
}

if (languageValueInCookie == null) {

cookies.writeCookieValue(PlainTraySetting.COOKIE_LANGUAGE_VALUE_NAME, 
preferredLanguage.toString());
}

System.out.println(set locale to  + new 
Locale(preferredLanguage.toString()).getLanguage());
threadLocale.setLocale(new Locale(preferredLanguage.toString()));
System.out.println(get locale is  + 
threadLocale.getLocale().getLanguage());
return handler.service(request, response);
}
}

I see the output set locale to de and on the next line get locale is de, so 
I'm pretty sure threadLocale.setLocale(...) ran correctly.
But it still doesn't work. I always get the browser locale (English). 


On 08.02.2013 13:58, Lance Java wrote:
 René, I think I've figured out what your problem is. You should not be using
 LocalizationSetter as this is backed by the PersistantLocale which is
 ultimately responsible for including the language as the first folder in the
 URL.

 As I said initially, if you want your own custom logic (ie storing in a
 cookie) then I suggest you use ThreadLocale instead.



 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/How-to-call-locale-properties-file-based-on-urls-tp5719862p5719874.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 call locale properties file based on urls

2013-02-08 Thread Taha Siddiqi

Hi

Is this something you are looking for 

http://tawus.wordpress.com/2013/01/07/changing-locale-based-on-domain/

regards
Taha

On Feb 8, 2013, at 7:09 PM, René Bernhardsgrütter wrote:

 I've never heard of filters named SetupRender or BeginRender so I'm
 pretty sure before:SetupRender has no effect
 I just tried this while I was trying to get it work.
 
 Interfaces are very necessary!!!. They are crucial to tapestry to support
 lazy loading etc. You should NEVER refer to your services by their concrete
 type.
 
 Should be:
 binder.bind(RequestFilter.class, TimingFilter.class).withSimpleId();
 should be:
 public static void
 contributeRequestHandler(OrderedConfigurationRequestFilter configuration,
 @InjectService(TimingFilter) RequestFilter timingFilter) {;
 
 Ok, I didn't know that.
 
 Now the code is:
 
binder.bind(RequestFilter.class, TimingFilter.class).withSimpleId();
binder.bind(RequestFilter.class, 
 LocaleRequestFilter.class).withSimpleId();
 
 and:
 
public static void contributeRequestHandler(
OrderedConfigurationRequestFilter configuration,
@InjectService(TimingFilter) RequestFilter timingFilter,
@InjectService(LocaleRequestFilter) RequestFilter 
 localeRequestFilter) {
configuration.add(TimingFilter, timingFilter);
configuration.add(LocaleRequestFilter, localeRequestFilter, 
 before:*);
}
 
 René, I think I've figured out what your problem is. You should not be using
 LocalizationSetter as this is backed by the PersistantLocale which is
 ultimately responsible for including the language as the first folder in the
 URL.
 
 I've also changed this, to:
 
 public class LocaleRequestFilter implements RequestFilter {
 
private Cookies cookies;
private ThreadLocale threadLocale;
 
public LocaleRequestFilter(Cookies cookies, ThreadLocale threadLocale) {
this.cookies = cookies;
this.threadLocale = threadLocale;
}
 
@Override
public boolean service(Request request, Response response, RequestHandler 
 handler) throws IOException {
TranslatedLanguage preferredLanguage;
 
String languageValueInCookie = 
 cookies.readCookieValue(PlainTraySetting.COOKIE_LANGUAGE_VALUE_NAME);
String languageValueInHttpRequest = request.getLocale().getLanguage();
 
if (languageValueInCookie != null) {
preferredLanguage = 
 TranslatedLanguage.findLanguage(languageValueInCookie);
} else {
preferredLanguage = 
 TranslatedLanguage.findLanguage(languageValueInHttpRequest);
}
 
if (preferredLanguage == null) {
preferredLanguage = PlainTraySetting.DEFAULT_LANGUAGE;
}
 
if (languageValueInCookie == null) {

 cookies.writeCookieValue(PlainTraySetting.COOKIE_LANGUAGE_VALUE_NAME, 
 preferredLanguage.toString());
}
 
System.out.println(set locale to  + new 
 Locale(preferredLanguage.toString()).getLanguage());
threadLocale.setLocale(new Locale(preferredLanguage.toString()));
System.out.println(get locale is  + 
 threadLocale.getLocale().getLanguage());
return handler.service(request, response);
}
 }
 
 I see the output set locale to de and on the next line get locale is de, 
 so I'm pretty sure threadLocale.setLocale(...) ran correctly.
 But it still doesn't work. I always get the browser locale (English). 
 
 
 On 08.02.2013 13:58, Lance Java wrote:
 René, I think I've figured out what your problem is. You should not be using
 LocalizationSetter as this is backed by the PersistantLocale which is
 ultimately responsible for including the language as the first folder in the
 URL.
 
 As I said initially, if you want your own custom logic (ie storing in a
 cookie) then I suggest you use ThreadLocale instead.
 
 
 
 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/How-to-call-locale-properties-file-based-on-urls-tp5719862p5719874.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: Dynamic OptionModel Implementation: How To?

2013-02-08 Thread Thiago H de Paula Figueiredo
On Fri, 08 Feb 2013 11:37:09 -0200, sommeralex  
alexander.som...@gmail.com wrote:



Hello!


Hi!

The short answer to the question in the submect is this: OptionModel and  
SelectModel are interfaces. Create an implementation that does what you  
need.


--
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: How to call locale properties file based on urls

2013-02-08 Thread Lance Java
Hi Taha, decorating the ComponentEventLinkEncoder should have the same effect
as contributing a ComponentRequestFilter. As I've mentioned in this thread,
tapestry also supports locale specific assets (images, stylesheets etc) so I
feel that a RequestFilter is the correct point of interception for this. Is
there a reason why this cannot be done in a RequestFilter?



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-call-locale-properties-file-based-on-urls-tp5719862p5719879.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: Dynamic OptionModel Implementation: How To?

2013-02-08 Thread Thiago H de Paula Figueiredo

I've overlooked the questions in the end . . .

On Fri, 08 Feb 2013 11:37:09 -0200, sommeralex  
alexander.som...@gmail.com wrote:



*Q1*
Contributing value encoders to app module wont help, due to the reason  
that the value encoders are not really dynamic in my case (e.g. if iam  
creating a new attribute-family, i would need to add a value encoder  
also for each

attribute family at runtime / but i guess this is not possible, is it?)


What you contribute to ValueEncoderSource is static in the sense that  
you're automatically providing a ValueEncoderFactory (which provides  
ValueEncoder instances) [1] for a given type (class). This is Java, so you  
don't create types on-the-fly. And don't forget that you can use the  
encoder parameter of Select to dynamically provide a ValueEncoder and  
ValueEncoder implementations can be as dynamic as you want.


[1] It's quite common and valid to implement ValueEncoderFactory and  
ValueEncoder in the same class and just return this in  
ValueEncodeFactory.create() method.



*Q2*
What i understood so far is that the added value encoders to app module  
will populate the option model somehow static so that the model itself  
will be

only generated once


ValueEncoder does *not* populate OptionModels nor SelectModels.  
ValueEncoder maps Strings to objects and objects to Strings. By the way,  
you populate SelectModel, which is a list of options, not OptionModel,  
which represents one of the options. *You* populate SelectModel directly  
or using SelectModelFactory. I think you're confusing concepts and this is  
preventing you to move forward.



/Well, in short, this design allows you to avoid storing (via @Persist,
@SessionAttribute or @SessionState) the entire (potentially large) list  
of objects in the session or rebuilding the whole list of objects again  
(though only one is needed) when the form is submitted. /


You don't need to rebuild the whole list of objects. You only need to  
rebuild the selected object, something which is done by ValueEncoder.


I won't even answer the other questions because I think you should review  
what OptionModel, SelectModel and ValueEncoder are. It does seem to me  
that you have a wrong understanding of them.


--
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: How to call locale properties file based on urls

2013-02-08 Thread Thiago H de Paula Figueiredo
On Fri, 08 Feb 2013 10:17:57 -0200, René Bernhardsgrütter  
rene.bernhardsgruet...@gmail.com wrote:



I also contributed the RequestFilter in different phases (before:*,
before:SetupRender, before:BeginRender) because, to me, this should
set the locale before any template is rendered.


SetupRender and BeginRender are component rendering event phases. The  
before and after in ordered contributions refer to other contributed  
objects which, in this case, are other RequestFilters.


--
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: How to call locale properties file based on urls

2013-02-08 Thread Thiago H de Paula Figueiredo
On Fri, 08 Feb 2013 11:39:13 -0200, René Bernhardsgrütter  
rene.bernhardsgruet...@gmail.com wrote:


Interfaces are very necessary!!!. They are crucial to tapestry to  
support lazy loading etc. You should NEVER refer to your services by  
their concrete type.


This isn't just for Tapestry-IoC or Tapestry or even Java: these are rules  
for any object-oriented code in statically-typed languages. That's the  
Bridge design pattern.


--
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: Dynamic OptionModel Implementation: How To?

2013-02-08 Thread Lance Java
I have my own ListSelectModel for this purpose. Then, for any entity I want
to use in a select menu, all I need to write is a LabelProvider. 

public interface LabelProviderT {
   String getLabel(T value);
}

public class ListSelectModelT extends AbstractSelectModel {
   private ListOptionModel options;
   public ListSelectModel(ListT list, LabelProviderT labelProvider) {
  options = new ArrayListOptionModel(list.size());
  for (T value : list) {
 String label = labelProvider.getLabel(value);
 options.add(label, value);
  }
   }

   @Override
   public ListOptionGroupModel getOptionGroups() {
  return null;
   }

   @Override
   public ListOptionModel getOptions() {
  return options;
   }
}






--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Dynamic-OptionModel-Implementation-How-To-tp5719875p5719883.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-5.4-alpha-2 css overriding

2013-02-08 Thread Matías Blasi
Thanks guys, but I tried both with no success.
My custom.css is loaded first in any case

Is there any change on this in 5.4-alpha-2? I am used to override
default.css definitions with a custom.css in 5.3.x through @Import with no
problem.

Regards,
Matías.

Saludos,
Matias.


On Thu, Feb 7, 2013 at 5:23 PM, Matías Blasi matias.bl...@gmail.com wrote:

 Hi all,

 I'm using Tapestry-5.4-alpha-2 in a new project, and I am not beeing able
 to override some bootstrap.css definitions.

 I'm @Importing my custom stylesheet in my Layout component, but it
 included before bootstrap one, and the bootstrap.css overrides mine...

 How could I override bootstrap.css styles?

 Regards,
 Matias.



Re: Dynamic OptionModel Implementation: How To?

2013-02-08 Thread sommeralex
Hi Thiago, 

Thanx for the detailed answers! And sorry for being not clear. Sure, value,
option and selectModel are different, i just mixed them into one thing in
my questions. 

For getting the list-items to select, i need a selectModel. This selectModel
consists of optionModels, the optionModel just gives me the labels and
values. Hence, for linking the items to the DB entries (my server) the
valueEncoder translates the selected item to that item it actually
represents. (correct me if this is not true)

So, now i can correct my Q2, mixed up value and optionModel (which then ends
up not being a real question anymore, but still a misunderstanding):

I thought that it is possible to add the optionModel to the appModule
somehow that it is static. 

If i am using non-static option models, each user will always 

request the list(s), e.g:

ListColor colors = colorService.findAll(); //(taken from the example)

and the selectModelFactory will always have to create the selectModel from
scratch:

// create a SelectModel from my list of colors (taken from the example)
colorSelectModel = selectModelFactory.create(colors, name);

the point is, that my - options for the optionModel are dynamic, but only
slowly increasing/changing and for that reason i thought that there may be
a more efficient way to populate the optionModel in a way globally and
that this global available option model has to be updated time by time for
staying accurate. 

sorry for the confusion  thanx again. 
alex







--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Dynamic-OptionModel-Implementation-How-To-tp5719875p5719885.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: Dynamic OptionModel Implementation: How To?

2013-02-08 Thread sommeralex
also thanx!



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Dynamic-OptionModel-Implementation-How-To-tp5719875p5719886.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: Dynamic OptionModel Implementation: How To?

2013-02-08 Thread Thiago H de Paula Figueiredo
On Fri, 08 Feb 2013 13:27:26 -0200, sommeralex  
alexander.som...@gmail.com wrote:



Hi Thiago,


Hi!

Thanx for the detailed answers! And sorry for being not clear. Sure,  
value, option and selectModel are different, i just mixed them into one  
thing in my questions.


They are very different things, so you shouldn't mix then into one thing.

For getting the list-items to select, i need a selectModel. This  
selectModel consists of optionModels, the optionModel just gives me the  
labels and

values. Hence, for linking the items to the DB entries (my server) the
valueEncoder translates the selected item to that item it actually
represents. (correct me if this is not true)


Yeah.


I thought that it is possible to add the optionModel to the appModule
somehow that it is static.


Your sentence above doesn't make any sense. Again, the only thing that  
goes to AppModule in this discussion is ValueEncoder. Please use the right  
names for things or otherwise no one will understand what you're saying.



If i am using non-static option models, each user will always

request the list(s), e.g:

ListColor colors = colorService.findAll(); //(taken from the example)


That's correct. On the other hand, the implementation of  
ColorService.findAll() may cache results if you think that's a good thing.


and the selectModelFactory will always have to create the selectModel  
from scratch:

// create a SelectModel from my list of colors (taken from the example)
colorSelectModel = selectModelFactory.create(colors, name);


Yep. SelectModel is a throw-away object. And nothing prevents you to cache  
this object. A good way of doing that would be you to create something  
like ColorSelectModelFactory to encapsulate this logic and maybe cache  
SelectModels.



the point is, that my - options for the optionModel are dynamic, but only
slowly increasing/changing and for that reason i thought that there  
may be a more efficient way to populate the optionModel


You're saying OptionModel instead of SelectModel again. :(

The whole point here is that *you* know how *your* data changes, so *you*  
need to write code that adequately deals with it. Just follow my  
suggestion above: create a service that returns SelectModels for Color and  
put all logic there. Your problem is too specific for Tapestry to provide  
a generic solution.


in a way globally and that this global available option model has to  
be updated time by time for staying accurate.


You're saying OptionModel instead of SelectModel again. :(

Your data isn't static, so your SelectModel isn't static. You have to live  
with that. Or, if you know the dynamics of your data, write code that  
deals with it.


--
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: Tapestry 5.3 makes it impossible to load symbols from DB (TAP5-1823)

2013-02-08 Thread derkoe
Lance Java wrote
 As suggested in the Jira, your SettingsService could @Inject ObjectLocator
 instead of the hibernate session. It could then lazily call
 ObjectLocator.getService(Session.class) to get the hibernate session.

This doesn't work since a method is invoked on the SettingsService in the
contribution and the exception is thrown when realizing the service.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-5-3-makes-it-impossible-to-load-symbols-from-DB-TAP5-1823-tp5719752p5719889.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: Dynamic OptionModel Implementation: How To?

2013-02-08 Thread Thiago H de Paula Figueiredo
On Fri, 08 Feb 2013 14:19:06 -0200, sommeralex  
alexander.som...@gmail.com wrote:


Thank you again for your answer. I guess my confusion with tapestry is  
that it does so many things (which I would never expect it to do but I  
am happy with) one the one hand.  On the other hand, other things - for  
sure - have to be implemented and cant be expected. Even to cache the  
selectModel.


That's not something you should expect. Tapestry, specifically, Select, is  
expected to just use the SelectModel you pass to it, nothing more than  
that. You know when stuff should be cached, not Tapestry.



And another reason / i hope you forgive / is just this, left to my chair:
http://www.learnclip.com/linda.jpg :-)


Cute! :D

--
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: Dynamic OptionModel Implementation: How To?

2013-02-08 Thread sommeralex
thx

Am 08.02.2013 um 18:05 schrieb Thiago H de Paula Figueiredo [via Tapestry] 
ml-node+s1045711n5719890...@n5.nabble.com:

 On Fri, 08 Feb 2013 14:19:06 -0200, sommeralex   
 [hidden email] wrote: 
 
  Thank you again for your answer. I guess my confusion with tapestry is   
  that it does so many things (which I would never expect it to do but I   
  am happy with) one the one hand.  On the other hand, other things - for   
  sure - have to be implemented and cant be expected. Even to cache the   
  selectModel. 
 
 That's not something you should expect. Tapestry, specifically, Select, is   
 expected to just use the SelectModel you pass to it, nothing more than   
 that. You know when stuff should be cached, not Tapestry. 
 
  And another reason / i hope you forgive / is just this, left to my chair: 
  http://www.learnclip.com/linda.jpg :-) 
 
 Cute! :D 
 
 -- 
 Thiago H. de Paula Figueiredo 
 
 - 
 To unsubscribe, e-mail: [hidden email] 
 For additional commands, e-mail: [hidden email] 
 
 
 
 If you reply to this email, your message will be added to the discussion 
 below:
 http://tapestry.1045711.n5.nabble.com/Dynamic-OptionModel-Implementation-How-To-tp5719875p5719890.html
 To unsubscribe from Dynamic OptionModel Implementation: How To?, click here.
 NAML




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Dynamic-OptionModel-Implementation-How-To-tp5719875p5719891.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: Tapestry 3.0.4 JDK 7 compatibility

2013-02-08 Thread Muhammad Gelbana
I suppose this question should be directed to Java developers, not
Tapestry's.
And It's really sad to see some entity not willing to upgrade to T5. It's a
whole another phase, you should REALLY keep on trying to convince your
manager to upgrade to T5.

On Fri, Feb 8, 2013 at 12:00 AM, Thiago H de Paula Figueiredo 
thiag...@gmail.com wrote:

 On Thu, 07 Feb 2013 18:03:21 -0200, Joe Casotti joecaso...@gmail.com
 wrote:

  Hello -


 Hi!


  I am about to begin infrastructure work on a legacy web application that
 runs Tapestry 3.0.4, to upgrade the Tomcat JDK from 1.6 to 1.7.

 I know that this version of Tapestry has long since retired, but can you
 tell me of any known incompatibilities between 3.0.4 and JDK 1.7?


 I guess not, as Sun/Oracle were always very careful with Java backward
 compatibility (besides a couple Swing hiccups). You can only be sure by
 trying.

 --
 Thiago H. de Paula Figueiredo

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




Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread George Ludwig
I've been running in circles trying to make Eclipse and Maven happy with
the dependencies, but I've had no luck.

My final play was to download Jumpstart 6.6.5 and run the build, then
upload tapestry5-jquery-3.3.4.jar and tapestry-bootstrap-2.1.3.jar to my
artifact repository.

I then ad those to my pom.xml, but when I run mvn:eclipse, it still
complains:
Project 'ui' is missing required library:
'/Users/George/.m2/repository/com/google/code/maven-play-plugin/com/yahoo/platform/yui/yuicompressor/2.4.7/yuicompressor-2.4.7.jar
'

I've read a thread about problems relating to yuicompressor, but I have no
idea what to do about it, or why the jumpstart project is seemingly able to
get away without it.

Any help is much appreciated!

-George


Re: Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread Chris Cureau
Tapestry-bootstrap needs tapestry 5.3.4.  I just cloned the
tapestry-bootstrap git repository and changed the dependency to 5.3.6.

If there's a better way, please let me know!
On Feb 8, 2013 8:12 PM, George Ludwig georgelud...@gmail.com wrote:

 I've been running in circles trying to make Eclipse and Maven happy with
 the dependencies, but I've had no luck.

 My final play was to download Jumpstart 6.6.5 and run the build, then
 upload tapestry5-jquery-3.3.4.jar and tapestry-bootstrap-2.1.3.jar to my
 artifact repository.

 I then ad those to my pom.xml, but when I run mvn:eclipse, it still
 complains:
 Project 'ui' is missing required library:

 '/Users/George/.m2/repository/com/google/code/maven-play-plugin/com/yahoo/platform/yui/yuicompressor/2.4.7/yuicompressor-2.4.7.jar
 '

 I've read a thread about problems relating to yuicompressor, but I have no
 idea what to do about it, or why the jumpstart project is seemingly able to
 get away without it.

 Any help is much appreciated!

 -George



Re: Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread Lenny Primak
This is really a maven question.
Just put an exclusion in your bootstrap dependency and then
add your own tapestry dependency.
This way you control what versions you get.

On Feb 8, 2013, at 9:12 PM, George Ludwig wrote:

 I've been running in circles trying to make Eclipse and Maven happy with
 the dependencies, but I've had no luck.
 
 My final play was to download Jumpstart 6.6.5 and run the build, then
 upload tapestry5-jquery-3.3.4.jar and tapestry-bootstrap-2.1.3.jar to my
 artifact repository.
 
 I then ad those to my pom.xml, but when I run mvn:eclipse, it still
 complains:
 Project 'ui' is missing required library:
 '/Users/George/.m2/repository/com/google/code/maven-play-plugin/com/yahoo/platform/yui/yuicompressor/2.4.7/yuicompressor-2.4.7.jar
 '
 
 I've read a thread about problems relating to yuicompressor, but I have no
 idea what to do about it, or why the jumpstart project is seemingly able to
 get away without it.
 
 Any help is much appreciated!
 
 -George


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



Re: Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread George Ludwig
@Chris: I tried downgrading to tapestry 5.3.4, and it made no apparent
difference.

Also, the maven error tells me that the missing dependency is
bootstrap-2.1.3-tapestry-yuicompressor-5.3.4-...yahoo.platform.yuicompressor-2.4.7

Looking at jumpstart 6.6.5, it is happily using tapestry 5.3.6, I don't see
either tapestry-yuicompressor-5.3.4 or
...yahoo.platform.yuicompressor-2.4.7 in the classpath..I can only wonder
how this is possible.



On Fri, Feb 8, 2013 at 7:01 PM, Lenny Primak lpri...@hope.nyc.ny.us wrote:

 This is really a maven question.
 Just put an exclusion in your bootstrap dependency and then
 add your own tapestry dependency.
 This way you control what versions you get.

 On Feb 8, 2013, at 9:12 PM, George Ludwig wrote:

  I've been running in circles trying to make Eclipse and Maven happy with
  the dependencies, but I've had no luck.
 
  My final play was to download Jumpstart 6.6.5 and run the build, then
  upload tapestry5-jquery-3.3.4.jar and tapestry-bootstrap-2.1.3.jar to my
  artifact repository.
 
  I then ad those to my pom.xml, but when I run mvn:eclipse, it still
  complains:
  Project 'ui' is missing required library:
 
 '/Users/George/.m2/repository/com/google/code/maven-play-plugin/com/yahoo/platform/yui/yuicompressor/2.4.7/yuicompressor-2.4.7.jar
  '
 
  I've read a thread about problems relating to yuicompressor, but I have
 no
  idea what to do about it, or why the jumpstart project is seemingly able
 to
  get away without it.
 
  Any help is much appreciated!
 
  -George


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




Re: Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread Lenny Primak
Maven exclusion is the key thing.  Use Google for more details.

On Feb 8, 2013, at 10:19 PM, George Ludwig wrote:

 @Chris: I tried downgrading to tapestry 5.3.4, and it made no apparent
 difference.
 
 Also, the maven error tells me that the missing dependency is
 bootstrap-2.1.3-tapestry-yuicompressor-5.3.4-...yahoo.platform.yuicompressor-2.4.7
 
 Looking at jumpstart 6.6.5, it is happily using tapestry 5.3.6, I don't see
 either tapestry-yuicompressor-5.3.4 or
 ...yahoo.platform.yuicompressor-2.4.7 in the classpath..I can only wonder
 how this is possible.
 
 
 
 On Fri, Feb 8, 2013 at 7:01 PM, Lenny Primak lpri...@hope.nyc.ny.us wrote:
 
 This is really a maven question.
 Just put an exclusion in your bootstrap dependency and then
 add your own tapestry dependency.
 This way you control what versions you get.
 
 On Feb 8, 2013, at 9:12 PM, George Ludwig wrote:
 
 I've been running in circles trying to make Eclipse and Maven happy with
 the dependencies, but I've had no luck.
 
 My final play was to download Jumpstart 6.6.5 and run the build, then
 upload tapestry5-jquery-3.3.4.jar and tapestry-bootstrap-2.1.3.jar to my
 artifact repository.
 
 I then ad those to my pom.xml, but when I run mvn:eclipse, it still
 complains:
 Project 'ui' is missing required library:
 
 '/Users/George/.m2/repository/com/google/code/maven-play-plugin/com/yahoo/platform/yui/yuicompressor/2.4.7/yuicompressor-2.4.7.jar
 '
 
 I've read a thread about problems relating to yuicompressor, but I have
 no
 idea what to do about it, or why the jumpstart project is seemingly able
 to
 get away without it.
 
 Any help is much appreciated!
 
 -George
 
 
 -
 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: Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread George Ludwig
@Lenny: I get the maven exclusion, but what exactly should I exclude? Is it
safe to exclude tapestry-yuicompressor on version 5.3.6?


On Fri, Feb 8, 2013 at 7:21 PM, Lenny Primak lpri...@hope.nyc.ny.us wrote:

 Maven exclusion is the key thing.  Use Google for more details.

 On Feb 8, 2013, at 10:19 PM, George Ludwig wrote:

  @Chris: I tried downgrading to tapestry 5.3.4, and it made no apparent
  difference.
 
  Also, the maven error tells me that the missing dependency is
 
 bootstrap-2.1.3-tapestry-yuicompressor-5.3.4-...yahoo.platform.yuicompressor-2.4.7
 
  Looking at jumpstart 6.6.5, it is happily using tapestry 5.3.6, I don't
 see
  either tapestry-yuicompressor-5.3.4 or
  ...yahoo.platform.yuicompressor-2.4.7 in the classpath..I can only wonder
  how this is possible.
 
 
 
  On Fri, Feb 8, 2013 at 7:01 PM, Lenny Primak lpri...@hope.nyc.ny.us
 wrote:
 
  This is really a maven question.
  Just put an exclusion in your bootstrap dependency and then
  add your own tapestry dependency.
  This way you control what versions you get.
 
  On Feb 8, 2013, at 9:12 PM, George Ludwig wrote:
 
  I've been running in circles trying to make Eclipse and Maven happy
 with
  the dependencies, but I've had no luck.
 
  My final play was to download Jumpstart 6.6.5 and run the build, then
  upload tapestry5-jquery-3.3.4.jar and tapestry-bootstrap-2.1.3.jar to
 my
  artifact repository.
 
  I then ad those to my pom.xml, but when I run mvn:eclipse, it still
  complains:
  Project 'ui' is missing required library:
 
 
 '/Users/George/.m2/repository/com/google/code/maven-play-plugin/com/yahoo/platform/yui/yuicompressor/2.4.7/yuicompressor-2.4.7.jar
  '
 
  I've read a thread about problems relating to yuicompressor, but I have
  no
  idea what to do about it, or why the jumpstart project is seemingly
 able
  to
  get away without it.
 
  Any help is much appreciated!
 
  -George
 
 
  -
  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: Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread George Ludwig
@Lenny: I excluded tapestry-yuicompressor, and maven is happy, but I can't
help but wonder if something is actually going to need that compressor!


On Fri, Feb 8, 2013 at 7:25 PM, Lenny Primak lpri...@hope.nyc.ny.us wrote:

 Yes. Exactly right.  Find out what includes it via mvn dependency:tree and
 add exclusions for every one of them.

 On Feb 8, 2013, at 10:23 PM, George Ludwig georgelud...@gmail.com wrote:

  @Lenny: I get the maven exclusion, but what exactly should I exclude? Is
 it
  safe to exclude tapestry-yuicompressor on version 5.3.6?
 
 
  On Fri, Feb 8, 2013 at 7:21 PM, Lenny Primak lpri...@hope.nyc.ny.us
 wrote:
 
  Maven exclusion is the key thing.  Use Google for more details.
 
  On Feb 8, 2013, at 10:19 PM, George Ludwig wrote:
 
  @Chris: I tried downgrading to tapestry 5.3.4, and it made no apparent
  difference.
 
  Also, the maven error tells me that the missing dependency is
 
 bootstrap-2.1.3-tapestry-yuicompressor-5.3.4-...yahoo.platform.yuicompressor-2.4.7
 
  Looking at jumpstart 6.6.5, it is happily using tapestry 5.3.6, I don't
  see
  either tapestry-yuicompressor-5.3.4 or
  ...yahoo.platform.yuicompressor-2.4.7 in the classpath..I can only
 wonder
  how this is possible.
 
 
 
  On Fri, Feb 8, 2013 at 7:01 PM, Lenny Primak lpri...@hope.nyc.ny.us
  wrote:
 
  This is really a maven question.
  Just put an exclusion in your bootstrap dependency and then
  add your own tapestry dependency.
  This way you control what versions you get.
 
  On Feb 8, 2013, at 9:12 PM, George Ludwig wrote:
 
  I've been running in circles trying to make Eclipse and Maven happy
  with
  the dependencies, but I've had no luck.
 
  My final play was to download Jumpstart 6.6.5 and run the build, then
  upload tapestry5-jquery-3.3.4.jar and tapestry-bootstrap-2.1.3.jar to
  my
  artifact repository.
 
  I then ad those to my pom.xml, but when I run mvn:eclipse, it still
  complains:
  Project 'ui' is missing required library:
 
 '/Users/George/.m2/repository/com/google/code/maven-play-plugin/com/yahoo/platform/yui/yuicompressor/2.4.7/yuicompressor-2.4.7.jar
  '
 
  I've read a thread about problems relating to yuicompressor, but I
 have
  no
  idea what to do about it, or why the jumpstart project is seemingly
  able
  to
  get away without it.
 
  Any help is much appreciated!
 
  -George
 
 
  -
  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: Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread Lenny Primak
It's optional. If you aren't using it and its causing you problems don't worry 
about it. there are tons of issues with it. You can google past discussions 
about how to make it work if you really need of. I suspect you don't. 

On Feb 8, 2013, at 10:27 PM, George Ludwig georgelud...@gmail.com wrote:

 @Lenny: I excluded tapestry-yuicompressor, and maven is happy, but I can't
 help but wonder if something is actually going to need that compressor!
 
 
 On Fri, Feb 8, 2013 at 7:25 PM, Lenny Primak lpri...@hope.nyc.ny.us wrote:
 
 Yes. Exactly right.  Find out what includes it via mvn dependency:tree and
 add exclusions for every one of them.
 
 On Feb 8, 2013, at 10:23 PM, George Ludwig georgelud...@gmail.com wrote:
 
 @Lenny: I get the maven exclusion, but what exactly should I exclude? Is
 it
 safe to exclude tapestry-yuicompressor on version 5.3.6?
 
 
 On Fri, Feb 8, 2013 at 7:21 PM, Lenny Primak lpri...@hope.nyc.ny.us
 wrote:
 
 Maven exclusion is the key thing.  Use Google for more details.
 
 On Feb 8, 2013, at 10:19 PM, George Ludwig wrote:
 
 @Chris: I tried downgrading to tapestry 5.3.4, and it made no apparent
 difference.
 
 Also, the maven error tells me that the missing dependency is
 bootstrap-2.1.3-tapestry-yuicompressor-5.3.4-...yahoo.platform.yuicompressor-2.4.7
 
 Looking at jumpstart 6.6.5, it is happily using tapestry 5.3.6, I don't
 see
 either tapestry-yuicompressor-5.3.4 or
 ...yahoo.platform.yuicompressor-2.4.7 in the classpath..I can only
 wonder
 how this is possible.
 
 
 
 On Fri, Feb 8, 2013 at 7:01 PM, Lenny Primak lpri...@hope.nyc.ny.us
 wrote:
 
 This is really a maven question.
 Just put an exclusion in your bootstrap dependency and then
 add your own tapestry dependency.
 This way you control what versions you get.
 
 On Feb 8, 2013, at 9:12 PM, George Ludwig wrote:
 
 I've been running in circles trying to make Eclipse and Maven happy
 with
 the dependencies, but I've had no luck.
 
 My final play was to download Jumpstart 6.6.5 and run the build, then
 upload tapestry5-jquery-3.3.4.jar and tapestry-bootstrap-2.1.3.jar to
 my
 artifact repository.
 
 I then ad those to my pom.xml, but when I run mvn:eclipse, it still
 complains:
 Project 'ui' is missing required library:
 '/Users/George/.m2/repository/com/google/code/maven-play-plugin/com/yahoo/platform/yui/yuicompressor/2.4.7/yuicompressor-2.4.7.jar
 '
 
 I've read a thread about problems relating to yuicompressor, but I
 have
 no
 idea what to do about it, or why the jumpstart project is seemingly
 able
 to
 get away without it.
 
 Any help is much appreciated!
 
 -George
 
 
 -
 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: Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread George Ludwig
@Lenny: so running my app with the bootstrap stuff in it, the first thing I
notice is that none of my onProgressiveDisplay events are getting
triggered, and I have no idea if this is related to the yuicompressor, or
if it's something else.

That's what I hate about workaround...the throw way to much entropy in to
the solution  matrix.


On Fri, Feb 8, 2013 at 7:33 PM, Lenny Primak lpri...@hope.nyc.ny.us wrote:

 It's optional. If you aren't using it and its causing you problems don't
 worry about it. there are tons of issues with it. You can google past
 discussions about how to make it work if you really need of. I suspect you
 don't.

 On Feb 8, 2013, at 10:27 PM, George Ludwig georgelud...@gmail.com wrote:

  @Lenny: I excluded tapestry-yuicompressor, and maven is happy, but I
 can't
  help but wonder if something is actually going to need that compressor!
 
 
  On Fri, Feb 8, 2013 at 7:25 PM, Lenny Primak lpri...@hope.nyc.ny.us
 wrote:
 
  Yes. Exactly right.  Find out what includes it via mvn dependency:tree
 and
  add exclusions for every one of them.
 
  On Feb 8, 2013, at 10:23 PM, George Ludwig georgelud...@gmail.com
 wrote:
 
  @Lenny: I get the maven exclusion, but what exactly should I exclude?
 Is
  it
  safe to exclude tapestry-yuicompressor on version 5.3.6?
 
 
  On Fri, Feb 8, 2013 at 7:21 PM, Lenny Primak lpri...@hope.nyc.ny.us
  wrote:
 
  Maven exclusion is the key thing.  Use Google for more details.
 
  On Feb 8, 2013, at 10:19 PM, George Ludwig wrote:
 
  @Chris: I tried downgrading to tapestry 5.3.4, and it made no
 apparent
  difference.
 
  Also, the maven error tells me that the missing dependency is
 
 bootstrap-2.1.3-tapestry-yuicompressor-5.3.4-...yahoo.platform.yuicompressor-2.4.7
 
  Looking at jumpstart 6.6.5, it is happily using tapestry 5.3.6, I
 don't
  see
  either tapestry-yuicompressor-5.3.4 or
  ...yahoo.platform.yuicompressor-2.4.7 in the classpath..I can only
  wonder
  how this is possible.
 
 
 
  On Fri, Feb 8, 2013 at 7:01 PM, Lenny Primak lpri...@hope.nyc.ny.us
 
  wrote:
 
  This is really a maven question.
  Just put an exclusion in your bootstrap dependency and then
  add your own tapestry dependency.
  This way you control what versions you get.
 
  On Feb 8, 2013, at 9:12 PM, George Ludwig wrote:
 
  I've been running in circles trying to make Eclipse and Maven happy
  with
  the dependencies, but I've had no luck.
 
  My final play was to download Jumpstart 6.6.5 and run the build,
 then
  upload tapestry5-jquery-3.3.4.jar and tapestry-bootstrap-2.1.3.jar
 to
  my
  artifact repository.
 
  I then ad those to my pom.xml, but when I run mvn:eclipse, it still
  complains:
  Project 'ui' is missing required library:
 
 '/Users/George/.m2/repository/com/google/code/maven-play-plugin/com/yahoo/platform/yui/yuicompressor/2.4.7/yuicompressor-2.4.7.jar
  '
 
  I've read a thread about problems relating to yuicompressor, but I
  have
  no
  idea what to do about it, or why the jumpstart project is seemingly
  able
  to
  get away without it.
 
  Any help is much appreciated!
 
  -George
 
 
 
 -
  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