Re: trying to avoid code bloat

2013-05-20 Thread Peter Stavrinides
stick them in the base package, extend the class and it works great 

- Original Message -

From: "Barry Books"  
To: "Tapestry users"  
Sent: Monday, 20 May, 2013 2:31:18 PM 
Subject: Re: trying to avoid code bloat 

I would not use an Abstract page for this purpose. The first problem is 
protected will not work because the pages will not have the same package. I 
would create a service with these services and just inject that. So your 
page would just have 

@Inject 
private Services services; 

and your service will have a constructer and get methods: 

class Services(Service1 service1, ...) { 
this.service1 = service1; 
} 

public Service1 getService1() { 
return service1; 
} 




On Sun, May 19, 2013 at 9:59 PM, Ken in Nashua  wrote: 

> Hi Folks, 
> 
> Can i construct an abstract page and inject a bunch of services and then 
> have derived instances extend from that ? 
> 
> I tried it and seeing some weird class format errors. 
> 
> I did it with my model entities. 
> 
> trying to do it with pages and injectables. 
> 
> public abstract class AbstractPage implements 
> org.tynamo.examples.pphl.pages.interfaces.IAbstractPage, ExceptionReporter { 
> 
> /** 
> * services and injectables 
> */ 
> @Inject 
> protected Logger logger; 
> 
> @Inject 
> protected DescriptorService descriptorService; 
> 
> @Inject 
> protected HibernatePersistenceService hibernatePersistenceService; 
> 
> @Inject 
> protected Messages messages; 
> 
> @Inject 
> protected PropertyAccess adapter; 
> 
> @Inject 
> protected ValueEncoderSource valueEncoderSource; 
> 
> @Inject 
> protected ComponentDefaultProvider cdp; 
> 
> @Inject 
> protected ComponentResources resources; 
> 
> @Inject 
> protected ApplicationStateManager applicationStateManager; 
> 
> @Inject 
> protected PersistenceService persistenceService; 
> 
> @Inject 
> protected SecurityService securityService; 
> 
> 



Re: How do you feel about requiring JRE 1.6 for Tapestry 5.4?

2012-05-02 Thread Peter Stavrinides
+ 1 

- Original Message -

From: "Dimitris Zenios"  
To: "Tapestry users"  
Sent: Wednesday, 2 May, 2012 10:32:14 AM 
Subject: Re: How do you feel about requiring JRE 1.6 for Tapestry 5.4? 

+1 from me also 

On Wed, May 2, 2012 at 10:25 AM, Markus Grell  wrote: 
> With Java 6 released end of 2006, I can't see any point in supporting an 
> older release for a new Tapestry version. 
> 
> Markus 
> 
>> When in doubt, let's ask the community: would you object to requiring 
>> JRE 1.6 for running Tapestry 5.4? So far, T5 has run on JRE 1.5 but 
>> the time for requiring 1.6 will come at some point. Not necessarily yet - 
>> we can likely work around this - but current Hibernate 4.x releases are 
>> built with 1.6. 
>> 
>> Kalle 
>> 
>> 
>> - 
>> 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: [5.3] JSONArray Error while submitting forms

2012-02-05 Thread Peter Stavrinides
Thanks Michael, much appreciated, as I would never have guessed that! I will 
give it a try.


Peter

- Original Message -

From: "Michael Gentry" 
To: "Tapestry users" 
Sent: Friday, 3 February, 2012 6:31:49 PM
Subject: Re: [5.3] JSONArray Error while submitting forms

Hi Peter,

When you upgrade your T5 version (say, 5.3.1 to 5.3.2), you need to
update your application version, too, because T5 includes your
application version in the asset path, but does NOT include the T5
version, which can lead to confusion.

If your AppModule.java has:

public static void
contributeApplicationDefaults(MappedConfiguration
configuration)
{
...
configuration.add(SymbolConstants.APPLICATION_VERSION, "1.2-SNAPSHOT");
...
}

Change it to be "1.2.1-SNAPSHOT" or "1.3-SNAPSHOT" and your asset
paths should change and the browser should fetch a fresh copy.

mrg


On Fri, Feb 3, 2012 at 9:22 AM, Peter Stavrinides
 wrote:
> We are seeing this error too in production, not sure how to solve it though, 
> clearing the cache is only a solution in development.
>
>
> Cheers,
> Peter
>
> - Original Message -
>
> From: "Muhammad Gelbana" 
> To: "Tapestry users" 
> Sent: Tuesday, 10 January, 2012 9:11:23 PM
> Subject: Re: [5.3] JSONArray Error while submitting forms
>
> When I had this problem, clearing the cache didn't solve it. I had move all
> my classes\tml\resources manually from my old tapestry project to a new
> tapestry 5.3.1 skeleton project.
>
> On Tue, Jan 10, 2012 at 5:32 PM, Lenny Primak wrote:
>
>> I think clearing the cache is not the full answer to this problem.
>> There aught to be a better answer. Perhaps versioning the formdata element?
>>
>>
>> On Jan 10, 2012, at 10:13 AM, Gunnar Eketrapp 
>> wrote:
>>
>> > I have already answered to this.
>> >
>> > The clearing of the cache seems to have solved my problem as well.
>> >
>> > 2012/1/10 Muhammad Gelbana 
>> >
>> >> Shouldn't Gunnar decide first if the issue should be closed or not ? 
>> >>
>> >> On Tue, Jan 10, 2012 at 12:08 AM, Bob Harner 
>> wrote:
>> >>
>> >>> Is anyone still seeing this problem after clearing the browser cache?
>> >>> If not, we'll be able to close TAP5-1777.
>> >>>
>> >>> On Mon, Jan 9, 2012 at 9:52 AM, Michael Gentry 
>> >>> wrote:
>> >>>> Hi Josh (and others),
>> >>>>
>> >>>> I was using Chrome and then tried my app in Safari and it worked in
>> >>>> Safari. I then cleared my Chrome cache and it started working in
>> >>>> Chrome, too. I suspect some JS was being cached somewhere that was 
>> >>>> making things incompatible. Hope that helps others, too.
>> >>>>
>> >>>> Thanks,
>> >>>>
>> >>>> mrg
>> >>>>
>> >>>>
>> >>>> On Mon, Jan 9, 2012 at 9:34 AM, Michael Gentry > >
>> >>> wrote:
>> >>>>> Hi Josh,
>> >>>>>
>> >>>>> Better late than never? :-)
>> >>>>>
>> >>>>> Here is with 5.3.1, which still didn't help:
>> >>>>>
>> >>>>>
>> >>>
>> >>
>> t:formdata:H4sIAJ2RvUsDMRjG3x4ofkAHncTFoWO5q6IguggiKpRSPCe39C6eKbkkJu
>> >>>>> 1dw5OgrOj/4OTH DUwbH/i4vOgrlWKOU61E5JHt43z4/nefqEua4L1UsVEO
>> >>>>>
>> >>>
>> >>
>> Is4i1GGeY7eVCl90QHXKSyQTddhIrlIpE1Gg4kDpyiSLBFXWRKGpQZztuIDXlrGXPWElBBRr3hIUhFZWmlgE1xk9aMTOGSXFxv7Garr/PO1Cqw3IgBWrJGySmCCv1NukQjxMReT5qJqL9VCEs5QDnsmkBJgLT0d0668zVJGQy0jJRFnh3WuCzfOs436r4FBP1UOtVX8rfHwXQa7iF0gBsZDQD2PYMYJv9tN9/9n96DkA62bRQn8mjR0FT/E99g8KwWN
>> >>>>>
>> >>>
>> >>
>> j/7X29np36IBTh4WAMzt9Gg4isSlRTmMrjKc0BGhYgLFHdwtq09IrTTtMJsbkvy4ilIdy808uCL9fOuk83QIAAA==
>> >>>>> t:submit:submitNext
>> >>>>> jumpToPage:
>> >>>>> radiogroup:USM
>> >>>>> submitNext:Continue >
>> >>>>> Response Headersview source
>> >>>>>
>> >>>>> The t:form is defined as:
>> >>>>>
>> >>>>> 
>> >>>>>
>> >>>>> The t:submit is defined as:
>> >>>>>
>> >>>>> > >>>>> value="Continue >" tabindex="100" />
>> &

Re: [5.3] JSONArray Error while submitting forms

2012-02-03 Thread Peter Stavrinides
We are seeing this error too in production, not sure how to solve it though, 
clearing the cache is only a solution in development.


Cheers,
Peter

- Original Message -

From: "Muhammad Gelbana" 
To: "Tapestry users" 
Sent: Tuesday, 10 January, 2012 9:11:23 PM
Subject: Re: [5.3] JSONArray Error while submitting forms

When I had this problem, clearing the cache didn't solve it. I had move all
my classes\tml\resources manually from my old tapestry project to a new
tapestry 5.3.1 skeleton project.

On Tue, Jan 10, 2012 at 5:32 PM, Lenny Primak wrote:

> I think clearing the cache is not the full answer to this problem.
> There aught to be a better answer. Perhaps versioning the formdata element?
>
>
> On Jan 10, 2012, at 10:13 AM, Gunnar Eketrapp 
> wrote:
>
> > I have already answered to this.
> >
> > The clearing of the cache seems to have solved my problem as well.
> >
> > 2012/1/10 Muhammad Gelbana 
> >
> >> Shouldn't Gunnar decide first if the issue should be closed or not ?
> >>
> >> On Tue, Jan 10, 2012 at 12:08 AM, Bob Harner 
> wrote:
> >>
> >>> Is anyone still seeing this problem after clearing the browser cache?
> >>> If not, we'll be able to close TAP5-1777.
> >>>
> >>> On Mon, Jan 9, 2012 at 9:52 AM, Michael Gentry 
> >>> wrote:
>  Hi Josh (and others),
> 
>  I was using Chrome and then tried my app in Safari and it worked in 
>  Safari. I then cleared my Chrome cache and it started working in
>  Chrome, too. I suspect some JS was being cached somewhere that was
>  making things incompatible. Hope that helps others, too.
> 
>  Thanks,
> 
>  mrg
> 
> 
>  On Mon, Jan 9, 2012 at 9:34 AM, Michael Gentry  >
> >>> wrote:
> > Hi Josh,
> >
> > Better late than never? :-)
> >
> > Here is with 5.3.1, which still didn't help:
> >
> >
> >>>
> >>
> t:formdata:H4sIAJ2RvUsDMRjG3x4ofkAHncTFoWO5q6IguggiKpRSPCe39C6eKbkkJu
> > 1dw5OgrOj/4OTH DUwbH/i4vOgrlWKOU61E5JHt43z4/nefqEua4L1UsVEO
> >
> >>>
> >>
> Is4i1GGeY7eVCl90QHXKSyQTddhIrlIpE1Gg4kDpyiSLBFXWRKGpQZztuIDXlrGXPWElBBRr3hIUhFZWmlgE1xk9aMTOGSXFxv7Garr/PO1Cqw3IgBWrJGySmCCv1NukQjxMReT5qJqL9VCEs5QDnsmkBJgLT0d0668zVJGQy0jJRFnh3WuCzfOs436r4FBP1UOtVX8rfHwXQa7iF0gBsZDQD2PYMYJv9tN9/9n96DkA62bRQn8mjR0FT/E99g8KwWN
> >
> >>>
> >>
> j/7X29np36IBTh4WAMzt9Gg4isSlRTmMrjKc0BGhYgLFHdwtq09IrTTtMJsbkvy4ilIdy808uCL9fOuk83QIAAA==
> > t:submit:submitNext
> > jumpToPage:
> > radiogroup:USM
> > submitNext:Continue >
> > Response Headersview source
> >
> > The t:form is defined as:
> >
> > 
> >
> > The t:submit is defined as:
> >
> >  > value="Continue >" tabindex="100" />
> >
> > Thanks,
> >
> > mrg
> >
> >
> > On Wed, Dec 7, 2011 at 5:31 PM, Josh Canfield <
> joshcanfi...@gmail.com
> >>>
> >>> wrote:
> >> A copy of the request would be helpful. It seems like in the first
> >> report the "t:submit" parameter was coming back as a quoted string,
> >> but later reports seem to have it fixed by checking if it's empty.
> >>
> >> On Wed, Dec 7, 2011 at 1:58 PM, Gunnar Eketrapp
> >>  wrote:
> >>> I have no idea! For sure there must be something special with your
> >>> case, my
> >>> case and Seamus case.
> >>>
> >>> Or perhaps we are the only one using form's :-)
> >>>
> >>> My browser is Chrome ...
> >>>
> >>> I have coded around the problem for now by using my own 5.3.1 as 
> >>> reported
> >>> above.
> >>>
> >>>
> >>> 2011/12/7 Muhammad Gelbana 
> >>>
>  But how come this issue isn't causing enough noise !!! We must
> have
>  something common in our code that is very unique !!!
>  I can't figure out what could be unique in my login page !!..2
> >> fields
>  form...1 submit button...1 event handling method !
> 
>  On Wed, Dec 7, 2011 at 9:24 PM, Gunnar Eketrapp
>  wrote:
> 
> > I just created an issue for this
> > https://issues.apache.org/jira/browse/TAP5-1777
> >
> > I would love to see a fix for this otherwise I must go into
> >>> production
>  with
> > my own brewed 5.3.1
> > or revert to 5.2.6.
> >
> > Thanks in advance,
> > Gunnar Eketrapp
> >
> > 2011/12/7 Muhammad Gelbana 
> >
> >> Facing the same issue !! I didn't expect that to happen and it
> >>> will
>  take
> >> sometime to revert back to 5.2.6 :(
> >>
> >> I cleared my browser's cache and made sure I'm using tapestry's
> >>> latest
> >> css\js...still having the same problem with a form that has
> >>> nothing to
>  do
> >> ajax !
> >>
> >> On Wed, Dec 7, 2011 at 8:36 AM, Gunnar Eketrapp
> >> wrote:
> >>
> >>> if (raw != null && *!raw.isEmpty() &&*
> >>> new *JSONArray(raw)*.getString(1).

Re: T5.3.1 using jQueryMobile

2012-01-26 Thread Peter Stavrinides

Hi,

I have also started a project using jQueryMobile and am utterly impressed with 
this little library. Integration with Tapestry was trivial, however I also ran 
into the same problem as François, jQueryMobile is heavily driven by ajax calls 
to open dialogues and slide btw pages and also for preloading of pages in the 
background; you really want these features if you are to use this library, but 
currently it won't play nice with Tapestry's AJAX infrastructure... I am 
thinking this will be less of an issue if Tapestry 5.4 does realize the promise 
of a JavaScript abstraction layer, but for the moment it looks like a dead end. 
If anyone has some ideas on how to workaround these issue, I am also prepared 
to invest some time to attempt a small compatibility layer / module for 
Tapestry.


Kind regards,
Peter











- Original Message -

From: "françois facon" 
To: "Tapestry users" 
Sent: Sunday, 15 January, 2012 11:56:42 PM
Subject: Re: T5.3.1 using jQueryMobile

Hi,

We did some test on https://github.com/got5/tapestry5-jquery-mobile.
but ajax form validation and the request for page rendering through
ajax don't make the use of internal page easy. for the moment our
small demo https://github.com/got5/techforum only use external page.

Any suggestion is welcome.



2012/1/15 angelochen :
> Hi,
>
> Anybody using T5 with jQueryMobile? it works quite well, now got this
> problem, is there an easier way to pass parameters between internal pages?
> two pages are all 'listview'.
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/T5-3-1-using-jQueryMobile-tp5146068p5146068.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: Managing the Tapestry 5.3 ApplicationStateManager SSO life-cycle

2011-12-19 Thread Peter Stavrinides
Hi Igor, 


Thanks very much for your response!! 


Just to clarify the behaviour, Tapestry's registry will always return a service 
even if it needs to reconstruct it, right? Is this why in our case the ASM 
returns a new service instance? 


If we were to use ApplicationStateContribution with an, appropriate 
ApplicationStateCreator this should make it behave better. I recall the no-args 
constructor was the reason why we looked for another way of doing this, will 
this work if we overload it providing more than one constructor ? 


I hope I am making sense. 


Thanks again, 
Peter 

- Original Message -

From: "Igor Drobiazko"  
To: "Tapestry users"  
Sent: Wednesday, 14 December, 2011 10:12:06 PM 
Subject: Re: Managing the Tapestry 5.3 ApplicationStateManager SSO life-cycle 

Tapestry creates your SSO using the 
constructor ReportComponentExpiringCache(ReportComponentCacheEntryFactory, 
long). Same autobuild logic is used as for services. Tapestry tries to 
resolve a service of long type which is the second argument of the 
constructor. You should either annotate a no-args constructor with @Inject 
or contribute a ApplicationStateContribution with an 
appropriate ApplicationStateCreator. 

On Wed, Dec 14, 2011 at 6:54 PM, Peter Stavrinides < 
p.stavrini...@albourne.com> wrote: 

> Hi everyone, 
> 
> We are using Tapestry 5.3; when writing some information directly into 
> Tapestry's ApplicationStateManager service and we have been experiencing an 
> odd runtime error which occurs after a time. 
> 
> The key we set in the ApplicationStateManager for our SSO's is a class 
> type and the data stored is an instance of the class. Before retrieving an 
> instance we check using exists() whether an instance already exists, and if 
> it does not, we create the instance and write it into the 
> ApplicationStateManager. The class instance shares an interface with an 
> actual service, but the instance cannot be instantiated through the IOC and 
> is a session specific override. 
> 
> We now find that occasionally the application state manager returns true 
> for exists(), but then tries to create the instance through the IoC. The 
> question is first of all why does the ApplicationStateManager attempt to 
> instantiate an instance after indicating that an instance already exists, 
> and secondly whether the fact that the instance implements the same 
> interface as a service is part of the cause. Another hint is that in the 
> stack trace (see below) there is a reference to the persistence strategy, 
> so it may be that the ApplicationStateManager was serialised in some way? 
> 
> Trace: java.lang.RuntimeException: Error invoking constructor 
> com.albourne.web.ioc.weakcache.ReportComponentExpiringCache(ReportComponentCacheEntryFactory,
>  
> long) (at ReportComponentExpiringCache.java:11) (for service 
> 'ApplicationStateManager'): No service implements the interface long. at 
> org.apache.tapestry5.ioc.internal.ConstructorServiceCreator$1.invoke(ConstructorServiceCreator.java:81)
>  
> at 
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65)
>  
> at 
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
>  
> at 
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1082) 
> at 
> org.apache.tapestry5.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:48)
>  
> at 
> org.apache.tapestry5.ioc.internal.ServiceResourcesImpl$4.invoke(ServiceResourcesImpl.java:160)
>  
> at 
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65)
>  
> at 
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
>  
> at 
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1082) 
> at 
> org.apache.tapestry5.ioc.internal.ServiceResourcesImpl.autobuild(ServiceResourcesImpl.java:146)
>  
> at 
> org.apache.tapestry5.internal.services.ApplicationStateManagerImpl$1.create(ApplicationStateManagerImpl.java:104)
>  
> at 
> org.apache.tapestry5.internal.services.SessionApplicationStatePersistenceStrategy.getOrCreate(SessionApplicationStatePersistenceStrategy.java:57)
>  
> at 
> org.apache.tapestry5.internal.services.SessionApplicationStatePersistenceStrategy.get(SessionApplicationStatePersistenceStrategy.java:44)
>  
> at $ApplicationStatePersistenceStrategy_15c119b4caf670.get(Unknown Source) 
> at 
> org.apache.tapestry5.internal.services.ApplicationStateManagerImpl$ApplicationStateAdapter.getOrCreate(ApplicationStateManagerImpl.java:50)
>  
> at 
> 
> Thanks for your help, 
> Peter 
> 



-- 
Best regards, 

Igor Drobiazko 
http://tapestry5.de 



Re: prototypejs is dead - time to bring t5-jquery in?

2011-12-16 Thread Peter Stavrinides
Hi All, 


The most important consideration in this debate imho is backwards 
compatibility. Some companies have tens of thousands of lines of Tapestry code, 
so are heavily invested. Whilst removing prototype is probably a good idea, 
Tapestry must maintain legacy support for prototype, at least as an optional 
inclusion going forward. Not doing so will alienate many, not a mistake worth 
repeating. 


This is why the 5.4 planned JavaScript abstraction layer is a great idea. 


regards, 
Peter 

- Original Message -

From: "Jose Luis Sanchez"  
To: "Tapestry users"  
Sent: Friday, 16 December, 2011 1:41:32 PM 
Subject: Re: prototypejs is dead - time to bring t5-jquery in? 

Just to add some more fire :) ,and think it's a nice idea. 

Found this , in here( grails 2.0.0 release ) 
http://grails.org/doc/latest/guide/gettingStarted.html#requirements 


jQuery Replaces Prototype 

The Protoype Javascript library has been removed from Grails core and 
now new Grails applications have the jQuery plugin configured by 
default. This will only impact you if you are using Prototype with the 
adaptive AJAX tags in your application, e.g.  etc, 
because those tags will break as soon as you upgrade. 

To resolve this issue, simply install thePrototype plugin 
in your application. You can also 
remove the prototype files from your|web-app/js/prototype|directory if 
you want. 



> 
> On Thu, 15 Dec 2011 15:17:35 -0200, trsvax  wrote: 
> 
>> I agree about having a prototype.jar and I don't view this as a backward 
>> compatibility problem. Dependencies change from version to version 
>> anyway. 
>> 
>> It would also make it easier to create something other than jQuery if 
>> needed. 
> 
> The original idea is to create a framework-agnostic JavaScript layer 
> to be used by Tapestry-provided JS code. It would be implemented in 
> Prototype and jQuery out-of-the-box and anyone could provide your own 
> implementation too. This way, there's no useless code in either option. 
> 


-- 
*Jose Luis Sanchez* 
Senior Developer 

*E-mail*: joseluis.sanc...@m-centric.com 
*Phone* : +34 91 277 03 16 
mCentric mobilising imagination 


c/ Jose Echegaray, 8 Building 3 
28230 Las Rozas (Madrid). SPAIN. 

This message may contain confidential information or privileged 
material, and is intended only for the individual(s) named. If you are 
not in the named addressee you should not disseminate, distribute or 
copy this e-mail. Please notify the sender immediately by e-mail if you 
have received this e-mail by mistake and delete this e-mail from your 
system E-mail transmission cannot be guaranteed to be secured or 
error-free as information could be intercepted, corrupted, lost, 
destroyed, arrive late or incomplete, or contain viruses. The sender 
therefore does not accept liability for any errors or omissions in the 
contents of this message which arise as a result of e-mail transmission. 
If verification is required please request a hard-copy version. 

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




Managing the Tapestry 5.3 ApplicationStateManager SSO life-cycle

2011-12-14 Thread Peter Stavrinides
Hi everyone,

We are using Tapestry 5.3; when writing some information directly into 
Tapestry's ApplicationStateManager service and we have been experiencing an odd 
runtime error which occurs after a time.

The key we set in the ApplicationStateManager for our SSO's is a class type and 
the data stored is an instance of the class. Before retrieving an instance we 
check using exists() whether an instance already exists, and if it does not, we 
create the instance and write it into the ApplicationStateManager. The class 
instance shares an interface with an actual service, but the instance cannot be 
instantiated through the IOC and is a session specific override.

We now find that occasionally the application state manager returns true for 
exists(), but then tries to create the instance through the IoC. The question 
is first of all why does the ApplicationStateManager attempt to instantiate an 
instance after indicating that an instance already exists, and secondly whether 
the fact that the instance implements the same interface as a service is part 
of the cause. Another hint is that in the stack trace (see below) there is a 
reference to the persistence strategy, so it may be that the 
ApplicationStateManager was serialised in some way?

Trace: java.lang.RuntimeException: Error invoking constructor 
com.albourne.web.ioc.weakcache.ReportComponentExpiringCache(ReportComponentCacheEntryFactory,
 long) (at ReportComponentExpiringCache.java:11) (for service 
'ApplicationStateManager'): No service implements the interface long. at 
org.apache.tapestry5.ioc.internal.ConstructorServiceCreator$1.invoke(ConstructorServiceCreator.java:81)
 at 
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65)
 at 
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
 at 
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1082) 
at 
org.apache.tapestry5.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:48)
 at 
org.apache.tapestry5.ioc.internal.ServiceResourcesImpl$4.invoke(ServiceResourcesImpl.java:160)
 at 
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65)
 at 
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
 at 
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1082) 
at 
org.apache.tapestry5.ioc.internal.ServiceResourcesImpl.autobuild(ServiceResourcesImpl.java:146)
 at 
org.apache.tapestry5.internal.services.ApplicationStateManagerImpl$1.create(ApplicationStateManagerImpl.java:104)
 at 
org.apache.tapestry5.internal.services.SessionApplicationStatePersistenceStrategy.getOrCreate(SessionApplicationStatePersistenceStrategy.java:57)
 at 
org.apache.tapestry5.internal.services.SessionApplicationStatePersistenceStrategy.get(SessionApplicationStatePersistenceStrategy.java:44)
 at $ApplicationStatePersistenceStrategy_15c119b4caf670.get(Unknown Source) at 
org.apache.tapestry5.internal.services.ApplicationStateManagerImpl$ApplicationStateAdapter.getOrCreate(ApplicationStateManagerImpl.java:50)
 at

Thanks for your help,
Peter


Re: smarter css

2011-12-05 Thread Peter Stavrinides
Hi Chris, 


> So when it comes to css3 is it really so ugly? 
If you really want an answer to that, unfortunately yes... and no its not just 
gradients. 


> So say I was trying to add browser specific css to my layout component what 
> would people suggest as the best strategy? 
Browser detection is pretty awful, as its a moving target and not perfectly 
accurate, but granted in some cases a necessary evil... avoid it if you can. 
Its not uncommon to simply specify all the styles for the various browsers 
because those that are not understood will simply be ignored... be sure though 
that they are not understood or you might encounter a nasty surprise or two. In 
your example there should be no need for detection. 


Cheers, 
Peter 







- Original Message -

From: "Chris Collins"  
To: "Tapestry users"  
Sent: Tuesday, 6 December, 2011 7:48:57 AM 
Subject: smarter css 

So when it comes to css3 is it really so ugly? Ok perhaps its just things like 
gradients: 

http://ie.microsoft.com/testdrive/graphics/cssgradientbackgroundmaker/default.html
 

So in the microsoft example above for getting a gradient background you have to 
use different css properties per browser. So say I was trying to add browser 
specific css to my layout component what would people suggest as the best 
strategy? 

Random thoughts: 

- You can't tml-ify css, if you could then you could condition parts of it by 
browser right? 
- Would you create a series of browser specific css assets then build inject 
them directly into the layout page? 

Clearly I don't have a clue :-} 

again sorry for dumb questions. 

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




Re: Tapestry 5 JQuery - redirect to other page when session has expired

2011-12-01 Thread Peter Stavrinides
Sorry my trigger finger sent it before I finished typing:

//Server side I do this
JSONObject json = new JSONObject();
json.put("redirect", getRefreshLink().toAbsoluteURI());
return json

client side this:
// The method that is called when the request completes
onComplete : function(transport) {
...
var redirect = (reply.redirect != undefined);
if(redirect)
location.href=reply.redirect;
}

You can configure this any way you chose, page or via a dispatcher, basically 
anywhere you have a request object. Only thing is you will need to bind the 
handler for the js.

Cheers,
Peter



- Original Message -

From: "Peter Stavrinides" 
To: "Tapestry users" 
Sent: Thursday, 1 December, 2011 3:44:56 PM
Subject: Re: Tapestry 5 JQuery - redirect to other page when session has expired


Server side:

// The method that is called when the request completes
onComplete : function(transport) {
...
var redirect = (reply.redirect != undefined);
if(redirect)
location.href=reply.redirect;
}
- Original Message -

From: "François Facon" 
To: "Tapestry users" 
Sent: Thursday, 1 December, 2011 3:06:38 PM
Subject: Re: Tapestry 5 JQuery - redirect to other page when session has expired

Hi Ville,

Did you try to use Tynamo-security or to contribute your own access
control dispatcher

AppModule.java
.
.
.
public void contributeMasterDispatcher(
OrderedConfiguration configuration,
@InjectService("AccessControlDispatcher") Dispatcher
accessController)
{
configuration.add("AccessControlDispatcher",
accessController,
"before:ComponentEvent");
}

... and just have:

.
.
.
if (request.isXHR()) {
boolean noSession = (request.getSession(false)) ==
null ? true : false;
if (noSession){
OutputStream os =
response.getOutputStream("application/json;charset=UTF-8");

os.write("{\"script\":\"window.location.reload();\"}".getBytes());
os.flush();
return true;
}

as suggested in
http://tapestry.1045711.n5.nabble.com/redirecting-from-an-ajax-event-listener-td2438259.html

François

2011/12/1 Ville :
> Hi,
>
> I googled around a bit, and have some thoughts how this could be done, but
> what are the options? We're using Tap5-JQuery library.
>
> The workaround I have currently in mind involves adding filter to serverside
> that catches redirects to login page and if request is xhr then a json
> response is generated instead. This involves wrapping the response etc.
>
> I also have to intercept the call in browser side to have it working
> correctly.
>
> Is this the best way to do it?
>
> - Ville
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Tapestry-5-JQuery-redirect-to-other-page-when-session-has-expired-tp5038408p5038408.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 5 JQuery - redirect to other page when session has expired

2011-12-01 Thread Peter Stavrinides
Server side:

// The method that is called when the request completes
onComplete : function(transport) {
...
var redirect = (reply.redirect != undefined);
if(redirect)
location.href=reply.redirect;
}
- Original Message -

From: "François Facon" 
To: "Tapestry users" 
Sent: Thursday, 1 December, 2011 3:06:38 PM
Subject: Re: Tapestry 5 JQuery - redirect to other page when session has expired

Hi Ville,

Did you try to use Tynamo-security or to contribute your own access
control dispatcher

AppModule.java
.
.
.
public void contributeMasterDispatcher(
OrderedConfiguration configuration,
@InjectService("AccessControlDispatcher") Dispatcher
accessController)
{
configuration.add("AccessControlDispatcher",
accessController,
"before:ComponentEvent");
}

... and just have:

.
.
.
if (request.isXHR()) {
boolean noSession = (request.getSession(false)) ==
null ? true : false;
if (noSession){
OutputStream os =
response.getOutputStream("application/json;charset=UTF-8");

os.write("{\"script\":\"window.location.reload();\"}".getBytes());
os.flush();
return true;
}

as suggested in
http://tapestry.1045711.n5.nabble.com/redirecting-from-an-ajax-event-listener-td2438259.html

François

2011/12/1 Ville :
> Hi,
>
> I googled around a bit, and have some thoughts how this could be done, but
> what are the options? We're using Tap5-JQuery library.
>
> The workaround I have currently in mind involves adding filter to serverside
> that catches redirects to login page and if request is xhr then a json
> response is generated instead. This involves wrapping the response etc.
>
> I also have to intercept the call in browser side to have it working
> correctly.
>
> Is this the best way to do it?
>
> - Ville
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Tapestry-5-JQuery-redirect-to-other-page-when-session-has-expired-tp5038408p5038408.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 5 and Mobile

2011-11-29 Thread Peter Stavrinides
Howard that would be awesome from my point of view at least. I am still 
researching, but jQuery Mobile seems like a natural fit for Tapestry. If I 
understand what you are contemplating then this would be an enabler for 
seamless content adaptation. 

Cheers,
Peter


- Original Message -
From: "Howard Lewis Ship" 
To: "Tapestry users" 
Sent: Monday, 28 November, 2011 11:00:01 PM
Subject: Re: Tapestry 5 and Mobile

One thing I've been thinking about is to have greater control over the
"core" stack on a request-by-request basis, so that a single app can
skin one way for a desktop browser, and skin another way (with changes
to the "core" stack) for a mobile device (i.e., include JS & CSS from
jQuery Mobile, for example).

On Mon, Nov 28, 2011 at 11:08 AM, SeleniuM  wrote:
> Also, you can always implement your own Chain of Command builder directly
> implemented from Tapestry IOC.
> The thing is to make parameteres width and height of your own web
> application, and to make a selection when detected what device is
> approaching your web applications using just variable HTTP_USER_AGENT. On
> the knowledge of what device is detected, it parses values width and height
> ( and many others if implemented so) to it. :) If you want, I will make some
> code tips here. Cheers.
>
> P.S. Sorry on my English.
>
> ~SeleniuM
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Tapestry-5-and-Mobile-tp5028089p5029782.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
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.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: fault found

2011-11-28 Thread Peter Stavrinides
One thing you can check is that your submit method references the correct form 
id, using catch all event methods could receive bubbled up events from other 
forms:

i.e.: onSuccess() should become  onSuccessFrom()

Kind regards,
Peter

- Original Message -
From: "Christian Riedel" 
To: "Tapestry users" 
Sent: Monday, 28 November, 2011 2:38:40 PM
Subject: Re: fault found

then it is caused by some portion of the code that you did not show.
I tried it out and the onSubmit method is only called once, as expected. 

jsp won't help you here.


Am 28.11.2011 um 12:18 schrieb csckid:

> I tried with smaller project that has only hibernate and spring integrated
> and no custom filters. It didn't work still. 
> 
> Is there any other way to download the file beside this procedure? Can I
> link it through jsp? If that is possible can you please show me the way.
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/fault-found-tp5026068p5028554.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


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



Re: Tapestry 5 and Mobile

2011-11-28 Thread Peter Stavrinides
Those are fantastic resources, thank you François!



- Original Message -
From: "François Facon" 
To: "Tapestry users" 
Sent: Monday, 28 November, 2011 12:33:45 PM
Subject: Re: Tapestry 5 and Mobile

Hi Peter,
I sure you will lile this link :
http://mobiforge.com/starting/story/mobile-web-content-adaptation-techniques
If I have to convert an existing site into a multi device one, I would
try the responsive design approach.lot of example can be view at
http://mediaqueri.es/
My advise would be to talk to an experimented designer first.
Hope this help.
RegardsFrançois
-- Forwarded message ------
From: Peter Stavrinides 
Date: 2011/11/28
Subject: Tapestry 5 and Mobile
To: Tapestry users 


Hi everyone,

This question is for the mobile gurus out there using Tapestry. We are
about to take the plunge and convert our Tapestry web applications
into mobile compatible web applications, but I don't quite know where
to begin, so I would love to know how others are handling mobile with
Tapestry and if there a framework to recommend or simply some advice
on best practices with Tapestry integration.

Our existing web sites are subscription based and were developed and
targeted towards corporates so are very conservative with regards to
supporting every browser since IE6, this is restrictive but
unfortunately cannot change. This is why I am thinking to implement
side by side applications and having a separate mobile site that uses
HTML 5 and CSS 3... We will be supporting only the newest phones,
mostly iPhone, Blackberry, and the latest Android devices.

I know there is a great deal of knowledge in this forum, and I am a
newbie in the mobile development area, so any tips would be greatly
appreciated, even the most rudimentary advice.

Thanks!
Peter

-
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



Tapestry 5 and Mobile

2011-11-28 Thread Peter Stavrinides
Hi everyone,

This question is for the mobile gurus out there using Tapestry. We are about to 
take the plunge and convert our Tapestry web applications into mobile 
compatible web applications, but I don't quite know where to begin, so I would 
love to know how others are handling mobile with Tapestry and if there a 
framework to recommend or simply some advice on best practices with Tapestry 
integration.

Our existing web sites are subscription based and were developed and targeted 
towards corporates so are very conservative with regards to supporting every 
browser since IE6, this is restrictive but unfortunately cannot change. This is 
why I am thinking to implement side by side applications and having a separate 
mobile site that uses HTML 5 and CSS 3... We will be supporting only the newest 
phones, mostly iPhone, Blackberry, and the latest Android devices.

I know there is a great deal of knowledge in this forum, and I am a newbie in 
the mobile development area, so any tips would be greatly appreciated, even the 
most rudimentary advice.

Thanks!
Peter 

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



Re: [ANN] @Exclude for css

2011-11-10 Thread Peter Stavrinides
Nice one Barry, you made my day... if only it happened every time I made a 
suggestion that someone else went if and did the work ;o)


- Original Message -
From: "Barry Books" 
To: "Tapestry users" 
Sent: Thursday, 10 November, 2011 15:11:05 GMT +02:00 Athens, Bucharest, 
Istanbul
Subject: [ANN] @Exclude for css

I've been following the CSS discussions here and I needed a way to
exclude css defaults added by modules. The @Exclude suggestion seemed
like the way to go so I wrote one and included it in

https://github.com/trsvax/tapestry-bootstrap

I also wrote a description of how it works

http://trsvax.com/blog/TapestryHasNoStyle

I have not done much testing and comments/suggestions are welcome.

-
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



Fwd: Event after completion Tapestry 5 Autocompleter

2011-11-09 Thread Peter Stavrinides
Hi Thiago,

> Have you tried adding the function as a JSONLiteral? And why are you  
> returning a function instead of having this function declared somewhere  
> else and just passing parameters to it in the JSONObject?
I am not, Tapestry is responsible for these hooks, we simply pass the 
configuration or am I missing something?

I think we are not on the same page. I didn't quite understand your comment...  
Tapestry's Autocompleter if recollection serves is based on the underlying 
Scriptaculous autocompleter, right? 
So the Scriptaculous autocompleter has some hooks (updateElement & 
afterUpdateElement) to trigger 'aftercompletion' events, but Tapestry's 
implementation doesn't support these hooks, correct?
So how do I then enable these hooks without hacking it? 

>From other posts, and past experience I recall adding a function somewhere and 
>just passing the parameters didn't work (though it really should). So far as I 
>know only by overriding the mixin, or fudging the parameters you can trigger 
>these hooks, something like the following which extends the mixin and rewires 
>it a little:


public class ExtendedAutocomplete extends Autocomplete {

@Override
protected void configure(JSONObject config)
{
config.put("afterUpdateElement", new 
JSONRaw("onSelectFromAutocomplete"));
...

}

private class JSONRaw {
...
}
}

Kind regards,
Peter


- Original Message -
From: "Thiago H. de Paula Figueiredo" 
To: "Tapestry Mailing List" , "P Stavrinides" 

Sent: Tuesday, 8 November, 2011 17:48:25 GMT +02:00 Athens, Bucharest, Istanbul
Subject: Re: Event after completion Tapestry 5 Autocompleter

On Tue, 08 Nov 2011 12:13:38 -0200,  wrote:

> Hi All,

Hi!

>> The scriptaculous Ajax.Autocompleter does support
>> updateElement and afterUpdateElement methods, but as far as I can tell
>> you can't get them into the configuration because the JSONObject
>> quotes its attributes (making the function into a string).

Have you tried adding the function as a JSONLiteral? And why are you  
returning a function instead of having this function declared somewhere  
else and just passing parameters to it in the JSONObject?

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


- Forwarded Message -
From: "P Stavrinides" 
To: "Thiago H. de Paula Figueiredo" 
Cc: "Tapestry Mailing List" 
Sent: Wednesday, 9 November, 2011 11:13:22 GMT +02:00 Athens, Bucharest, 
Istanbul
Subject: Re: Event after completion Tapestry 5 Autocompleter

Hi Thiago,

> Have you tried adding the function as a JSONLiteral? And why are you  
> returning a function instead of having this function declared somewhere  
> else and just passing parameters to it in the JSONObject?
I am not, Tapestry is responsible for these hooks, we simply pass the 
configuration or am I missing something?

I think we are not on the same page. I didn't quite understand your comment...  
Tapestry's Autocompleter if recollection serves is based on the underlying 
Scriptaculous autocompleter, right? 
So the Scriptaculous autocompleter has some hooks (updateElement & 
afterUpdateElement) to trigger 'aftercompletion' events, but Tapestry's 
implementation doesn't support these hooks, correct?
So how do I then enable these hooks without hacking it? 

>From other posts, and past experience I recall adding a function somewhere and 
>just passing the parameters didn't work (though it really should). So far as I 
>know only by overriding the mixin, or fudging the parameters you can trigger 
>these hooks, something like the following which extends the mixin and rewires 
>it a little:


public class ExtendedAutocomplete extends Autocomplete {

@Override
protected void configure(JSONObject config)
{
config.put("afterUpdateElement", new 
JSONRaw("onSelectFromAutocomplete"));
...

}

private class JSONRaw {
...
}
}

Kind regards,
Peter


- Original Message -
From: "Thiago H. de Paula Figueiredo" 
To: "Tapestry Mailing List" , "P Stavrinides" 

Sent: Tuesday, 8 November, 2011 17:48:25 GMT +02:00 Athens, Bucharest, Istanbul
Subject: Re: Event after completion Tapestry 5 Autocompleter

On Tue, 08 Nov 2011 12:13:38 -0200,  wrote:

> Hi All,

Hi!

>> The scriptaculous Ajax.Autocompleter does support
>> updateElement and afterUpdateElement methods, but as far as I can tell
>> you can't get them into the configuration because the JSONObject
>> quotes its attributes (making the function into a string).

Have you tried adding the function as a JSONLiteral? And why are you  
returning a function instead of having this 

Re: Insert Stylesheet to the Head top

2011-11-09 Thread Peter Stavrinides
Great explanation Robert!

Thanks,
Peter
- Original Message -
From: "Eugene Zhulkov" 
To: users@tapestry.apache.org
Sent: Wednesday, 2 November, 2011 14:30:19 GMT +02:00 Athens, Bucharest, 
Istanbul
Subject: Re: Insert Stylesheet to the Head top

It works! Thank you all very much!

Code:



Overall processing time for main page of http://kindershopping.ru hasn't
changed:
before - min 149ms, mean 165ms, max 195ms
after - min 144ms, mean 163ms, max 365ms
 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Insert-Stylesheet-to-the-Head-top-tp4952484p4957961.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: Web services using Tapestry

2011-11-08 Thread Peter Stavrinides
Search this mailing lists and you will find some recent threads and some coded 
examples.

regards,
Peter

- Original Message -
From: "Lenny Primak" 
To: "Tapestry users" 
Sent: Tuesday, 8 November, 2011 16:48:14 GMT +02:00 Athens, Bucharest, Istanbul
Subject: Re: Web services using Tapestry

I use web services with tapestry 5. There is nothing special about them and I 
just use them without regard if it's tapestry or not. I use glassfish. 



On Nov 8, 2011, at 9:36 AM, Tim Fletcher  wrote:

> Hi All,
> 
> I have spent the last day trying to find a simple method for adding web
> services via Tapestry5, but have only found slightly old
> tutorials referring to Tapestry4.
> 
> Do you guys have any specific recommendations?
> 
> Ideally, i would like to use JAX-WS style annotations.
> 
> Thanks in advance,
> Tim

-
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: Possible regression Tapestry 5.1 to 5.3

2011-10-31 Thread Peter Stavrinides
> Probably a bug, but may only be fixed in 5.4 or 5.3.1 at this point.
Opened a new Jira: https://issues.apache.org/jira/browse/TAP5-1736

Regards,
Peter


- Original Message -
From: "Howard Lewis Ship" 
To: "Tapestry users" 
Sent: Thursday, 27 October, 2011 20:28:36 GMT +02:00 Athens, Bucharest, Istanbul
Subject: Re: Possible regression Tapestry 5.1 to 5.3

I suspect Tapestry is not recognizing that
SubClass.onSuccessFromStep1() is an override of
BaseClass.onSuccessFromStep1() (perhaps the abstract flag is throwing
it).

So, Tapestry builds code for BaseClass, and implements
dispatchComponentEvent() to invoke onSuccessFromStep1().

It then builds code for SubClass, sees onSuccessFromStep1(), doesn't
think it's an override of the base class method (for whatever reason),
and implements dispatchComponentEvent() to (a) invoke
super.dispatchComponentEvent(), and (b) invoke onSuccessFromStep1().
Thus two invocations.

Probably a bug, but may only be fixed in 5.4 or 5.3.1 at this point.


On Thu, Oct 27, 2011 at 3:26 AM, Peter Stavrinides
 wrote:
> FYI: returning true will also work, so I am happy to use that as a workaround 
> instead, but I am still puzzled as to why it gets invoked twice? I suspect 
> this is going to cause issues when I need to return an Object.
>
> cheers,
> Peter
>
> - Original Message -
> From: "Peter Stavrinides" 
> To: "Tapestry Mailing List" 
> Sent: Thursday, 27 October, 2011 13:11:35 GMT +02:00 Athens, Bucharest, 
> Istanbul
> Subject: Possible regression Tapestry 5.1 to 5.3
>
> Hi all,
>
> We noticed some odd behaviour today in one of our apps, it appears when we 
> use the pattern detailed below, the onSuccessFromStep1() event gets invoked 
> twice by Tapestry, this was not the case in 5.1:
>
> public abstract class BaseClass {
>   public abstract Object onSuccessFromStep1();
> }
>
>
> public class SubClass extends BaseClass{
>
> @Override
> public Object onSuccessFromStep1() {
>   if (!foundErrors())
>        incrementStep();
>   return null;
> }
>
> }
>
> Of course a simple workaround is to remove the @Override, but that really 
> defeats the purpose of using a base class.
>
> regards,
> Peter
>
>
> -
> 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
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.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 5.3 Validation removal of validateForm

2011-10-27 Thread Peter Stavrinides
> "onValidateFrom"
Yes of course, why didn't I think of that (too much coffee today perhaps!)... 
Thanks!

> Simply using onValidate is probably not specific enough as it may get
> triggered by bubbling events.
Exactly, OnValidate is a catch all so does get invoked for each bubbling 
validation event. Guess the release notes also threw me a little.

Cheers,
Peter




- Original Message -
From: "Chris Poulsen" 
To: "Tapestry users" 
Sent: Thursday, 27 October, 2011 14:51:25 GMT +02:00 Athens, Bucharest, Istanbul
Subject: Re: Tapestry 5.3 Validation removal of validateForm

My guess would be "onValidateFrom" replaces
"validateForm" ?

Simply using onValidate is probably not specific enough as it may get
triggered by bubbling events.

-- 
Chris

On Thu, Oct 27, 2011 at 12:49 PM,  wrote:

> Hi All,
>
> The 5.3 release notes provide the following info:
> "validateForm" event triggered by Form component (replaced with "validate"
> event)
>
> How validate replaces validateForm is not clear to me and I could not find
> any more info?
>
> These two methods are certainly not interchangeable, i.e.: validateForm was
> invoked just before OnSucess and once for a form, whereas onValidate may
> potentially be called several times with a different event life-cycle. Is
> there an example of how to re-factor code that was using 'validateForm' to
> use 'Validate', and in such a way as to reproduce the behaviour of
> validateForm? The only other alternative is to have one method per data
> point, which is really not practical for anything scalable.
>
> Kind regards,
> Peter
>
>
>
>
>
>
> -
> 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: Possible regression Tapestry 5.1 to 5.3

2011-10-27 Thread Peter Stavrinides
FYI: returning true will also work, so I am happy to use that as a workaround 
instead, but I am still puzzled as to why it gets invoked twice? I suspect this 
is going to cause issues when I need to return an Object.

cheers,
Peter

- Original Message -
From: "Peter Stavrinides" 
To: "Tapestry Mailing List" 
Sent: Thursday, 27 October, 2011 13:11:35 GMT +02:00 Athens, Bucharest, Istanbul
Subject: Possible regression Tapestry 5.1 to 5.3

Hi all,

We noticed some odd behaviour today in one of our apps, it appears when we use 
the pattern detailed below, the onSuccessFromStep1() event gets invoked twice 
by Tapestry, this was not the case in 5.1:

public abstract class BaseClass {
   public abstract Object onSuccessFromStep1();
}


public class SubClass extends BaseClass{

@Override
public Object onSuccessFromStep1() {
   if (!foundErrors()) 
incrementStep();
   return null;
}

}

Of course a simple workaround is to remove the @Override, but that really 
defeats the purpose of using a base class.

regards,
Peter


-
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



Possible regression Tapestry 5.1 to 5.3

2011-10-27 Thread Peter Stavrinides
Hi all,

We noticed some odd behaviour today in one of our apps, it appears when we use 
the pattern detailed below, the onSuccessFromStep1() event gets invoked twice 
by Tapestry, this was not the case in 5.1:

public abstract class BaseClass {
   public abstract Object onSuccessFromStep1();
}


public class SubClass extends BaseClass{

@Override
public Object onSuccessFromStep1() {
   if (!foundErrors()) 
incrementStep();
   return null;
}

}

Of course a simple workaround is to remove the @Override, but that really 
defeats the purpose of using a base class.

regards,
Peter


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



Re: pageRenderLinkSource.toAbsoluteURI() returns relative URL

2011-10-06 Thread Peter Stavrinides
Yes, this is a bug I have seen too, I hacked together my own fix for this, but 
somehow in 5.3 is working correctly again.

- Original Message -
From: "Brian Long" 
To: "Tapestry users" 
Sent: Monday, 3 October, 2011 12:20:33 GMT +02:00 Athens, Bucharest, Istanbul
Subject: pageRenderLinkSource.toAbsoluteURI() returns relative URL

Hi all,

I want determine the URL of my tapestry page, and rather that build
the path from the request, I thought I'd use the PageRenderLinkSource
service similar to the example posted here
http://blog.markwshead.com/825/get-the-url-of-page-in-tapestry-5/,
however when I call the method toAbsoluteURI() I get a relative path
/myserver/en/receipts/kioskreceipt instead of
http://localhost:8080/myserver/en/receipts/kioskreceipt?


I'm using Tapestry 5.1.0.5.

Regards, Brian.

@Inject
private PageRenderLinkSource linkSource;



logger.info(linkSource.createPageRenderLink(kioskReceipt.getClass()).toAbsoluteURI());

-
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



Fwd: T5.2 and Metro / SOAP

2011-10-05 Thread Peter Stavrinides
> Registry is an ObjectLocator. Registry is a subinterface of ObjectLocator.  
> What do you need in Registry that ObjectLocator doesn't have?
Okay I get it now, wrap it all in an IoC service that uses ObjectLocator to 
lookup the services, and contribute this service to RegistryStartup so there 
would be no need for a reference to the Registry... As I said before, I am fine 
with my approach, much of a muchness but this could be a better way for others.

Regards,
Peter
- Original Message -
From: "Thiago H. de Paula Figueiredo" 
To: "Peter Stavrinides" 
Sent: Wednesday, 5 October, 2011 16:37:31 GMT +02:00 Athens, Bucharest, Istanbul
Subject: Re: T5.2 and Metro / SOAP

On Wed, 05 Oct 2011 10:30:10 -0300, Peter Stavrinides  
 wrote:

> The ObjectLocator provides access to services defined within a Registry,  
> but I haven't seen an example of using it to get hold of a reference to  
> the actual registry?

Registry is an ObjectLocator. Registry is a subinterface of ObjectLocator.  
What do you need in Registry that ObjectLocator doesn't have?

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: T5.2 and Metro / SOAP

2011-10-05 Thread Peter Stavrinides
The ObjectLocator provides access to services defined within a Registry, but I 
haven't seen an example of using it to get hold of a reference to the actual 
registry? is that possible? if so pls provide a code example, I have only seen 
this from the Context. ie: Registry registry = (Registry) 
context.getAttribute(TapestryFilter.REGISTRY_CONTEXT_NAME); Am I missing 
something, perhaps show us what you are referring to in some code.

- Original Message -
From: "Thiago H. de Paula Figueiredo" 
To: "Tapestry users" , "P Stavrinides" 

Sent: Wednesday, 5 October, 2011 15:32:51 GMT +02:00 Athens, Bucharest, Istanbul
Subject: Re: T5.2 and Metro / SOAP

On Wed, 05 Oct 2011 09:08:21 -0300,  wrote:

> I don't know Thiago, I suppose that may be true, but I never tried it...  
> In theory, the only thing you really need is a reference to the Tapestry  
> registry in order to publish the endpoints, this was the best solution I  
> found at the time, I am still not convinced I would do it any other way.

You can inject an ObjectLocator (which is the interface that provides the  
getService() and autobuild() methods of Registry) in any service. This  
avoids the need of web.xml changes.

-- 
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: Passing parameters to nested components

2011-09-29 Thread Peter Stavrinides
Hard to pinpoint the right choice without seeing the code, sounds to me like 
you need to use onPrepare rather since you are referring to a form, if that is 
not sufficient rethink the design maybe use InjectContainer instead of 
environmental... there is more than one way to do this.

Peter




- Original Message -
From: "Marek Matus" 
To: "Thiago H. de Paula Figueiredo" 
Cc: "Tapestry users" 
Sent: Wednesday, 17 August, 2011 08:08:46 GMT +02:00 Athens, Bucharest, Istanbul
Subject: Re: Passing parameters to nested components

Thanks for your response.

If I use PageAttached and PageDetached like this:

@PageAttached
void onPageAttached() {
environment.push(IPageParams.class, this.pageParams);
}

@PageDetached
void onPageDetached() {
environment.pop(IPageParams.class);
}

Then I receive this error message in nested component:

Render queue error in SetupRender[DashboardSubmitter:edit]: No object of
type com.test.data.*IPageParams *is available from the Environment.
Available types are com.test.data.*IPageParams*,
org.apache.tapestry5.RenderSupport,
org.apache.tapestry5.ValidationDecorator,
org.apache.tapestry5.internal.services.DocumentLinker,
org.apache.tapestry5.services.ClientBehaviorSupport,
org.apache.tapestry5.services.Heartbeat,
org.apache.tapestry5.services.javascript.JavaScriptSupport.

The requested class IPageParams is available but is not load from
enviromental. (I shuld note that I use tapestry 5.2.6.)

Thanks for your help.

Marek


2011/8/17 Thiago H. de Paula Figueiredo 

> On Tue, 16 Aug 2011 16:59:19 -0300, Marek Matus 
> wrote:
>
>  Hi,
>>
>
> Hi!
>
>  I have tried to use @PageAttached and @PageDettached functions which are
>> called for form submission too, but it doesn't work because (I think)
>> there is used different class loader and nested component doesn't load the
>> data
>> from environmental.
>>
>
> @PageAttached and @PageDettached events should work in your case. I'm
> sorry, but your explanation makes little sense. How have you declared your
> event handler methods?
>
> --
> 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: pages vs components... use model still the same or has it evolved any ?

2011-09-09 Thread Peter Stavrinides
As Steve mentions its an evolution of personal best practice for your coding 
style. My personal taste through the years evolved through trial and error, 
more components is not always better but components to me work best when devoid 
of state, i.e.: breaking out the mechanics into the component and leaving the 
state in the page, this makes for wonderful reuse and very generic components 
reusable across applications without change. 

Cheers,
Peter

- Original Message -
From: "Steve Eynon" 
To: "Tapestry users" 
Sent: Friday, 9 September, 2011 10:22:59 GMT +02:00 Athens, Bucharest, Istanbul
Subject: Re: pages vs components... use model still the same or has it evolved 
any ?

This is less to do with Tapestry and more to do with general OO
practises and your personal preference towards it. e.g. When writing a
Java class, you could write everything in a single method, but to gain
efficient reuse you usually refactor it out into multiple methods.
Similarly, you split your pages into components to gain reuse. And for
practical reuse, both methods and components need parameters.

If in the past you were writing components that had so many parameters
that they confused you, then I would suggest next time you try a
different design approach.

Steve.

On 9 September 2011 09:30, Ken in Nashua  wrote:
>
> I guess I am wondered in other peoples ideas over pages and components.
>
> Though my take on them... pages NEED to persist properties across request 
> boundaries... and components persist those page properties thru their well 
> defined parameter interface. Does this mean that components should never have 
> properties ?
>
> Looking forward to light on this subject that might adhere to a natural 
> model...
>
> thanks
>
> From: kcola...@live.com
> To: users@tapestry.apache.org
> Subject: pages vs components... use model still the same or has it evolved 
> any ?
> Date: Thu, 8 Sep 2011 21:25:23 -0400
>
>
>
>
>
>
>
>
> An exerpt from a 2004 tapestry guide...
>
> 
> A component's parameters are bound to properties of the
> enclosing page. The component is allowed to read its parameter, to access the 
> page property the parameter
> is bound to. A component may also update its parameter, to force a change to 
> the bound page
> property.
> ---
>
> Does this imply that components do not have properties ? or should not ?... I 
> know tapestry gives us enough rope to hang ourselves with
>
> Is there a politically correct semantic for pages vs components now... with 
> tapestry5 or is the concept the same since older versions ?
>
> If anyone could elaborate on a general use model for components vs pages that 
> would be helpful.
>
> I have found some page/component code cluttered up with so many properties 
> and parameters not knowing which to use and when... whereby either of these 
> have both pages and properties
>
> If anyone could elaborate on a general use model for components vs pages that 
> would be helpful.
>
> Thanks
> Ken
>
>
>

-
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: what is called when - ajax version

2011-08-10 Thread Peter Stavrinides
> However, there's still the possibility that
> these are useful ... except that all the use cases I can come up with
> are better served by a "perthread" scoped service, rather than
> associated with the page instance.
I am using them for a one time setup of tab groups (essentially linkedhashmaps) 
in pages, and I find it to be a good fit for my purposes... of course there are 
several workarounds so its not essential to use pageAttached / pageDetached. 
Never thought of of using a "perthread" scoped service though.

Regards,
Peter




- Original Message -
From: "Howard Lewis Ship" 
To: "Tapestry users" 
Sent: Tuesday, 9 August, 2011 21:36:11 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: what is called when - ajax version

On Tue, Aug 9, 2011 at 7:23 AM, Lenny Primak  wrote:
> pageAttached/pageDetatched are being obsoleyed in the future versions of 
> tapestry.
> I would use setupRender instead.

If there are valid uses for pageAttached / pageDetached then they can
stay.  Some people do use them for things that should properly be done
inside the page's activate event handler, or inside a setupRender
render phase method.  However, there's still the possibility that
these are useful ... except that all the use cases I can come up with
are better served by a "perthread" scoped service, rather than
associated with the page instance.


>
>
>
> On Aug 9, 2011, at 8:09 AM, Paul Stanton  wrote:
>
>> Geoff,
>>
>> Thanks again, you are always helpful!
>>
>> Looks like pageAttached/pageDetached is exactly what i need. Combined with 
>> isXHR, works fine.
>>
>> I hadn't stumbled across this doc: 
>> http://tapestry.apache.org/page-life-cycle.html
>>
>> cheers, p.
>>
>> On 24/07/2011 10:37 PM, Geoff Callender wrote:
>>> Done - new example "AJAX: What is Called and When" added as:
>>>
>>>    
>>> http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/whatiscalledandwhen
>>>
>>> However, I don't know that it helps solve your problem, unless maybe you 
>>> test request.isXHR() in pageAttached() and pageDetached()???
>>>
>>> Geoff
>>>
>>> On 18/07/2011, at 11:05 AM, Paul Stanton wrote:
>>>
 In the past, I've found the "what is called when" example from the 
 jumpstart collection very useful, however there is no version for the 
 partial render or ajax case.

 I'm trying to figure out if there is an event I can handle which is called 
 everytime a partial render or zone update is returned to the client, or 
 everytime an asych request is made.

 Is there such a hook?

 regards, Paul.

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



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.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: 100% CPU load after hot deploy of Tapestry 5 Application on Tomcat 6

2011-07-21 Thread Peter Stavrinides
Martin thanks, I will try this, will let you know.

Cheers,
Peter


- Original Message -
From: "Martin Strand" 
To: "Tapestry users" 
Sent: Wednesday, 20 July, 2011 12:52:52 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: 100% CPU load after hot deploy of Tapestry 5 Application on Tomcat 
6

We've only got 5.2 apps runing on Jetty, but hot redeploy works great  
there and is even without the PermGen leak that was present in Tapestry 4.


Anyway, here's how I would try to diagnose the problem:

1. Trigger the problem so that you have something consuming 100% CPU

2. Find the native ID of the thread that is eating all your CPU power:
$ top -H -u tomcat  (or whatever user is running Tomcat)
-H will show individual *threads* and you should be able to find the  
offending thread. Remember its ID.
(Hit 'P' to sort by CPU usage)

3. Find Tomcat's PID:
$ sudo jps

4. Get a thread dump from Tomcat:
$ sudo kill -QUIT 
The thread dump will be written to Tomcat's stderr, wherever that is  
redirected

5. Inspect the thread dump
Convert the thread ID from step 2 to hexadecimal and look for it in the  
thread dump from step 4. The thread you're looking for will say "nid=xxx",  
where xxx is the offending thread's native ID written in hexadecimal. The  
thread's stacktrace should give you a clue as to what's going on,  
especially if you get more samples to see where the thread is spending  
most of its time.


You can also hook up VisualVM to Tomcat and inspect threads from there.
There's a thread inspector plugin in the plugin repository.


Hope that helps!

Martin


On Wed, 20 Jul 2011 11:16:24 +0200,  wrote:

> Hi All,
>
> This is a tricky question one since I do realize there are several  
> possibilities to explain the problem, not all of which are Tapestry  
> related. We have battled to understand what is going on in production  
> for the past year or so, and have tried to pinpoint where the problem  
> lies and come up short. If anyone has experienced anything similar  
> *please share.
>
> Our environment is:
>
> Ubuntu Server
> Tapestry 5.1
> JDK 6
> Tomcat 6
> Apache in front (reverse proxy)
>
> We are deploying our Tapestry apps to Tomcat 6, and they do run great  
> even with load, and it remains very stable as the session count  
> increases; this is when a server restart is done after a deployment.
>
> The problem appears to be specific to 'Tapestry applications' and hot  
> deployment. We run several apps, both small and large and they all react  
> the same way... If we stop then undeploy any of these Tapestry apps, and  
> afterwards do a hot deploy with a newer version (without the restart),  
> the CPU usage shoots to 100% and stays there. JSP based apps pure  
> Servlets don't appear to react in the same way.
>
> Has anybody experienced something similar?
>
> Kind regards,
> Peter

-
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: 100% CPU load after hot deploy of Tapestry 5 Application on Tomcat 6

2011-07-21 Thread Peter Stavrinides
Hi Guys,
Thanks for the attempts... 

these machines are monsters, 8 cores and about 32 gigs... Tomcat has more 
resources allocated than it should ever need, the CPU never drops just grows 
after the hot deploy (and only then). The machine doesn't fall over either 
because of the extensive resources. As I have said this only happens with a hot 
deploy, so not sure what role GC could play in that.

Thanks,
Peter 



- Original Message -
From: "Kalle Korhonen" 
To: "Tapestry users" 
Sent: Thursday, 21 July, 2011 07:53:56 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: 100% CPU load after hot deploy of Tapestry 5 Application on Tomcat 
6

As Mark said, GC exhausting the system is a possibility if it
eventually recovers from the 100% CPU. If at all possible, try with
higher max memory allocation and Tomcat 7.

Kalle


On Wed, Jul 20, 2011 at 2:16 AM,   wrote:
> Hi All,
>
> This is a tricky question one since I do realize there are several 
> possibilities to explain the problem, not all of which are Tapestry related. 
> We have battled to understand what is going on in production for the past 
> year or so, and have tried to pinpoint where the problem lies and come up 
> short. If anyone has experienced anything similar *please share.
>
> Our environment is:
>
> Ubuntu Server
> Tapestry 5.1
> JDK 6
> Tomcat 6
> Apache in front (reverse proxy)
>
> We are deploying our Tapestry apps to Tomcat 6, and they do run great even 
> with load, and it remains very stable as the session count increases; this is 
> when a server restart is done after a deployment.
>
> The problem appears to be specific to 'Tapestry applications' and hot 
> deployment. We run several apps, both small and large and they all react the 
> same way... If we stop then undeploy any of these Tapestry apps, and 
> afterwards do a hot deploy with a newer version (without the restart), the 
> CPU usage shoots to 100% and stays there. JSP based apps pure Servlets don't 
> appear to react in the same way.
>
> Has anybody experienced something similar?
>
> Kind regards,
> Peter
>
>
>
>
>
>
>
>
> -
> 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: [ANN] JumpStart 5.3.2 released

2011-06-21 Thread Peter Stavrinides
Kudos on the web services implementation! nice :)
Peter

- Original Message -
From: "Geoff Callender" 
To: "Tapestry users" 
Sent: Friday, 17 June, 2011 14:43:00 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: [ANN] JumpStart 5.3.2 released

Hi all,

JumpStart 5.3.2 is up and running. It features:

* Examples of Web Services.
* Improved previews.

These features are the result of your feedback. Please keep it coming!

It's running and ready to use in the usual place:

 http://jumpstart.doublenegative.com.au/jumpstart/ 

Geoff


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



Re: IllegalAccessError in IoC

2011-04-15 Thread Peter Stavrinides
Thanks very much for the explanation Howard!! 

Cheers,
Peter

- Original Message -
From: "Howard Lewis Ship" 
To: "Tapestry users" 
Sent: Thursday, 14 April, 2011 19:21:03 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: IllegalAccessError in IoC

On Thu, Apr 14, 2011 at 2:55 AM,   wrote:
> Hi Howard et al,
>
> We are using Tapestry 5 IoC in all our applications (both standalone and 
> web), and have a very sizeable IoC code base. We have tried a couple of times 
> now to upgrade it from 5.1 and 5.2.4, but it seems backwards compatibility is 
> broken... The problem we are stuck on now is whenever a non-public method is 
> called from within a service we are getting the dreaded IllegalAccessError. I 
> have not dug very deep into Tapestrys internals to figure out why this is 
> happening yet, but I am certain that in Tapestry 5.1 this is not the case.
>

When Tapestry loads a service it creates a new class loader for it.
The service class and its inner classes and base classes are loaded by
that class loader, but it causes problems accessing non-public members
of other classes in the same package: it's not really the same class
or the same package, it just shares the package name and class name.
A very, very leaky abstraction (one of the reasons I didn't attempt
live service reloading earlier it because its impossible to do it
"right" without much more intrusive technology, such as an agent).

When you bind() a service, you can now explicitly disable live service
reloading for that one service, see ServiceBindingOptions.


> You might suggest to simply change the scope of these methods and classes but 
> we can't easily re-factor our library modules because of the sheer scale, and 
> even if it were an option, and we did consider it for a time, these errors 
> produce runtime exceptions, which makes it is very difficult to find every 
> occurrence in the code, so for us to change the scope for our entire IoC 
> codebase is not a practical solution. This seems like a big change from 5.1, 
> and is a real blocker for us, I would greatly appreciate any assistance.
>
> Thanks,
> Peter
>
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.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: 10 Minute Web Application Demo

2011-02-17 Thread Peter Stavrinides
:) Excellent Mark! I know the feeling... does she also give the blank 
expression? 
 
- Original Message -
From: "Mark" 
To: "Tapestry users" 
Sent: Wednesday, 16 February, 2011 23:25:47 GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: Re: 10 Minute Web Application Demo

I keep showing my wife, but she doesn't ever seem to get very excited
about it. :)

On Wed, Feb 16, 2011 at 2:27 PM, Michael Gentry  wrote:
> Sure, but I don't general show people Tapestry 5 at home.  I'll bet
> most of us don't do that, either.  :-)
>
> mrg
>
>
> On Wed, Feb 16, 2011 at 2:28 PM, Christian Riedel
>  wrote:
>> don't you have internet at home? :p
>>
>>
>> Am 16.02.2011 um 19:54 schrieb Michael Gentry:
>>
>>> That's not an option for some of us, either.  :-)
>>>
>>>
>>> On Wed, Feb 16, 2011 at 1:48 PM, Lenny Primak  
>>> wrote:
 That's what the your mobile device is for :)

 On Feb 16, 2011, at 1:47 PM, Michael Gentry wrote:

> Hi Mark,
>
> Keep in mind that a lot of companies block YouTube access (and other
> media sites), so putting it on YouTube might actually restrict access
> more than you intended.
>
> mrg


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

-
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: [Announce] Tapestry Testify project - v1.0.3 released

2011-02-07 Thread Peter Stavrinides
Thanks for your effort Paul!


- Original Message -
From: "PaulField" 
To: users@tapestry.apache.org
Sent: Saturday, 5 February, 2011 16:20:51 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: [Announce] Tapestry Testify project - v1.0.3 released


I'd like to announce the latest release of the Tapestry Testify project at
Tapestry 360:
http://tapestry.formos.com/nightly/tapestry-testify/
 
Tapestry Testify is an extension to Tapestry that allows you to write page
and component tests very easily and have them run very efficiently.
 
 
** Release Notes **
* Upgraded to support Tapestry 5.2.x  (tested with 5.2.4)

- Paul
 
---
Paul Field
http://twitter.com/cloudy_skies


-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Announce-Tapestry-Testify-project-v1-0-3-released-tp3372532p3372532.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: best stack ...

2010-11-05 Thread Peter Stavrinides
You are not forced to develop with Maven, but it takes a brave soul to manage 
30 to 40 megs of libraries manually :) lol.

Peter

- Original Message -
From: "Adam Zimowski" 
To: "Tapestry users" 
Sent: Friday, 5 November, 2010 04:35:38 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: best stack ...

> Don't really like Maven but have found it's a necessary evil if you want to 
> develop with Tapestry 5.

Well, while Maven is helpfull it's not exactly true :-) We have a
large Tapestry app (ported struts 1 gozilla), and zero Maven.
Remember, Maven is just a tool to automate things. You can setup your
project infrastructure and builds without it.

Here is our stack:

-- Web/App Layer --
Eclipse
Jetty (local dev as well as production) - we don't use RunJettyRun,
rather we use a standard Eclipse run task executing Main from Jetty's
start.jar.
Tapestry 5.2 - the beauty of Tap IOC is that we are now Spring free,
after all these years with Struts-Spring torture.
AspectJ for AOP
(minor libs)

-- Business Layer ---
OpenEJB
Hibernate
Ant - EJB deploys, Hibernate schema builds etc.
(minor libs)

What we have found that Tapestry-Hibernate integration is completely
unnecessary for us since our Hibernate layer is abstracted out behind
the EJBs. So is Tapestry-Spring - also not necessary.

Anotherwords, all we have is a pure Tapestry (with few component libs)
to run our huge Ecommerce app.

Adam




On Thu, Nov 4, 2010 at 7:41 PM, Anas Mughal  wrote:
> Use Maven archetype to create the project for you:
>
>
>
>
> http://tapestry.apache.org/tapestry5.1/quickstart/
>
>
>
>
> It will take care of everything.Then, import it into Eclipse as Maven project.
>
> --
> Anas Mughal
> http://anas-mughal.com
>
>
>
> --- On Thu, 11/4/10, Howard Lewis Ship  wrote:
>
> From: Howard Lewis Ship 
> Subject: Re: best stack ...
> To: "Tapestry users" 
> Date: Thursday, November 4, 2010, 7:27 PM
>
> I prefer Jetty to run my application.
>
> I'm always amazed at how tortured people's setups are.
>
> It's really simple:
>
> Create a project (using Maven, or otherwise).
>
> Use the RunJettyRun Eclipse plugin.
>
> Make sure you are NOT compiling to src/main/webapp/WEB-INF/classes  (compile
> to target/classes or something)
>
> Make sure your libraries are NOT in src/main/webapp/WEB-INF/lib (they won't
> be if you are using Maven/Gradle/etc.)
>
> (The above two resolve potential class resolution problems where classes are
> loaded by the wrong class loader).
>
> Start RunJettyRun targetted at src/main/webapp
>
> You're done!
>
>
> On Thu, Nov 4, 2010 at 4:22 PM, Paul Stanton  wrote:
>
>> Hi all,
>>
>> I'm starting a new project, which will be in beta (non-prod) for some time
>> and I'd like to start with the current cutting edge setup with the hope that
>> it will be the standard or release phase down the track.
>>
>> I'd like to set up my development environment for rapid development.
>>
>> The project may need to be deployed to tomcat for hosting, but development
>> could be done on Resin if necessary. I've never used Resin but if the
>> development time advantages are sufficient I would consider this approach.
>>
>> I've always used Eclipse.
>> Haven't used Tapestry 5.2 yet but would like to start..
>> Don't really like Maven but have found it's a necessary evil if you want to
>> develop with Tapestry 5.
>>
>> The quickstart tutorial seems a little outdated (
>> http://tapestry.apache.org/tapestry5/tutorial1/env.html) - is there an
>> updated version or a tutorial anywhere?
>>
>> also, there's been some discussion regarding tomcat not working well with
>> the custom classloader in tapestry .. does anyone have a setup
>> tutorial/guide on how to get these two working together?
>>
>> thanks, paul.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to learn
> how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.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: Looks like a bug with image submit

2010-10-15 Thread Peter Stavrinides
Ahh yes, thanks! I see it was fixed over a year ago, but wasn't 5.1.0.6 and 
5.1.0.7 voted down?


- Original Message -
From: "Stephan Windmüller" 
To: users@tapestry.apache.org
Sent: Friday, 15 October, 2010 12:13:23 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Looks like a bug with image submit

On 15.10.2010 09:24, p.stavrini...@albourne.com wrote:

> When using an image submit button it appears that the onSelected event never 
> fires:

Yes, and it is a known one:

https://issues.apache.org/jira/browse/TAP5-711

Regards
 Stephan

-
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: Is there any way to render the "get" method of form?

2010-10-04 Thread Peter Stavrinides
Point us to the Jira Lutz, the HTML 2 specification details the following:
"If the processing of a form is idempotent (i.e. it has no lasting observable 
effect on the state of the world), then the form method should be GET. Many 
database searches have no visible side-effects and make ideal applications of 
query forms."

and:

"If the service associated with the processing of a form has side effects (for 
example, modification of a database or subscription to a service), the method 
should be POST."

so I believe you have a case.

Cheers,
Peter
 


- Original Message -
From: "Lutz Hühnken" 
To: "Tapestry users" 
Sent: Tuesday, 28 September, 2010 21:00:06 GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: Re: Is there any way to render the "get" method of form?

Dear Thiago,

thanks for your patient reply and the advice. Of course I realize that
I can still implement a search with Tapestry, with redirect-after-post
or else, and I have actually done so in the past.

But please take a minute and think about these two things:

1. You say,
> GET was always meant to be used in request that don't change the state of
> the application (including database)

and this is exactly what I would like to use it for - as I said, a
search. You could re-phrase your argument:
"POST was meant for requests that do change the state."
So why do I have to use it for requests that do not?

2. Of course, a lot of things are doable, change the DOM and what not.
But wasn't the idea of Tapestry "make the simple things easy, the
difficult things possible"?
A form with method=get is totally valid HTML, and I think it should be
easy, not complicated.

These two reasons are why I said the lack of get-forms is "puzzling"
me, it just seems somewhat inconsistent with the rest of Tapestry
(which I use and will continue to use with great pleasure).

I did as you told me and created a JIRA ticket (a "wish") for it:
"https://issues.apache.org/jira/browse/TAP5-1285";

Keep up the good work,

Lutz


-- 
altocon GmbH
http://www.altocon.de/
Software Development, Consulting
Hamburg, Germany

-
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: Deploying several T5 apps in one servlet container

2010-09-15 Thread Peter Stavrinides
Hi Borut,

Determine and prioritize exactly what you want, and then go from there:

- Do you need a CDN? i.e.: do you stream video / have lots of static content on 
a high traffic site?
- Tomcat is not as fast as Apache serving static content, Apache may not be the 
fastest but its fast enough for most sites 
- Apache in front of Tomcat isn't as fast as Tomcat with Native IO, and you 
cannot use Native IO with a reverse proxy
- Do you require Asynchronous request processing (for instance if you wish to 
use Comet), then also forget about Apache in front of Tomcat, that won't work, 
Jetty is one of the better solutions in this case.
- Apache is very mature, and very stable (imho nothing is as rock solid)
- For SSL Apache is great, and really easy to configure ...almost all web 
servers do SSL.
- For many security is not always a priority when choosing a technology... but 
can be the highest priority for others like me, which limits choices to a 
select few products (i.e.: Those with consistent testing and security patching)
- Web service support out the box?
- EJB support (forget Tomcat in this case), Glassfish or JBoss come to mind

To be perfectly honest, a few years ago I would have recommend Apache with the 
mod_ajp connector to Tomcat, but today I might defect to Glassfish (Tomcat is 
its servlet container) as you get to avoid the reverse proxy, and have Comet 
and EJB in the mix.

Cheers, 
Peter





- Original Message -
From: "Thiago H. de Paula Figueiredo" 
To: "Tapestry users" 
Sent: Thursday, 16 September, 2010 00:19:44 GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: Re: Deploying several T5 apps in one servlet container

On Wed, 15 Sep 2010 17:47:50 -0300, Borut Bolčina  
 wrote:

> So, to handle resources like javascript, css and images I would create a  
> cdn binding which would be configurable to accept from which host to get  
> these resources.

That's what I do.

> When doing this, I would loose asset versioning wouldn't I?

Yes, but I guess it wouldn't be hard to add them yourself.

> What about gzip and cache header settings?

These are provided or not by the CDN, as it would be the one serving  
assets, not Tapestry. This is completely outside your application. The  
binding would just generate the links to them.

> What about page and action links, actually all links generated by  
> tapestry?

Page and event URLs are not resources, so they're not handled by the  
Tapestry asset services, so nothing would change here.

> Is this at all important?

You don't need to worry about page and events URLs at all.

-- 
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: Alternating table rows

2010-09-14 Thread Peter Stavrinides
Katia has some good advice, I am also a strong advocate for code separation, 
which equates to extensibility and maintanability.

Your page class (pure Java) is intended to replace JSP or any expression 
language, queries and any other business logic is better when moved into IoC 
where it is injectable and reusable. Tapestry purposefully minimizes expression 
language usage in pages because:
- Its hard (or near impossible) to test in templates
- It clutters the templates (error prone)
- Its better done in Java where you can debug it (that's reason enough for me)
- Its NOT clean code seperation

If you are doing any more than trivial conditional evaluation in templates then 
it is not clean markup. Its also good to keep your templates and page classes 
as minimalistic as possible so that your UI can  become pluggable if ever 
required. 

Cheers,
Peter


- Original Message -
From: "Katia Aresti Gonzalez" 
To: "Tapestry users" 
Sent: Tuesday, 14 September, 2010 12:35:43 GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: Re: Alternating table rows

For java CSS logic reticent people :

Imagine you need more complex css logic depending not only on even/odd row,
but on the number of the elements you have in your table too, or even the
values of these elements, and depending on a pagination component too. How
will you TML look like ? like an old horrible JSP. Not only that, you won't
be able to do everything you did before to manage this kind of logic, as TML
are correct XML files.

I think that putting this kind "css logic" in the TML is just a bad idea.
This is the way to code JSP. JSP-s are not readable, they are a pain, and
separation between class and code is just not true in real world (In JSP, we
usually had to put java code to manage this kind of logic).
You will repeat yourself all over and over in your application, your code
won't be readable, neither cleaner, maintainable and you separation between
styles and just code won't be better.

Think in "odd" and "even" as identifiers, and let to your TML to add another
css class too, just as an example for your case like this :



If you have a look to Tapestry Grid component source code, you will see how,
for example, the generic CSS name as "t-first" or "t-last" are applied to
the first and last row. You can add your own css class too to the grid, this
class will be rendered, so within t-first and t-last, you will be able to
overload a different style just for the first or the last row in the Grid.
MCV pattern just works perfect.


2010/9/14 Gunnar Eketrapp 

> Hi John! (Still alive ?)
>
> I was also frustrated about the simplicity of the template language at the
> start.
> You can't (or couldn't even) negate a test!
>
> But the philosophy of T5 is to put all logic in java ... and after using T5
> succesfully in a big rewrite of an existing site I must say that I agree
> with this.
>
> I added following utility methods in my base class ...
>
>//
> ---
>// -- Utility methods for all our children --
>//
> ---
>
>private boolean odd = true;
>
> public String getOddOrEvenStep() {
> odd = !odd;
> return odd ? "odd" : "even";
> }
>  public String getOddOrEvenStay() {
> return odd ? "odd" : "even";
> }
>
>
> /Gunnar Eketrapp
>
> 2010/9/14 John Doe 
>
> > Yes, I could do that, but that would mean putting CSS in Java classes and
> I
> > would prefer avoiding that.
> >
> > Does Tapestry 5 have any support for conditions like "index % 2 == 0" in
> > templates?
> >
> >
> >
> >
> > 
> > From: Stephan Windmüller 
> > To: users@tapestry.apache.org
> > Sent: Tue, September 14, 2010 11:17:03 AM
> > Subject: Re: Alternating table rows
> >
> > On 14.09.2010 10:01, John Doe wrote:
> >
> > > How can I make the alternating rows?
> >
> > Use the following code:
> >
> > private boolean switch;
> >
> > public String getSwitchedClass() {
> >switch = !switch;
> >
> >return switch ? "odd" : "even";
> > }
> >
> > And in the tml:
> >
> > 
> >
> > HTH
> > Stephan
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
> >
> >
>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
> Allévägen 2A, 132 42 Saltsjö-Boo
>

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



Re: How to set up Tapestry 5 on Tomcat 5

2010-09-13 Thread Peter Stavrinides
One correction, you are referring to Tomcat 5, so the link is here:
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html

Beware the classloader has changed in Tomcat 6, there are some considerations 
when upgrading , but why not use 6 or even 7?

Cheers,
Peter

- Original Message -
From: "P Stavrinides" 
To: "Tapestry users" 
Sent: Monday, 13 September, 2010 10:53:54 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: How to set up Tapestry 5 on Tomcat 5

Hi,

First off let me say there is no right or wrong, just what works best for each 
person/organization.

> 1) I install maven on my PC, where I will develop Tapestry web applications.
> 2) Maven will download any missing dependencies, and place them inside my
> apps lib folder.
Some people loath Maven others love it, but Maven excels in alleviating 
dependency management issues, an inherent weakness in Java. To elaborate a 
little... library issues are the pits to track down and fix, so you don't want 
any versioning mistakes or a mismatch of jars in development vs. production, 
something that tends to happen all too often, especially when more than one 
person is involved.

On this point, I would also suggest you deploy all your libs in your 
application war (local lib folder), and as little as possible in your shared 
folder... I am sure there will be mixed feelings on this issue, as some may 
argue the drawbacks (i.e.: additional resources and class-loading, deployment 
of larger wars), but the benefits are far greater in my experience (simpler 
'lighter' container, less chance of resource conflicts or configuration errors, 
threading and memory errors... a leaky jar can bring down your server and all 
your apps! but what's far worse is when it simply degrades performance, which 
is even harder to trace). So be very picky as to what goes into shared, and 
this is the approach advocated in the docs, here: 
http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html#Class_Loader_Definitions

Cheers,
Peter




- Original Message -
From: "Christopher Dodunski" 
To: users@tapestry.apache.org
Sent: Monday, 13 September, 2010 02:40:38 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: How to set up Tapestry 5 on Tomcat 5

Hi,

Thank you everyone for your help.  For the sake of clarification (please
correct me where I am wrong):


3) I can then test run my Tapestry application locally on a local
installation of Tomcat.

Now, to deployment:

1) I upload the WAR to my VPS via Tomcat manager (i.e. VPS installation of
Tomcat).
2) Assuming Tomcat there provides the same dependencies as Tomcat locally
(tomcat/shared/lib), my Tapestry application should run fine.

Is it the usual practice to rely on maven to place all dependencies inside
the applications 'lib' folder?  Rather than me manually place required
libraries - once and for all - inside tomcat/shared/lib on both Tomcat on
my PC AND Tomcat on my VPS?  Should maven be installed on my VPS?

Thanks & regards,

Chris.


-
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: OT: Web Services

2010-08-30 Thread Peter Stavrinides
... sorry to leach on this thread, but perhaps a short blog on integrating 
Metro or CXF with Tapestry would be useful. 

cheers,
Peter

- Original Message -
From: "Kristian Marinkovic" 
To: "Tapestry users" 
Sent: Monday, 30 August, 2010 16:22:40 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: OT: Web Services

hi,

i use a (JaxWS)HttpServletRequestFilter service to intercept WS calls to 
my application. it will only intercept calls that have the url pattern of 
the provided WS that can be configured. and i'm using metro too. we 
switched from cxf to metro because it was easier to work with jaxb-binding 
overrides...

g,
kris



Von:Peter Stavrinides 
An: Tapestry users 
Datum:  30.08.2010 14:59
Betreff:Re: OT: Web Services



Hi Jim

I evaluated quite a few Java WS stacks and was between CXF and Metro, but 
in the end I chose metro, but to be honest there was very little to choose 
btw the two... so I would suggest those two as the leading Java WS stacks. 
Both support maven and are very complete in terms of how much of the web 
service set of standards they support. 

Metro implements JAXWS 2.1 and JAXB2.2, so if the marketing babble is to 
be trusted its 'meant' to be higher performing and more extensible, but I 
haven't tested that claim yet. In any event it has an impressive array of 
security features. It also ships with the standard glassfish installation, 
which means no server configuration is needed if you go that route, I 
installed it though with Tomcat, it was as easy as executing a script... 
not too hard at all. 

Depending how you wish to approach you applications, you can use 
annotations for the meta programming, and avoid a lot of the messy xml. I 
found it to be really clean and the closest to Microsofts .Net platform 
implementation which is IMHO a very good implementation of Web Services 
...at least more impressive than anything I have seen in the Java 
community, but I feel the gap is closing slowly.

To integrate with Tapestry I simply overrode Tapestry filter... I am not 
aware of any more elegant approach, although I made a few inquiries on 
this list in the past. 

Cheers,
Peter

- Original Message -
From: "Jim O'Callaghan" 
To: "Tapestry users" 
Sent: Monday, 30 August, 2010 10:52:44 GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: RE: OT: Web Services

Kalle, Daniel,

Thanks for the responses.  Good to know that there are positive 
experiences
with CXF.  It's probably the front-runner for me at the moment, but will
keep an ear open for any other feedback.  Looking at my original query I 
can
see that it looks like I am focusing on generating WS clients - I should
have said "providing interfaces for a system" rather than "interfacing 
with
a system".

Regards,
Jim.

-Original Message-
From: Kalle Korhonen [mailto:kalle.o.korho...@gmail.com] 
Sent: 30 August 2010 03:43
To: Tapestry users
Subject: Re: OT: Web Services

Second that. CXF is the successor to XFire and its solid.

Kalle


On Sun, Aug 29, 2010 at 3:56 PM, Daniel Honig 
wrote:
> I know of many projects using CXF without complaints.  I'd say that CXF 
is
> probably a good way to go.
>
> On Sun, Aug 29, 2010 at 1:35 PM, Jim O'Callaghan
> wrote:
>
>> I'm aware this is off topic, but since there are so many people on the
list
>> with a broad skill set am hoping I can learn from their experiences /
>> heartbreak.  I am evaluating various WS stacks for interfacing with a
>> system
>> - currently I am using XFire as it requires very little configuration 
and
>> performs quite efficiently.  XFire appears to qualify every xml element
>> with
>> a namespace, bloating the payload considerably, or, if using the patch
from
>> http://jira.codehaus.org/browse/XFIRE-687 appears to have unreliable /
>> inconsistent namespace qualifiers.  Can anyone recommend a good WS 
stack
>> they have positive experience of?  My constraints are quite liberal -
java
>> 1.5 up, currently jetty as an AS, spring 3.0.2.RELEASE.  Is CXF any 
good?
>>  I
>> want to find something with good performance obviously, minimal config,
and
>> hopefully something that consistently defines package level namespaces 
at
>> an
>> envelope level and reuses them.
>>
>>
>>
>> Many thanks,
>>
>> Jim.
>>
>>
>

-
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: OT: Web Services

2010-08-30 Thread Peter Stavrinides
Hi Jim

I evaluated quite a few Java WS stacks and was between CXF and Metro, but in 
the end I chose metro, but to be honest there was very little to choose btw the 
two... so I would suggest those two as the leading Java WS stacks. Both support 
maven and are very complete in terms of how much of the web service set of 
standards they support. 

Metro implements JAXWS 2.1 and JAXB2.2, so if the marketing babble is to be 
trusted its 'meant' to be higher performing and more extensible, but I haven't 
tested that claim yet. In any event it has an impressive array of security 
features. It also ships with the standard glassfish installation, which means 
no server configuration is needed if you go that route, I installed it though 
with Tomcat, it was as easy as executing a script... not too hard at all. 

Depending how you wish to approach you applications, you can use annotations 
for the meta programming, and avoid a lot of the messy xml. I found it to be 
really clean and the closest to Microsofts .Net platform implementation which 
is IMHO a very good implementation of Web Services ...at least more impressive 
than anything I have seen in the Java community, but I feel the gap is closing 
slowly.

To integrate with Tapestry I simply overrode Tapestry filter... I am not aware 
of any more elegant approach, although I made a few inquiries on this list in 
the past. 

Cheers,
Peter

- Original Message -
From: "Jim O'Callaghan" 
To: "Tapestry users" 
Sent: Monday, 30 August, 2010 10:52:44 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: RE: OT: Web Services

Kalle, Daniel,

Thanks for the responses.  Good to know that there are positive experiences
with CXF.  It's probably the front-runner for me at the moment, but will
keep an ear open for any other feedback.  Looking at my original query I can
see that it looks like I am focusing on generating WS clients - I should
have said "providing interfaces for a system" rather than "interfacing with
a system".

Regards,
Jim.

-Original Message-
From: Kalle Korhonen [mailto:kalle.o.korho...@gmail.com] 
Sent: 30 August 2010 03:43
To: Tapestry users
Subject: Re: OT: Web Services

Second that. CXF is the successor to XFire and its solid.

Kalle


On Sun, Aug 29, 2010 at 3:56 PM, Daniel Honig 
wrote:
> I know of many projects using CXF without complaints.  I'd say that CXF is
> probably a good way to go.
>
> On Sun, Aug 29, 2010 at 1:35 PM, Jim O'Callaghan
> wrote:
>
>> I'm aware this is off topic, but since there are so many people on the
list
>> with a broad skill set am hoping I can learn from their experiences /
>> heartbreak.  I am evaluating various WS stacks for interfacing with a
>> system
>> - currently I am using XFire as it requires very little configuration and
>> performs quite efficiently.  XFire appears to qualify every xml element
>> with
>> a namespace, bloating the payload considerably, or, if using the patch
from
>> http://jira.codehaus.org/browse/XFIRE-687 appears to have unreliable /
>> inconsistent namespace qualifiers.  Can anyone recommend a good WS stack
>> they have positive experience of?  My constraints are quite liberal -
java
>> 1.5 up, currently jetty as an AS, spring 3.0.2.RELEASE.  Is CXF any good?
>>  I
>> want to find something with good performance obviously, minimal config,
and
>> hopefully something that consistently defines package level namespaces at
>> an
>> envelope level and reuses them.
>>
>>
>>
>> Many thanks,
>>
>> Jim.
>>
>>
>

-
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 IllegalAccessError in 5.2 alpha [bug?]

2010-08-12 Thread Peter Stavrinides
Just my two cents regarding:
>  binder.bind(MyInterface.class, MyImplementation.class).preventReloading();

Since Tapestry knows it can't reload package private or protected services, 
surely then it should not attempt to? If convention over configuration is 
embraced then the framework should only reload for public constructors, and 
disregard the rest, the above code should not be a requirement for the 
developer... its ugly and obscure. 

And a last comment, lets bear in mind that this is an Alpha release so is not 
yet perfect, despite some valid points raised.

regards,
Peter

- Original Message -
From: "Peter Stavrinides" 
To: "Tapestry users" 
Sent: Thursday, 12 August, 2010 10:19:08 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Another IllegalAccessError in 5.2 alpha [bug?]

Thanks for the help Howard... it makes perfect sense when you understand whats 
happening, otherwise we have no chance of guessing it from this error.

Cheers,
Peter

- Original Message -
From: "Howard Lewis Ship" 
To: "Tapestry users" 
Sent: Wednesday, 11 August, 2010 19:54:58 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Another IllegalAccessError in 5.2 alpha [bug?]

You can see these kinds of exceptions for a service implementation
that accesses protected or package private members of another class.
Because the service implementation class is loaded in a new
ClassLoader (to support live class reloading), it is considered to be
in a different Java package from the other classes (even though this
new package has the exact same name). When the specially loaded code
accesses those private members, this is recognized by the JVM which
throws the exception you are seeing.

You should either make those other members (including constructors)
public OR mark the service in question as not live-reloadable.  This
can be accomplished as:

public static void bind(ServiceBinder binder)
{
  binder.bind(MyInterface.class, MyImplementation.class).preventReloading();
}

On Wed, Aug 11, 2010 at 12:42 AM, Vjeran Marcinko
 wrote:
> Hello,
>
> I tried to port my 5.1 app to 5.2 alpha, and also got IllegalAccessError.
>
> I have my own ComponentRequestFilter implementation (for Hibernate session
> management) registered naturally in Tapestry's module class (service
> package), and IllegalAccessError is raised when this filter tries to access
> other helper class from same package.
>
> My filter and mentioned helper classes is located in my arbitrary package
> /my/arbitrary/package
>
> I thought maybe some packaging policy has been changed since 5.1 to 5.2, so
> I tried to move all classes (filter and helpers) to "service" package since
> that's where Tapestry's module class is located and references filter, but
> to no avail. Same error occurs.
>
> I guess this is bug then, since I can see Peter has mentioned similar error.
>
> Regards,
> Vjeran
>
> - Original Message - From: 
> Newsgroups: gmane.comp.java.tapestry.user
> To: "Tapestry users" 
> Sent: Tuesday, August 10, 2010 1:49 PM
> Subject: Re: Tapestry 5.2.0 Alpha Release Now Available
>
>
>> I guess you're autobuilding a service (AlertFilterCacheRepositoryImpl)
>> with a constructor that receives two Strings. Am I right?
>
> Not quite, there is no explicit auto-loading, I simply build my IoC registry
> adding a bunch of modules to it in the process... the constructor for that
> service looks like this:
>
> public AlertFilterCacheRepositoryImpl(@HfdbDatabase HfdbSession session) {
> session_ = session;
> cache_ = new
> LookupCacheWrapper(AlertFilterDigest.class);
> }
>
>
> The annotation is a marker, followed by an interface and all this does is
> simply determine the database to reference, the cache object is constructed
> and also populated, its all pretty innocuous so I don't see how it relates
> to the IllegalAccessError?
>
> Peter
>
>
>
>
> - Original Message -
> From: "Thiago H. de Paula Figueiredo" 
> To: "Tapestry users" 
> Sent: Tuesday, 10 August, 2010 13:58:58 GMT +02:00 Athens, Beirut,
> Bucharest, Istanbul
> Subject: Re: Tapestry 5.2.0 Alpha Release Now Available
>
> On Tue, 10 Aug 2010 05:30:32 -0300,  wrote:
>
>> Hi Guys,
>
> Hi!
>
>> I just tried the upgrade from 5.1, but having no luck getting it
>> running, I am getting this exception:
>
>> Caused by: java.lang.IllegalAccessError: tried to access method
>>
>> com.albourne.db.alert.cache.AlertFilterDigest.(IILjava/lang/String;Ljava/lang/String;)V
>> > from class com.albourne.db.alert.cache.AlertFilterCacheRepositoryImpl
>
> I guess you're autobuilding a service (AlertFilterCacheRepositoryImpl)
> w

Re: Another IllegalAccessError in 5.2 alpha [bug?]

2010-08-12 Thread Peter Stavrinides
Thanks for the help Howard... it makes perfect sense when you understand whats 
happening, otherwise we have no chance of guessing it from this error.

Cheers,
Peter

- Original Message -
From: "Howard Lewis Ship" 
To: "Tapestry users" 
Sent: Wednesday, 11 August, 2010 19:54:58 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Another IllegalAccessError in 5.2 alpha [bug?]

You can see these kinds of exceptions for a service implementation
that accesses protected or package private members of another class.
Because the service implementation class is loaded in a new
ClassLoader (to support live class reloading), it is considered to be
in a different Java package from the other classes (even though this
new package has the exact same name). When the specially loaded code
accesses those private members, this is recognized by the JVM which
throws the exception you are seeing.

You should either make those other members (including constructors)
public OR mark the service in question as not live-reloadable.  This
can be accomplished as:

public static void bind(ServiceBinder binder)
{
  binder.bind(MyInterface.class, MyImplementation.class).preventReloading();
}

On Wed, Aug 11, 2010 at 12:42 AM, Vjeran Marcinko
 wrote:
> Hello,
>
> I tried to port my 5.1 app to 5.2 alpha, and also got IllegalAccessError.
>
> I have my own ComponentRequestFilter implementation (for Hibernate session
> management) registered naturally in Tapestry's module class (service
> package), and IllegalAccessError is raised when this filter tries to access
> other helper class from same package.
>
> My filter and mentioned helper classes is located in my arbitrary package
> /my/arbitrary/package
>
> I thought maybe some packaging policy has been changed since 5.1 to 5.2, so
> I tried to move all classes (filter and helpers) to "service" package since
> that's where Tapestry's module class is located and references filter, but
> to no avail. Same error occurs.
>
> I guess this is bug then, since I can see Peter has mentioned similar error.
>
> Regards,
> Vjeran
>
> - Original Message - From: 
> Newsgroups: gmane.comp.java.tapestry.user
> To: "Tapestry users" 
> Sent: Tuesday, August 10, 2010 1:49 PM
> Subject: Re: Tapestry 5.2.0 Alpha Release Now Available
>
>
>> I guess you're autobuilding a service (AlertFilterCacheRepositoryImpl)
>> with a constructor that receives two Strings. Am I right?
>
> Not quite, there is no explicit auto-loading, I simply build my IoC registry
> adding a bunch of modules to it in the process... the constructor for that
> service looks like this:
>
> public AlertFilterCacheRepositoryImpl(@HfdbDatabase HfdbSession session) {
> session_ = session;
> cache_ = new
> LookupCacheWrapper(AlertFilterDigest.class);
> }
>
>
> The annotation is a marker, followed by an interface and all this does is
> simply determine the database to reference, the cache object is constructed
> and also populated, its all pretty innocuous so I don't see how it relates
> to the IllegalAccessError?
>
> Peter
>
>
>
>
> - Original Message -
> From: "Thiago H. de Paula Figueiredo" 
> To: "Tapestry users" 
> Sent: Tuesday, 10 August, 2010 13:58:58 GMT +02:00 Athens, Beirut,
> Bucharest, Istanbul
> Subject: Re: Tapestry 5.2.0 Alpha Release Now Available
>
> On Tue, 10 Aug 2010 05:30:32 -0300,  wrote:
>
>> Hi Guys,
>
> Hi!
>
>> I just tried the upgrade from 5.1, but having no luck getting it
>> running, I am getting this exception:
>
>> Caused by: java.lang.IllegalAccessError: tried to access method
>>
>> com.albourne.db.alert.cache.AlertFilterDigest.(IILjava/lang/String;Ljava/lang/String;)V
>> > from class com.albourne.db.alert.cache.AlertFilterCacheRepositoryImpl
>
> I guess you're autobuilding a service (AlertFilterCacheRepositoryImpl)
> with a constructor that receives two Strings. Am I right?
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

-

Re: Tapestry 5.2.0 Alpha Release Now Available

2010-08-11 Thread Peter Stavrinides
Yes, I think this could be the issue, thanks Igor! I will follow up with more 
info once I am certain.

- Original Message -
From: "Igor Drobiazko" 
To: "Tapestry users" 
Sent: Tuesday, 10 August, 2010 20:03:54 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Tapestry 5.2.0 Alpha Release Now Available

Is your constructor protected or package private? There is a know issue in
5.2:

https://issues.apache.org/jira/browse/TAP5-1233

On Tue, Aug 10, 2010 at 10:30 AM,  wrote:

> Hi Guys,
>
> Congrats on the milestone alpha release!
>
> I just tried the upgrade from 5.1, but having no luck getting it running, I
> am getting this exception:
>
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>at
> org.apache.tapestry5.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:62)
>at
> org.apache.tapestry5.ioc.internal.ReloadableServiceImplementationObjectCreator.createInstance(ReloadableServiceImplementationObjectCreator.java:51)
>at
> org.apache.tapestry5.ioc.internal.AbstractReloadableObjectCreator$1.invoke(AbstractReloadableObjectCreator.java:127)
>at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65)
> at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
> at
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1057)
>at
> org.apache.tapestry5.ioc.internal.AbstractReloadableObjectCreator.createInstance(AbstractReloadableObjectCreator.java:119)
>at
> org.apache.tapestry5.ioc.internal.AbstractReloadableObjectCreator.createObject(AbstractReloadableObjectCreator.java:112)
>at
> org.apache.tapestry5.ioc.internal.ReloadableObjectCreatorSource.createReloadableProxy(ReloadableObjectCreatorSource.java:74)
>at
> org.apache.tapestry5.ioc.internal.ReloadableObjectCreatorSource.access$000(ReloadableObjectCreatorSource.java:27)
>at
> org.apache.tapestry5.ioc.internal.ReloadableObjectCreatorSource$1.createObject(ReloadableObjectCreatorSource.java:55)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65)
> at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
> at
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1057)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49)
>at
> org.apache.tapestry5.ioc.internal.SingletonServiceLifecycle.createService(SingletonServiceLifecycle.java:29)
>at
> org.apache.tapestry5.ioc.internal.LifecycleWrappedServiceCreator.createObject(LifecycleWrappedServiceCreator.java:46)
>at
> org.apache.tapestry5.ioc.internal.AdvisorStackBuilder.createObject(AdvisorStackBuilder.java:60)
>at
> org.apache.tapestry5.ioc.internal.InterceptorStackBuilder.createObject(InterceptorStackBuilder.java:52)
>at
> org.apache.tapestry5.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:60)
>at
> org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65)
> at
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
> at
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1057)
> at
> org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49)
>at
> org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:68)
>at
> org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:57)
> at
> org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.eagerLoadService(JustInTimeObjectCreator.java:89)
>at
> org.apache.tapestry5.ioc.internal.RegistryImpl.performRegistryStartup(RegistryImpl.java:303)
>at
> org.apache.tapestry5.ioc.internal.RegistryWrapper.performRegistryStartup(RegistryWrapper.java:73)
>at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:104)
>at
> org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
>at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>at
> org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
>a

Re: Tapestry 5.2.0 Alpha Release Now Available

2010-08-10 Thread Peter Stavrinides
> Does your class have nother constructors?
No

- Original Message -
From: "Thiago H. de Paula Figueiredo" 
To: "Tapestry users" 
Sent: Tuesday, 10 August, 2010 15:44:03 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Tapestry 5.2.0 Alpha Release Now Available

On Tue, 10 Aug 2010 08:53:09 -0300, Peter Stavrinides  
 wrote:

>> Not quite, there is no explicit auto-loading,
> Sorry Thiago, I misread you, yes the service is autobuilding since its  
> explicitly bound.

Does your class have nother constructors?

-- 
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: Tapestry 5.2.0 Alpha Release Now Available

2010-08-10 Thread Peter Stavrinides
> Not quite, there is no explicit auto-loading,
Sorry Thiago, I misread you, yes the service is autobuilding since its 
explicitly bound.

Cheers,
Peter

- Original Message -
From: "P Stavrinides" 
To: "Tapestry users" 
Sent: Tuesday, 10 August, 2010 14:49:21 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Tapestry 5.2.0 Alpha Release Now Available

> I guess you're autobuilding a service (AlertFilterCacheRepositoryImpl)  
> with a constructor that receives two Strings. Am I right?

Not quite, there is no explicit auto-loading, I simply build my IoC registry 
adding a bunch of modules to it in the process... the constructor for that 
service looks like this:

public AlertFilterCacheRepositoryImpl(@HfdbDatabase HfdbSession session) {
session_ = session;
cache_ = new 
LookupCacheWrapper(AlertFilterDigest.class);
}


The annotation is a marker, followed by an interface and all this does is 
simply determine the database to reference, the cache object is constructed and 
also populated, its all pretty innocuous so I don't see how it relates to the 
IllegalAccessError?

Peter




- Original Message -
From: "Thiago H. de Paula Figueiredo" 
To: "Tapestry users" 
Sent: Tuesday, 10 August, 2010 13:58:58 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Tapestry 5.2.0 Alpha Release Now Available

On Tue, 10 Aug 2010 05:30:32 -0300,  wrote:

> Hi Guys,

Hi!

> I just tried the upgrade from 5.1, but having no luck getting it  
> running, I am getting this exception:

> Caused by: java.lang.IllegalAccessError: tried to access method  
> com.albourne.db.alert.cache.AlertFilterDigest.(IILjava/lang/String;Ljava/lang/String;)V
>   
> > from class com.albourne.db.alert.cache.AlertFilterCacheRepositoryImpl

I guess you're autobuilding a service (AlertFilterCacheRepositoryImpl)  
with a constructor that receives two Strings. Am I right?

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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


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


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



Re: Zoneupdater mixin best practice

2010-07-23 Thread Peter Stavrinides
> To not lose the field values, submit the form.
Well thats kind of what I hoped to avoid

> To update just one field, you can create an event and trigger and handle  
> it with a little bit of custom JavaScript and the JSON classes in Tapestry.
If this is the best approach then can someone suggest an example please

Cheers,
Peter


- Original Message -
From: "Thiago H. de Paula Figueiredo" 
To: "Tapestry users" 
Sent: Friday, 23 July, 2010 15:49:03 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Zoneupdater mixin best practice

On Fri, 23 Jul 2010 07:40:18 -0300, Peter Stavrinides  
 wrote:

> Hi all,

Hi!

> To be more specific, I am using the Zoneupdater (code below) with a zone  
> that encloses a form, and the form encloses several textfields. For my  
> use case I only want to target one specific form element but don't know  
> how to avoid the zone refreshing everything. I.e.: As it stands now, any  
> input in other fields in the form is lost whenever I make a selection  
> from the drop down menu due to the zone update, is there another way?

To not lose the field values, submit the form.

To update just one field, you can create an event and trigger and handle  
it with a little bit of custom JavaScript and the JSON classes in Tapestry.

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



Zoneupdater mixin best practice

2010-07-23 Thread Peter Stavrinides
Hi all,

I am trying out the Zoneupdater mixin on a dropdown. What I want to do is as 
follows:

When the user selects an option from the dropdown I want to trigger an event 
that filters a list, which is then used on an autocomplete textfield. Sounds 
simple enough but I don't quite understanding how to use the Zoneupdater to 
target only specific fields in my form without changing the other fields. 

To be more specific, I am using the Zoneupdater (code below) with a zone that 
encloses a form, and the form encloses several textfields. For my use case I 
only want to target one specific form element but don't know how to avoid the 
zone refreshing everything. I.e.: As it stands now, any input in other fields 
in the form is lost whenever I make a selection from the drop down menu due to 
the zone update, is there another way? 

.tml:


 
   

   
   

   




.java:

Object onChangeOfCountry() {
country = request_.getParameter("param");
return siteZone_.getBody();
}

Thanks in advance,
Peter


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



Re: directly return an image from Tapestry

2010-07-21 Thread Peter Stavrinides
> Just return it in the page's onActivate() method.
Just be careful of this approach, its fine for an image or two, but anything 
more may generate a lot of requests and cause performance problems in larger 
pages.


- Original Message -
From: "Thiago H. de Paula Figueiredo" 
To: "Tapestry users" 
Sent: Wednesday, 21 July, 2010 01:22:31 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: directly return an image from Tapestry

On Tue, 20 Jul 2010 19:15:33 -0300, Chuck Kring   
wrote:

> Hi everybody,

Hi!

> I don't want to handle this as an event on the watched page because I'm  
> not sure how Tapestry will handle the event if the server has restarted.

It will, no doubt about that.

> So, it is possible for a Tapestry page to return a streamresponse?

Just return it in the page's onActivate() method.

-- 
Thiago H. de Paula Figueiredo
Consultor, desenvolvedor e instrutor em Java, Tapestry e Hibernate
Coordenador e professor da Especialização em Engenharia de Software com  
Ênfase em Java da Faculdade Pitágoras
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: [ANN] Manning Publications translates my Tapestry 5 book

2010-06-18 Thread Peter Stavrinides
Hi Igor,

Please let us know when the book is ready for pre-order.

thanks,
Peter

- Original Message -
From: "Robin Komiwes" 
To: "Tapestry users" , "adam saltiel" 

Sent: Saturday, 12 June, 2010 23:38:34 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: [ANN] Manning Publications translates my Tapestry 5 book

Igor, it just rocks.

On Sat, Jun 12, 2010 at 5:31 PM, Adam Saltiel  wrote:
> Well done. Are you allowed to update it as necessary? My understanding is 
> that it is very comprehensive. This is good news for everyone interested in 
> Tapestry development.
> I have worked on a site architected by Igor using good Tapestry solutions. So 
> certainly interests me.
>
> Adam
> --Original Message--
> From: Markus Feindler
> To: Tapestry users
> ReplyTo: Tapestry users
> Subject: Re: [ANN] Manning Publications translates my Tapestry 5 book
> Sent: 11 Jun 2010 19:35
>
> Great news, I enjoyed reading the german version of your book!
>> Congratulations !! ;-)
>>
>>
>> El 11/06/2010 1:03, Igor Drobiazko escribió:
>>> Hello folks,
>>>
>>> great news for all of you who wished my Tapestry 5 book to be translated
>>> into English. Manning Publications informed me today that the
>>> translation
>>> agreement is finalized. We start working on the English version of
>>> the book.
>>>
>>> Read more on my blog:
>>>
>>> http://blog.tapestry5.de/index.php/2010/06/11/manning-publications-translates-my-tapestry-5-book/
>>>
>>>
>>>
>>
>>
>> -
>> 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
>
>
>
> Sent using BlackBerry® from Orange

-
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: session.persist saves object with id 0

2010-06-08 Thread Peter Stavrinides
Perhaps the type is a primitive, so instead of null a default value will be 0? 
just a guess.

Peter


- Original Message -
From: "Genís Pujol" 
To: "Tapestry users" 
Sent: Tuesday, 25 May, 2010 18:30:10 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: session.persist saves object with id 0

Hello,

After checking the tutorial I was trying to do a basic crud app, but 
somehow after submiting the form (beaneditform) the new object is saved 
into the database with id 0.

I'm also new to hibernate so I don't know why in the tapestry tutorial  
is enough with session.persist(object), what happened to the factory, 
session.commit, session.close and the Transaction object? is that all 
included with the @CommitAfter annotation?


Any idea why a new object would be saved with id 0?

regards,

Genis

-
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: [Announce] Tapestry5 jQuery integration and Tapestry5-ClientResources

2010-06-01 Thread Peter Stavrinides
Hi Robin,

Thanks for the extra info, much appreciated! and +1 for a short blog! would 
help those of us looking to migrate.

cheers,
Peter

 


- Original Message -
From: "Robin Komiwes" 
To: "Tapestry users" 
Sent: Tuesday, 1 June, 2010 11:57:26 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: [Announce] Tapestry5 jQuery integration and 
Tapestry5-ClientResources

 - How does that work, does Tapestry not require 'tapestry.js' or does
jquery provide some equivalent?

This module comes with a new tapestry.js [1] which is my vision of the
agnostic layer (java equivalent would be an interface).
Then there is a tapestry-jquery.js [2] , which is the implementation of
tapestry.js with jQuery (java equivalent would be implementation class)

Original tapestry.js is dropped with the help of tapestry5-clientresources
library [3]


<http://github.com/got5/tapestry5-jquery/blob/master/src/main/resources/org/got5/tapestry5/jquery/tapestry-jquery.js>
-
How would jQuery integrate with existing applications that use tapestry AJAX
/ prototype features?

This library aims 100% jQuery websites. Integration with existing
applications should not be a problem if you did not code additional
Prototype/Scriptaculous JavaScript. Just run the integration tests of this
library if you want a proof, they run tests against the same application:
one time with jQuery, another time with Prototype!

If you want to use both Prototype and jQuery, then simply activate
jQuery.noConflict() [4].

The thing is that I rely on the same methods specifications than the
original tapestry.js, then it's transparent in most cases.

For some component I didn't manage to integrate jQuery without modifying the
component Java class. (Most of the time simply because of the very
restrictive @IncludeJavascriptLibrary annotation...). For theses components
I had to fork the original Java class (see [5] for an example on Palette)

See README.md [6] for complete list of components:
- integrated in a transparent way
- which are a fork of core tapestry components

The good thing with the jQuery library is that with are aiming to integrate
lots of jQuery plugins. Dialog component is just the first one of a long
list!

Mmm, I feel like I should blog on this subject. :)

[1]
http://github.com/got5/tapestry5-jquery/blob/master/src/main/resources/org/got5/tapestry5/tapestry.js
<http://github.com/got5/tapestry5-jquery/blob/master/src/main/resources/org/got5/tapestry5/tapestry.js>
[2]
http://github.com/got5/tapestry5-jquery/blob/master/src/main/resources/org/got5/tapestry5/jquery/tapestry-jquery.js
[3] http://github.com/got5/tapestry5-clientresources
[4] http://docs.jquery.com/Using_jQuery_with_Other_Libraries
[5]
http://github.com/got5/tapestry5-jquery/blob/master/src/main/java/org/got5/tapestry5/jquery/components/Palette.java
[6] http://github.com/got5/tapestry5-jquery/blob/master/README.md

On Tue, Jun 1, 2010 at 10:05 AM, Peter Stavrinides <
p.stavrini...@albourne.com> wrote:

> Hi
>
> What do you mean by:
> " This library fully drop out Prototype, Scriptaculous, Blackbird and
> tapestry.js and replace them by jQuery."
>
>  - How does that work, does Tapestry not require 'tapestry.js' or does
> jquery provide some equivalent?
>  - How would jQuery integrate with existing applications that use tapestry
> AJAX / prototype features?
>
> I get the impression you could only use this module for a new application,
> am I correct in thinking this?
>
> cheers,
> Peter
>
>
>
>
>
> - Original Message -
> From: "Robin Komiwes" 
> To: "Tapestry users" 
> Sent: Wednesday, 28 April, 2010 12:54:18 GMT +02:00 Athens, Beirut,
> Bucharest, Istanbul
> Subject: [Announce] Tapestry5 jQuery integration and
> Tapestry5-ClientResources
>
> Hey there,
>
> We are glad to introduce "tapestry5-jquery": a jQuery integration
> for Tapestry 5! This integration is already available as a maven
> artifact. This library fully drop out Prototype, Scriptaculous, Blackbird
> and tapestry.js and replace them by jQuery.
>
> We did our best to make this integration as transparent as possible. An
> important part of components can still be used as is! We tried to stick the
> more we can to jQuery philosophy. All code is based on official jQuery
> coding style guidelines and on existing plugins.
>
> jQuery for Tapestry 5 has been a long time request from an important part
> of
> Tapestry community. There was some discussions about it and Tapestry 5.2
> should provide some built in bridges for other JavaScript frameworks
> integration, however there is no chance to see that for Tapestry 5.1.x.
>
> Currently, the module is still in snapshot version and we need feedback
> from
> users before releasing it. We are looking forward to f

Re: [Announce] Tapestry5 jQuery integration and Tapestry5-ClientResources

2010-06-01 Thread Peter Stavrinides
Hi 

What do you mean by: 
" This library fully drop out Prototype, Scriptaculous, Blackbird and 
tapestry.js and replace them by jQuery."

 - How does that work, does Tapestry not require 'tapestry.js' or does jquery 
provide some equivalent? 
 - How would jQuery integrate with existing applications that use tapestry AJAX 
/ prototype features?

I get the impression you could only use this module for a new application, am I 
correct in thinking this?

cheers,
Peter

 



- Original Message -
From: "Robin Komiwes" 
To: "Tapestry users" 
Sent: Wednesday, 28 April, 2010 12:54:18 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: [Announce] Tapestry5 jQuery integration and Tapestry5-ClientResources

Hey there,

We are glad to introduce "tapestry5-jquery": a jQuery integration
for Tapestry 5! This integration is already available as a maven
artifact. This library fully drop out Prototype, Scriptaculous, Blackbird
and tapestry.js and replace them by jQuery.

We did our best to make this integration as transparent as possible. An
important part of components can still be used as is! We tried to stick the
more we can to jQuery philosophy. All code is based on official jQuery
coding style guidelines and on existing plugins.

jQuery for Tapestry 5 has been a long time request from an important part of
Tapestry community. There was some discussions about it and Tapestry 5.2
should provide some built in bridges for other JavaScript frameworks
integration, however there is no chance to see that for Tapestry 5.1.x.

Currently, the module is still in snapshot version and we need feedback from
users before releasing it. We are looking forward to find bugs (if there are
any) and any lack of features... Some (big) choices have been made and as
there is new features, some features that were present with
prototype/scriptaculous are not available anymore.

All source code is available on Github. Don't forget to read the README file
for installation instructions and How To:
http://github.com/got5/tapestry5-jquery


This module comes with a bonus module: "tapestry5-clientresources". It's a
small module also for Tapestry 5.1.0.5 that offers the possibility to
changes default JS and CSS included on each pages. When not using Tapestry 5
default JS stack (prototype, scriptaculous...) it also fix direct calls to
Prototype functions, like already reported
bug TAP5-994 (and fixed in 5.2). Again, check Github for source code and
instructions: http://github.com/got5/tapestry5-clientresources

Of course, we are looking forward to leverage theses modules to Tapestry 5.2
as soon as this version is released.

-- http://github.com/got5

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



Re: What happend to Tapestry 5

2010-05-30 Thread Peter Stavrinides
> Don't worry. Tapestry 5.2 will be released soon.
What is soon? 3, 6, 9, 12 months? 


- Original Message -
From: "Igor Drobiazko" 
To: "Tapestry users" 
Sent: Monday, 31 May, 2010 08:56:53 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: What happend to Tapestry 5

Don't worry. Tapestry 5.2 will be released soon. We've fixed a lot of bugs
and added some cool new stuff in the 5.2 trunk. The feature releases will be
more often.

On Mon, May 31, 2010 at 4:38 AM, Hantsy Bai  wrote:

> The latest tapestry 5.1 was released one year ago, and there is no
> improvement and bugfix release in such a long period.
>
>
> On 05/31/2010 10:19 AM, Christian Edward Gruber wrote:
>
>> Any ETA on this by the way?  I've seen some of the discussions, but didn't
>> get a sense as to when that might be happening.
>>
>> Christian.
>>
>> On May 30, 2010, at 5:38 PM, Igor Drobiazko wrote:
>>
>>  This will hopefully change after the relaunch of the Tapestry's web site.
>>> Robin is working on that.
>>>
>>> On Sun, May 30, 2010 at 10:32 PM, Jakub Vlasak 
>>> wrote:
>>>
>>>  I must agree. I am aware of 5.2 only from this list, but there is no
 info about the progress, what is beeing implemented, changes, etc.

 On Sun, May 30, 2010 at 9:42 PM, Inge Solvoll 
 wrote:

> The man's got a good point. The website makes the project look dead...
> :)
>
> On Sun, May 30, 2010 at 8:53 PM, Josh Canfield  wrote:
>
>  What is a long time? 5.2 is making progress and 5.1.0.5 isn't that
>> old.
>>
>> -- Josh
>>
>>
>> On May 30, 2010, at 11:15 AM, Hantsy Bai  wrote:
>>
>> Hi,
>>
>>> I have use Tapestry 4 before .
>>> Currently I want to promote myself to Tapestry 5(5.1), but I found it
>>>
>> had

> not been updated for a long time.
>>> What means to Tapestry project?
>>>
>>> --
>>> Hantsy Bai
>>> Guangzhou, China
>>> http://hantsy.blogspot.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
>>
>>
>>
>
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org



>>>
>>> --
>>> Best regards,
>>>
>>> Igor Drobiazko
>>> http://tapestry5.de/blog
>>>
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>>
>
> --
> Hantsy Bai
> Guangzhou, China
> http://hantsy.blogspot.com
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Best regards,

Igor Drobiazko
http://tapestry5.de/blog

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



Re: T5: LinkSubmit should be generic

2010-05-21 Thread Peter Stavrinides
Nice!

- Original Message -
From: "Inge Solvoll" 
To: "Tapestry users" 
Sent: Friday, 21 May, 2010 11:34:11 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: T5: LinkSubmit should be generic

Forget the question, I tested it myself and it works :)

See the blog post for the complete working solution, that enables any
element to submit the form and trigger an event, like a regular submit.

http://tinybits.blogspot.com/2010/05/mixin-to-allow-any-element-to-submit.html

On Fri, May 21, 2010 at 9:29 AM, Inge Solvoll wrote:

> After looking at the source code for the LinkSubmit core component, I see a
> lot of potential for a more generic component/mixin that could solve lots of
> other problems.
>
> What I need right now (and quite often) is a Select component that submits
> the form and triggers an event to let the component class know that it was
> the source of the submit. The LinkSubmit source code is very close to doing
> this, the only difference is that it insists on rendering a link.
>
> My questions is:
>
> Is it possible to encapsulate this in a mixin, named something like
> "AnySubmit"? It would only need parameters for "event" and "clientEvent".
>
> I tried, but I don't see how I can use a mixin and still trigger an event
> on submit using ComponentAction. See modified code from LinkSubmit below, is
> this possible to do in a mixin on any component?
>
> private static class ProcessSubmission implements
> ComponentAction {
>
> private final String clientId;
>
> public ProcessSubmission(String clientId) {
>   this.clientId = clientId;
> }
>
> public void execute(MySubmitMixinClass component) {
>   component.processSubmission(clientId);
> }
>   }
>

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



Re: Tapestry 4.0 on JDK 1.6

2010-05-19 Thread Peter Stavrinides
More than 3 years ago we were running Tapestry 4 on JDK 6 with no real issues. 
Tapestry 5 also runs well on JDK 6 provided you use the right version of 
Javassist, and ensure you have no conflicts in your setup.

regards,
Peter
- Original Message -
From: "Howard Lewis Ship" 
To: "Tapestry users" 
Sent: Tuesday, 18 May, 2010 20:04:58 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Tapestry 4.0 on JDK 1.6

We've seen some combinations of JDK 1.6 that cause some problems for
the bytecode library Tapestry uses, Javassist.  However, the way
Tapestry 4.0 works, you are unlikely to hit those problems when using
JDK 1.6.  You will need to experiment a bit, and possibly compile your
pages and components targeting JDK 1.5.


On Tue, May 18, 2010 at 6:00 AM, Thiago H. de Paula Figueiredo
 wrote:
> On Tue, 18 May 2010 09:58:42 -0300, ramachavali 
> wrote:
>
>> Can Tapestry 4.0 work on JDK 1.6?
>
> I don't know why it wouldn't. Sun always took a lot of care with backwards
> compatibility.
>
> --
> 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
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.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.1] How to add a Message Catalog to a Service

2010-04-23 Thread Peter Stavrinides
I also required this a while back, but found not enough of the API was 
available to do what I wanted... I opened up a jira back then:
https://issues.apache.org/jira/browse/TAP5-838

Will this make it into 5.2?

Cheers,
Peter


- Original Message -
From: "Howard Lewis Ship" 
To: "Tapestry users" 
Sent: Thursday, 22 April, 2010 17:21:08 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: [T5.1] How to add a Message Catalog to a Service

That's not currently supported.

I'm expecting to extend the concept of the "global" message catalog to
be a compendium of multiple resources, including
WEB-INF/app.properties but also contributions from libraries. It may
replace the current ValidationMessages mechanism.

On Thu, Apr 22, 2010 at 6:05 AM, Everton Agner
 wrote:
> Hi,
>
> I want to develop a service with it's own Message Catalog, without depending 
> on a Page's or the "Global" App message catalog.
>
> How can I achieve that?
>
> Thanks!
>
> - Everton
>
>
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.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 using 1.3Gb of heap space after capacity testing

2010-04-20 Thread Peter Stavrinides
Hi Andy,

If you are running the defaults, then you might benefit from reducing the 
soft-limit of the pool, and increasing the hard limit, see this old thread: 
http://old.nabble.com/T5:-tapestry.page-pool.hard-limit-for-high-traffic-websites-td22971831.html

Cheers,
Peter


- Original Message -
From: "Thiago H. de Paula Figueiredo" 
To: "Tapestry users" 
Sent: Tuesday, 20 April, 2010 19:47:08 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Tapestry using 1.3Gb of heap space after capacity testing

On Tue, 20 Apr 2010 13:41:37 -0300, Blower, Andy  
 wrote:

> It looks like explicit repeated use of a component, rather than using a  
> single component in a loop, creates a lot more component objects in the  
> heap.

Every  or  is exactly one component, regardless of  
being inside a loop or not. When inside a loop, it's rendered many times,  
but instantiated just once, when the page instance is created. Static  
structure, dynamic behaviour. ;)

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, 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: How to get the Component inside advice?

2010-04-19 Thread Peter Stavrinides
> I hope to have a simple authentication
> framework, possibly as a Tapestry extension, at some point in the next
> couple of months.
Great news  Howard, I will look forward to that!! 


- Original Message -
From: "Howard Lewis Ship" 
To: "Tapestry users" 
Sent: Wednesday, 31 March, 2010 22:59:19 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: How to get the Component inside advice?

Chances are your instanceof is failing because you put the SecurePage
interface into the pages or components package; move it up a level, to
a non-controlled package, so that the services layer and the component
layer can agree.  Anything inside the pages or components packages (or
mixins or base) will be loaded by a different class loader, and this
causes these apparently anomalous ClassCastExceptions.

But Thiago is right, Tapestry has a proper place for this kind of
thing, if you check my blog, you'll see an article where I head down
the same path as you (I've recently done this kind of thing for a
couple of different clients). I hope to have a simple authentication
framework, possibly as a Tapestry extension, at some point in the next
couple of months.


On Wed, Mar 31, 2010 at 12:31 PM, satb  wrote:
>
>> Advice is for services, not pages and components.
>
> Thanks for the response.
>
> Yes. That is true. I want to do one other thing on the methods of the
> service if the request is originating from a "SecurePage" -- which is to
> check the credentials. Isn't advice the right thing for it? Thats what the
> above advice is trying to do except the "instaceof" check is always
> returning false.
>
> I guess what is causing some concern to me is -- why would "component
> instanceof SecurePage" return false?
> --
> View this message in context: 
> http://old.nabble.com/How-to-get-the-Component-inside-advice--tp28100055p28100745.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
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.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 do I set up logging with Tapestry 5 and Tomcat?

2010-04-16 Thread Peter Stavrinides
> You need a log4j.properties file in $CATALINA_HOME/lib
Or in the classes directory at runtime... to ensure its always in the right 
place simply put the log4j.properties or log4j.xml file is in the 
src/main/resources root folder.

regards,
Peter


- Original Message -
From: "Tim Koop" 
To: "Tapestry users" 
Sent: Thursday, 15 April, 2010 17:01:19 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: How do I set up logging with Tapestry 5 and Tomcat?

Good question.

I don't know the answer.

It might have something to do with the fact that I put all my Tapestry 
jars in a common Tomcat lib directory.  It might be different if you put 
them all in your application's lib directory.  That way log4j would only 
start looking for log4j.properties when your application starts, not 
with Tomcat starts.  And it might find it in your WEB-INF/classes directory.


Tim Koop
t...@timkoop.com 
www.timkoop.com 

On 15/04/2010 2:36 AM, Ivano Luberti wrote:
> But if I deploy on a server I cannot control how can I tune my logging?
>
> Il 14/04/2010 23.06, Tim Koop ha scritto:
>
>> To answer my own question, the answer is this:
>>
>> You need a log4j.properties file in $CATALINA_HOME/lib, as this page
>> describes:
>>
>> http://tomcat.apache.org/tomcat-6.0-doc/logging.html
>>
>> As soon as that file was there, my own log4j.properties in my classes
>> folder started to be used.  Just a guess, but I guess that the missing
>> file in Tomcat's directory caused an irrecoverable error with log4j (I
>> did have a log4j error in the Tomcat startup script), so nothing else
>> worked after that.
>>
>> But now it all works fine.
>>
>>
>>
>> Tim Koop
>> t...@timkoop.com
>> www.timkoop.com
>>
>> On 14/04/2010 12:07 PM, Tim Koop wrote:
>>  
>>> Hi everyone.  I've been using Tapestry 5 for a while.  I like it, but
>>> I can't seem to get logging working.
>>>
>>> In my page java class I have this:
>>>
>>> @Inject
>>> private Logger log;
>>>
>>> Object onSuccess() {
>>>  log.debug("Tim was here.");
>>>  return null;
>>> }
>>>
>>> This compiles and runs.  I would like to see that message in a log
>>> file somewhere, but I can't find it anywhere.  I've looked through
>>> Tomcat's logs (catalina, hiost-manager, and manager), and I've looked
>>> on the console that I started Tomcat from, but I can't find it.
>>>
>>> I'm not using the Maven setup.  Apparently it makes a
>>> log4j.properties file somewhere.  I tried making one and I put it in
>>> my WEB-INF/classes folder.  I also tried putting it in WEB-INF/.
>>> Neither seemed to work.  The contents of my log4j.properties file is
>>> this:
>>>
>>> log4j.rootLogger=DEBUG, R
>>> log4j.appender.R=org.apache.log4j.RollingFileAppender
>>> log4j.appender.R.File=C:\\work\\tomcat\\logs\\timslogfile.log
>>> log4j.appender.R.MaxFileSize=10MB
>>> log4j.appender.R.MaxBackupIndex=10
>>> log4j.appender.R.layout=org.apache.log4j.PatternLayout
>>> log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
>>> log4j.logger.org.apache.catalina=ERROR, R
>>>
>>> Does anyone have any ideas?  I'm out of ideas.
>>>
>>> Thanks in advance.
>>>
>>>
>>  
>

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



Re: 5.0.1.8 Download?

2010-04-16 Thread Peter Stavrinides
Is 5.0.1.8 a release candidate yet, are you planning to vote on it?

cheers,
Peter 


- Original Message -
From: "xfile80303" 
To: users@tapestry.apache.org
Sent: Thursday, 1 April, 2010 19:26:48 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: 5.0.1.8 Download?


Thank you Ulrich.  That's what I was looking for.  :)
-- 
View this message in context: 
http://n2.nabble.com/5-0-1-8-Download-tp4832734p4838183.html
Sent from the Tapestry Users 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: Tweaking an AjaxFormLoop

2010-04-09 Thread Peter Stavrinides
Nice post! and came at just the right time for me too... so thanks for the tips!

+1 for feature addition, any Jira open?

cheers,
Peter 
 
- Original Message -
From: "Juan Isern" 
To: users@tapestry.apache.org
Sent: Friday, 9 April, 2010 08:09:40 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Tweaking an AjaxFormLoop


Robert, following your recomendation finally implemented a component that
does basically nothing but register itself as a trigger and has an id
assigned by tap as well.

On the client side, I have a global map and a
function triggerRowInjector(triggerId) so that I can inject rows
selectively.

As for the effect thing, you can see that they're hardcoded in the function
Tapestry.Initializer.formLoopRemoveLink so I overrode it making them
consistent.

I'm using tapestry 5.1.0.5, so I expect this "solution" to be broken by...
5.2, maybe? :P




Robert Zeigler wrote:
> 
> That just sounds like you're asking for trouble down the road,  
> though. ;)
> You're effectively relying on implementation details of the component.  
> It'll break if:
>* AjaxFormLoop changes the id of the contained RowInjector component
>* You want more than one AjaxFormLoop on the page
> 
> I'll grant you that it works... for now. :) And it's the sort of  
> solution I might put in projects that I write for myself, but not a  
> solution I would put into a project I write for clients.
> 
> It's probably worth submitting a jira for a feature addition to make  
> this sort of functionality easier/more robust.
> 
> Robert
> 
> On Apr 8, 2010, at 4/89:20 PM , Brian Heston wrote:
> 
>> I've done something similar without much hacking.  In my case I have  
>> an autocomplete field in each row, and when a selection is made I  
>> needed to add a new row automatically so the user can enter the next  
>> item.  I found that the row injector always has the same name, so I  
>> just call the trigger function defined in tapestry.js when I want to  
>> add the new row.  The addRow parameter is empty so the link doesn't  
>> render, but the trigger still does.
>>
>> 
>>
>>> t:mixins="autocomplete2" t:afterUpdateElement="itemSelected"/>
>>
>>...
>>
>> 
>>
>> function itemSelected() {
>>$("rowInjector").trigger();
>> }
>>
>> You may notice that I'm using my own autocomplete mixin, which I had  
>> to make to expose the afterUpdateElement event, but if you've got  
>> some other logic that invokes the adding of a row the idea should be  
>> the same.
>>
>> Hope this helps,
>> Brian
>>
>>
>> 
>> From: Juan Isern [juanis...@gmail.com]
>> Sent: Thursday, April 08, 2010 6:43 PM
>> To: users@tapestry.apache.org
>> Subject: Re: Tweaking an AjaxFormLoop
>>
>> Robert, I've got to say that you gave me the answer that I feared  
>> most.
>>
>> Hehe, REALLY thanks for your tips, I knew already that sooner or  
>> later I had
>> to hack into tapestry.js
>>
>> Cheers!
>>
>>
>> Robert Zeigler wrote:
>>>
>>>
>>> On Apr 8, 2010, at 4/81:48 PM , Juan Isern wrote:
>>>
 What I would like to do is to trigger an "addRow" event by executing
 some
 javascript (that will be invoked when an upload finishes). I thought
 of
 simulating a click event on an invisible "add row" link but I'm sure
 there's
 a prettier solution out there.

>>>
>>> There are other ways to do it, although I'm not sure I would call  
>>> them
>>> "prettier". :)
>>> AjaxFormLoop places an "AjaxFormLoopContext" object into the
>>> environment when it renders.
>>> You can access this object and add a call to "addAddRowTrigger".   
>>> That
>>> part is pretty. The main issue (for you) is that tapestry then  
>>> assumes
>>> that the trigger is going to be invoked on the "click" action, which
>>> isn't what you want in this case.
>>> There's a way around it, and that's where things get uglier. You can
>>> monkey patch tapestry.js to override
>>> Tapestry.Initializer.ajaxFormLoop, and make it behave how you want.
>>> This is typically how I've implemented custom "add row"  
>>> functionality.
>>>
>>> It might be a nifty change to enable a second form of the
>>> "addAddRowTrigger" that takes, say, a js callback name as a 2nd
>>> argument.  Or perhaps some flag triggering whether the first argument
>>> is an id or a callback.  In any event, the initializer could then
>>> check for the appropriate condition, and if the condition is met, the
>>> initializer would delegate the setup to the callback, passing in the
>>> row injector, rather than assuming a click.  If there's enough
>>> interest in something like this, I would be willing to do the work to
>>> add it to the framework (the exact api would need to be worked out,
>>> though).
>>>
>>>
 The same question could apply to any client-side ajax behavior, like
 refreshing zones. Is there any way to do it programmatically via
 javascript?

>>>
>>> The best answer here is to take a look for yourself through (

Re: Generated links in a loop

2010-03-30 Thread Peter Stavrinides
Hi Kristian,

Reading through what I wrote, I guess I could be clearer, here is more detailed 
explanation.

I create a model that I attach to a component (a type of custom grid), its 
populated with database records... some of the columns in the grid need to be 
links, and I can create the various types of links (event, page, action etc.) 
as I wish... so far this is all straightforward.

Occasionally I need to generate links that have a mixin attached, my links are 
obviously generated in a loop, and on the fly from the database data.

I am not using a markup writer, but I guess that could be the solution... only 
that would mean also writing out the mixins JavaScript, very possible, but I 
would like to avoid it if there is a better way. 

When generating an event link it would be nice to be able to attach an 
'attribute' (thanks for correcting) to specify a mixin, I know of no way to do 
this dynamically when generating links via Tapestry??

Cheers,
Peter


- Original Message -
From: "Kristian Marinkovic" 
To: "Tapestry users" 
Sent: Tuesday, 30 March, 2010 13:02:51 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Generated links in a loop

hi peter,

i don't understand your problem entirely...
but have you considered using a EventLink
component instead of generating the link 
manually. then you can easily attach a mixin
that renders some javascript using the 
PagerRender service.

or do you mean a  attribute by saying link property?
in this case you can use the MarkupWriter from the render
event methods to add additional attributes... even in mixins

void beginRender(MarkupWriter writer) {
writer.element().attribute(,...);
}

i guess i'm missing something :)

g,
kris






Von:Peter Stavrinides 
An: Tapestry Mailing List 
Datum:  30.03.2010 11:47
Betreff:Generated links in a loop



Hi!

Is it possible to attach a mixin on the fly to a 'generated' link? 

I wanted to use component resources:
Link link = resources_.createEventLink(linkId, new Object[] 
{param1,param2}); for generating the link, but there doesn't appear to be 
a way to attach a link property? I feel like I am missing something 
obvious ? ...the only way I know of that might work is using 
renderInformalParameters and writing the mixin JavaScript into the page... 
hmm don't like that too much, is there a better way?

Thanks,
Peter

-
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



Generated links in a loop

2010-03-30 Thread Peter Stavrinides
Hi!

Is it possible to attach a mixin on the fly to a 'generated' link? 

I wanted to use component resources:
Link link = resources_.createEventLink(linkId, new Object[] {param1,param2}); 
for generating the link, but there doesn't appear to be a way to attach a link 
property? I feel like I am missing something obvious ? ...the only way I know 
of that might work is using renderInformalParameters and writing the mixin 
JavaScript into the page... hmm don't like that too much, is there a better way?

Thanks,
Peter

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



Re: Documentation Request/Suggestion

2010-03-23 Thread Peter Stavrinides
We understand that Tapestry commiters are giving up their time to make Tapestry 
what it is, and we are grateful, I think they too are aware of these issues and 
must have some plans in the pipeline to rectify the problems.

Nothing being suggested in this post is new, my question is where the 
bottleneck lies? and how can we help? community driven docs (with or without 
changing existing docs) sounds like the most sensible option to me as it would 
lift this burden from the commiters and get more people activly involved in 
growing Tapestry.

Cheers,
Peter 

-- 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Please visit http://www.albourne.com/email.html for important 
additional terms relating to this e-mail.

- Original Message -
From: "Geoff Callender" 
To: "Tapestry users" 
Sent: Wednesday, 24 March, 2010 05:13:22 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Documentation Request/Suggestion

I agree too. Users of anything usually need both a Guide and a Reference. To 
me, the Tapestry documentation is much more of a Reference than a Guide, and 
that makes it a source of immense frustration to newbies and the experienced 
alike.

Here's what I mean: A User Reference is usually organised alphabetically for 
quick, well, reference. In contrast, a User Guide is usually organised by task, 
starting with the simplest task (Hello World?!?!) then working progressively 
through the tasks the author thinks you are most likely to want to accomplish. 
Whereas a User Reference includes every last arcane detail (because it really 
must), a User Guide leads you by the hand to what it thinks is important, helps 
you avoid known gotchas, and leaves out absolutely everything that doesn't 
directly contribute to doing the task. A Reference often is not focused on the 
practical. A User Guide must be focused on the practical.

To learn from a Reference is very tough indeed. You pretty much have to read 
the entire thing at least twice before you can even judge what's actually 
important and get yourself started.

As for injectables and annotations, I think there's a very practical need for 
something that brings all of them together in a way that all of us users can 
get a handle on them. A key part would be a description of why you might use 
each one, and it should put the stuff you're least likely to use down the 
bottom. Maybe they should even be organised by task?

Cheers,

Geoff

On 24/03/2010, at 12:20 AM, Erick Erickson wrote:

> I'll second Michael's statement, the documentation may exist but you
> don't even know it's there unless you already know it's there. Tribal
> knowledge and all that. Sometimes Google even gets me there.
> 
> But the T5 website is NOT my first choice exactly because of its
> organization, and it *should* be my first choice.
> 
> Most of my complaints would be alleviated by a simple search
> capability on the tapestry5 website, the lack thereof is my main
> difficulty in using it. The organization may make perfect sense to
> someone who really understands the thinking behind T5, but to new
> folks, it's a mystery.
> 
> Clearly lots and lots of work has been put into the Tapestry website
> and documentation. I imagine it's tempting for people who *have* put
> the effort into the docs to reply "Read The Field Manual" (Look, it's
> a public board, "Field" will do). That work would be much more valuable
> to many more of us if it were searchable. It would certainly reduce
> my frustration level.
> 
> Here's an example of trying to find something utterly trivial. Say I want
> to learn about the @Persist annotation. I go to the top level and click
> on "annotations", and you get a page that is utterly useless, to whit:
> http://tapestry.apache.org/tapestry5.1/tapestry5-annotations/
> Aha, I look again at the top-level and I find a "Persistent State"
> link. Nope.
> http://tapestry.apache.org/tapestry5.1/guide/appstate.html
> 
> Hmmm, maybe I clicked one link too low, there's the
> "Persistent page data" link at:
> http://tapestry.apache.org/tapestry5.1/guide/persist.html
> Aha! cool, that page talks about @Persist. Except.
> it has no example of *how* to implement one of the
> three strategies.
> But look! There's a link to the javadoc for @Persist! I'm saved!
> Nope, that page has no example either.
> http://tapestry.apache.org/tapestry5.1/apidocs/org/apache/tapestry5/annotations/Persist.html
> 
> At this point I give up and search the project I'm working on for
> @Persist and see how utterly simple it is to specify, say, flash
> persistence because some intrepid soul has ferreted it out and
> put it in the project already.
> 
> And this is one of the most trivial things in T5. God help me if I'm looking
> for something more complex, thank goodness for the jumpstart website
> 
> All that said, I *am* grateful for the work that has gone into t

Re: [Announce] Tapestry Testify project - v1.0.1 released

2010-03-12 Thread Peter Stavrinides
Thanks once again Paul for giving of your time to maintain Testify!! we have 
found Testify to be a real asset!

regards,
Peter

- Original Message -
From: "Angelo Chen" 
To: users@tapestry.apache.org
Sent: Saturday, 13 March, 2010 02:12:02 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: [Announce] Tapestry Testify project - v1.0.1 released


Hi Paul,

THis is a good news, I'd like to give it another try. last time I gave up
after encountering a problem and can't find any solution anywhere:

http://old.nabble.com/T5%3A-how-to-put-Testify-into-real-use--td26038980.html#a26038980

any idea why I'm getting that error?

Angelo


Paul Field wrote:
> 
> I'd like to announce the latest release of the Tapestry Testify project at
> Tapestry 360:
> http://tapestry.formos.com/projects/tapestry-testify/
> 
> Tapestry Testify is an extension to Tapestry that allows you to write page
> and component tests very easily and have them run very efficiently.
> 
> 
> ** Release Notes **
> 
> * Major revamp and extension of the documentation
> * Can now render a page and test the response
> (TapestryTester#renderResponse)
> * Can now autobuild fake objects (TapestryTester#autobuild)
> * Components can now see changes to @ForComponents fields even if the
> fields are changed during the test
> * BugFix: @ForComponents("name") fields are not injected into
> properties
> with a matching type but no name
> * BugFix: @Inject @Symbol doesn't work with testify
> * BugFix: @Inject in tests only injects services and not alias values
> * BugFix: Cookies should be cleared after each test
> * BugFix: Session should be cleared after each test
> 
> - Paul
> 
> ---
> Paul Field
> http://twitter.com/cloudy_skies
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/-Announce--Tapestry-Testify-project---v1.0.1-released-tp27882028p27884335.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: Suggestion for JavaOne Tapestry Talk

2010-03-11 Thread Peter Stavrinides
+ 1 for AOP & meta programming in Java (emphasis on Tapestry), sounds like a 
great topic!

-- 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Please visit http://www.albourne.com/email.html for important 
additional terms relating to this e-mail.

- Original Message -
From: "Robin Komiwes" 
To: "Tapestry users" 
Sent: Thursday, 11 March, 2010 12:58:00 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Suggestion for JavaOne Tapestry Talk

Christophe is so right about how Tapestry is visionary about some concepts.
I just laugh at devoxx spring 3.0 conference when I saw the concept of
"AppConfig". :)

Of course, speaking about the community and the success stories (seesaw for
example) is good, because it is a well known lack for Tapestry 5.


On Thu, Mar 11, 2010 at 9:01 AM, Christophe Cordenier <
christophe.corden...@gmail.com> wrote:

> Hi,
>
> I remember Howard saying how he get the inspiration from learning other
> technologies like clojure... I guess it would be nice to show how Tapestry
> is visionary and should inspire a lot of people and how PMC has made smart
> choices in the architecture.
>
> A few examples :
>
> - Tapestry has AppModule class for IOC contribution, two years ago, i
> remember spring XML emphasis and now spring 3.0 has such a mechanism
> - Tapestry has an automatic module contribution mechanism via Java Manifest
> file, now JavaEE6 has web fragments that look similare in the concept.
>
> I guess people here have other valuable examples.
>
> By the way, i have to say that Howard's existing talk is really
> interesting,
> representative and trenchant.
> It shows the magic part of Tapestry, but i guess that the JavaOne audience
> would like to know more about the underlying principles and thoughts, so
> AOP
> and metaprogramming sounds a good thing to emphasize.
>
> Also, I have started to work with Tapestry 5.0 almost 3 years ago, and i
> have the feeling that Tapestry's ecosystem has grown this year. There was
> already a lot of interesting project like chenillekit, jumpstart, ioko...
> But i have the feeling that there is more and more people on the mailing
> with interesting initiative. So talking about Tapestry's ecosystem and
> success story is also important.
>
> Best Regards,
> Christophe Cordenier.
>
> 2010/3/10 Thiago H. de Paula Figueiredo 
>
> > On Tue, Mar 9, 2010 at 8:57 PM, Howard Lewis Ship 
> > wrote:
> > > What do YOU think I should submit?  Ideas I've had include focusing on
> > > specific aspects of Tapestry, or doing a "Success Stories" talk, or a
> > > talk on AOP & meta programming in Java (emphasis on Tapestry), or
> > > maybe something on the tools available (such as Tynamo or maybe
> > > Wookie).  What would you like to see?  What do you think would get
> > > accepted?
> >
> > A talk about AOP and metaprogramming would be interesting IMHO. Be
> > warned about JSR 330 and 299 integration questions.  ;)
> >
> > A talk about tools would be nice too. I don't know when I would be
> > able to document the Ars Machina Project. It has a lot of code built
> > on top of Tapestry and Tapestry-IoC.
> >
> > --
> > Thiago
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>
>
> --
> Regards,
> Christophe Cordenier.
>
> Developer of wooki @wookicentral.com
>

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



Re: Exception handling

2010-03-08 Thread Peter Stavrinides
This is not what I am asking Thiago, I already have my own error page.

Thanks,
Peter

-- 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Please visit http://www.albourne.com/email.html for important 
additional terms relating to this e-mail.

- Original Message -
From: "Thiago H. de Paula Figueiredo" 
To: "Tapestry users" 
Sent: Monday, 8 March, 2010 15:21:45 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Exception handling

On Mon, 08 Mar 2010 05:40:50 -0300, Peter Stavrinides  
 wrote:

> Hi everyone,

Hi!

> So my question is what approach can I take to intercept *only these  
> exceptions that don't make it to the page.

Create your own error page. It must implement the ExceptionReporter  
interface. Set the tapestry.exception-report-page configuration symbol to  
the logical name of your error page.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, 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



Exception handling

2010-03-08 Thread Peter Stavrinides
Hi everyone,

I am having a problem with the following scenario:

- A page renders a grid with a number of links
- Clicking one of those links causes the page to re-render, but it breaks with 
the following exception:

 ERROR com.test.CoreModule.SiteRequestExceptionHandler Render queue error in 
BeforeRenderTemplate[hf/Fund:select]: Failure reading parameter 'encoder' of 
component hf/Fund:select: It is not permitted to add duplicate elements to a 
BeanListModel 
org.apache.tapestry5.internal.services.RenderQueueException: Render queue error 
in BeforeRenderTemplate[hf/Fund:select]: Failure reading parameter 'encoder' of 
component hf/Fund:select: It is not permitted to add duplicate elements to a 
BeanListModel [at classpath:com/test/pages/hf/Fund.tml, line 186]
at 
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:86)
at 
org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:121)
at 
$PageRenderQueue_1273cc4eea2.render($PageRenderQueue_1273cc4eea2.java)
at 
$PageRenderQueue_1273cc4ee99.render($PageRenderQueue_1273cc4ee99.java)
at 
org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37)
at 
org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryModule.java:1748)
 
...

- What caused this error was my bean, which threw it when a problem occurred 
sorting the primary keys, this is all fine so far.
- The trouble is it breaks before re-rendering the page in 
BeforeRenderTemplate, which means the page never gets a chance to recover / 
report the exception (i.e.: onException is never invoked)

So my question is what approach can I take to intercept *only these exceptions 
that don't make it to the page. I rely heavily on onException at the moment, so 
I don't want to stop using it if possible, the ideal would be to have a new way 
of intercepting and dealing with these cases, perhaps two distinct mechanisms:
1. For exceptions that don't reach the page / component - taken care of by some 
new system (sub-system A)
2. Exceptions that do reach the page - remains as is, handled by onException() 
handler (sub-system B)

Is this possible, any ideas? 

Thanks,
Peter



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



Re: Pretty Printing JSON

2010-02-23 Thread Peter Stavrinides
+1 very useful in development, should go into the core imho.

Peter

- Original Message -
From: "Howard Lewis Ship" 
To: "Tapestry users" 
Sent: Wednesday, 24 February, 2010 04:31:13 GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: Re: Pretty Printing JSON

I like the idea of PP JSON; it will make the JS code block easier to read.

However, I also like the idea that it can be turned off (by default)
in production. Suddenly, it sounds like a service that can be passed a
JSONObject to be pretty-printed ... or a method on JSONObject that
takes a parameter or two to guide the process.  Whatcha thing?

On Tue, Feb 23, 2010 at 4:38 PM, Ben Dotte  wrote:
> I put up a post on pretty printing the JSON that gets output on the
> bottom of the generated HTML by Tapestry:
>
> http://bdotte.blogspot.com/2010/02/pretty-printing-json-in-tapestry-5.html
>
> I'm not sure if there is any interest in having this functionality
> available in the actual Tapestry codebase; I could look into
> (attempting) to clean it up if there is. In any case it has been handy
> for me, so I thought I'd post it.
>
> Ben
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.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.1] Log4j and Application Development/Production Mode

2010-02-19 Thread Peter Stavrinides
> There is any T5 Elegant way so I can automatically switch between  
> distincts Log4J configurations 

Yes, I simply place mine side by side in src/main/resources and then just 
supply a JVM argument to choose the correct one in production, i.e.: 
-Dlog4j.configuration=log4j_prod.xml if you supply none the default will be 
log4j.properties / log4j.xml 

regards,
Peter


- Original Message -
From: "Igor Drobiazko" 
To: "Tapestry users" 
Sent: Friday, 19 February, 2010 10:10:50 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: [T5.1] Log4j and Application Development/Production Mode

Just put your log4j.properties into src/test/resources. This way the  
config file will be on the classpath of the dev environment and is not  
shipped inside the war. In production put the config file into the  
container.

18.02.2010, в 19:13, Everton Agner   
написал(а):

> Hi,
>
> There is any T5 Elegant way so I can automatically switch between  
> distincts Log4J configurations related to Development/Production  
> Mode? We have the @Symbol "productionMode", so I believe there is  
> some way I can achieve that using this information...
>
> I saw something like that on an old Struts 1.3 application, so there  
> was a log4j.properties file on the project and, on the Deployment  
> Server, other log4j.properties (and some weird conf to make it  
> works). So, I could work on DEBUG mode on the Development  
> environment, and in ERROR mode on Deployment environment without  
> having to change.
>
> I don't want to do that here, though...
>
> Any help would be appreciated.
>
>
> Thanks!
>
> Everton
>
>
>
>   
> 
 

> Veja quais são os assuntos do momento no Yahoo! +Buscados
> http://br.maisbuscados.yahoo.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: integrating a web services stack

2010-02-17 Thread Peter Stavrinides
Hi Uli,

I opted out of 3, since I don't use Spring, so thought it would be overkill 
bringing too much baggage. I would love to see an actual example of 1, it could 
be interesting... but I settled for a version of 2, from what I understood this 
was the simplest approach to get working.

Cheers,
Peter

-- 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Please visit http://www.albourne.com/email.html for important 
additional terms relating to this e-mail.

- Original Message -
From: "Piero Sartini" 
To: "Tapestry users" 
Sent: Tuesday, 16 February, 2010 22:59:51 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: integrating a web services stack

> That would be for RESTful web services only. Did you ever have to expose a
> service via SOAP?

You are right, this is useful for RESTful services only. Never had to
expose a SOAP service within a pure tapestry application, but a few
where I am doing this from an EJB backend. But that's overkill if you
don't have it in place already.

 Piero

-
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 Central] Live reloading of Tapestry services?

2010-02-12 Thread Peter Stavrinides
I use Tomcat in production only, I develop using the jetty plugin, and am very 
happy with it, though we have massive source tree and tend to have sizable 
pages too. I get the occasional Permgen, but not too often. I run Jetty with 
plenty of memory, and enable Class unloading on the JVM which is supposed to 
help: 
-Xmx1024m -XX:MaxPermSize=512M   -XX:PermSize=512M  
-XX:+CMSClassUnloadingEnabled

But its the JVM a fairly tricky beast to subdue.
Cheers,
Peter


-- 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Please visit http://www.albourne.com/email.html for important 
additional terms relating to this e-mail.

- Original Message -
From: "Thiago H. de Paula Figueiredo" 
To: "Tapestry users" 
Sent: Friday, 12 February, 2010 18:25:27 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: [Tapestry Central] Live reloading of Tapestry services?

On Fri, 12 Feb 2010 13:58:42 -0200, Massimo Lusetti   
wrote:

> O dear stop using buggy containers :) ... sorry couldn't resist.

Are you talking about Tomcat? I'm using Jetty exclusively for a couple  
years and I can't recall having PermGen exceptions.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, 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: [Tapestry Central] Live reloading of Tapestry services?

2010-02-12 Thread Peter Stavrinides
> This is worth spending some time on ... if I can pull it off, it would
> be an incredible coup!
I sit on the fence on this one... on the one hand live reloading is productive 
any any context, on the other in principle I do agree with Igor, so not sure... 
My only worry is memory management, i.e.: what are the implications of 
reloading a service? does this mean dependencies too? Since we now have 
literally thousands of IoC services I am happy to avoid reloading if this means 
preventing Permgen errors.

my 2 cents,
Peter


-- 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Please visit http://www.albourne.com/email.html for important 
additional terms relating to this e-mail.

- Original Message -
From: "Vangel V. Ajanovski" 
To: "Tapestry users" 
Sent: Friday, 12 February, 2010 17:04:08 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: [Tapestry Central] Live reloading of Tapestry services?

On 12.02.2010 08:22, Igor Drobiazko wrote:
> I encourage you to read Joel's article on testing the software.
> http://www.joelonsoftware.com/articles/fog67.html
>   
You know what, I teach software engineering at the University, and in
the matter of fact I have taught about several black-box and white-box
techniques, and do's and dont's and why's and when's about manual and
automated testing.

In this case we required black-box testing approach mainly via some
functional test method like classification trees method to be able to
differentiate all the different test-case classes and make a test
strategy for all of them, but it was not feasible. Hence we did not
predict all the test classess and all the possible scenarios, so in some
cases the database design failed, in many cases the quality of the
actual data in the database was the real reason for failure.

So, the point of my message was that there are reasons and situations
when you need your tools to support any kind of a process, and not the
process to support your tools. The more flexible your tools are to
exclusions and irregularites, the more applicable they will be.


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



Re: @Secure solution (was Re: [t5.0.18] Secure Annotation / BaseURLSource)

2010-02-09 Thread Peter Stavrinides
Hi Geoff,

Yes thats a pretty robust configuration, we have Tapestry configured this way 
in production for a couple of years now without issues, if you can use a recent 
version of Apache, i.e.: 2.1 onwards then its best to use the built in 
mod_proxy_ajp module: http://httpd.apache.org/docs/2.1/mod/mod_proxy_ajp.html

The only drawback I have found using this set-up is that using reverse AJAX (or 
Comet if u prefer) through the proxy can be unreliable (under Tomcat6 with DWR 
it was leaking), but Jetty faired better.

Kind regards,
Peter



- Original Message -
From: "Geoff Callender" 
To: "Tapestry users" 
Sent: Tuesday, 9 February, 2010 05:33:07 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: @Secure solution (was Re: [t5.0.18] Secure Annotation / BaseURLSource)

I've found a solution - use AJP (instead of HTTP) from Apache to Jetty/Tomcat. 
Apache handles the SSL and AJP preserves the security info, so Tapestry knows a 
secure channel was used and the @Secure annotation just works. Perfect.

For the record, the key lines for httpd-ssl.conf are like this:

SSLOptions +ExportCertData
 
ProxyRequests Off
ProxyPreserveHost On


AddDefaultCharset Off
Order deny,allow
Allow from all


ProxyPass   /myapp ajp://gc1.local:18080/myapp retry=5
ProxyPassReverse/myapp ajp://gc1.local:18080/myapp

The full config info is in these articles:


http://www.zeitoun.net/articles/client-certificate-x509-authentication-behind-reverse-proxy/start
 (see "Between Apache and Tomcat")
http://docs.codehaus.org/display/JETTY/Configuring+mod_proxy 
(alternative 1 causes the problem, whereas alternative 2 works!)

HTH someone else,

Geoff

On 09/02/2010, at 12:23 AM, Geoff Callender wrote:

> Hi Dave et al,
> 
> Did you find an OK solution to this? I too am hoping to have Apache look 
> after https and feed only http to the web server, but any page marked @Secure 
> will reject http and redirect to https, so you end in a loop bouncing between 
> browser and webserver via Apache.
> 
> Cheers,
> 
> Geoff
> 
> On 20/05/2009, at 1:02 AM, Dave Greggory wrote:
> 
>> 
>> I'm attempting to contribute my own RequestSecurityManager, but if anybody 
>> else has a better idea where I don't have to touch internal stuff let me 
>> know.
>> 
>> 
>> 
>> - Original Message 
>> From: Dave Greggory 
>> To: Tapestry users 
>> Sent: Tuesday, May 19, 2009 10:51:41 AM
>> Subject: Re: [t5.0.18] Secure Annotation / BaseURLSource
>> 
>> 
>> Well looks like our internal network structure is pretty set and can't be 
>> changed. 
>> 
>> Users <-- internet (http / https connections ) --> load balancer/firewall 
>> <-- internal network (http) --> tomcat
>> 
>> We have a way of determining from within a tomcat application whether 
>> internet connection to firewall is secure. This can be done because the 
>> firewall adds a request header indicating SSL status. This is how we usually 
>> determine this. Can I get tapestry use my helper method that does this check 
>> to determine whether the connection was secure? How can I get secure 
>> connections working in this situation? 
>> 
>> Thanks so much.
>> Dave
>> 
>> 
>> 
>> 
>> - Original Message 
>> From: Dave Greggory 
>> To: Tapestry users 
>> Sent: Monday, May 18, 2009 12:16:36 PM
>> Subject: Re: [t5.0.18] Secure Annotation / BaseURLSource
>> 
>> 
>> Don't worry about it, turns out our internal network is screwed up... 
>> connections between users and the load balancer is secure, but not between 
>> load balancer and app server.
>> 
>> 
>> 
>> - Original Message 
>> From: Dave Greggory 
>> To: Tapestry users 
>> Sent: Monday, May 18, 2009 11:56:56 AM
>> Subject: Re: [t5.0.18] Secure Annotation / BaseURLSource
>> 
>> 
>> obviously, it is.
>> 
>> 
>> 
>> - Original Message 
>> From: Martin Strand 
>> To: Tapestry users 
>> Sent: Monday, May 18, 2009 11:40:40 AM
>> Subject: Re: [t5.0.18] Secure Annotation / BaseURLSource
>> 
>> Just a guess... perhaps baseSecureURL is not an https url?
>> 
>> 
>> On Mon, 18 May 2009 15:15:50 +0200, Dave Greggory  
>> wrote:
>> 
>>> 
>>> I've been using BaseURLSource(since behind a firewall/load balancer) fine 
>>> all this time, and recently I needed a secure page, so I added the @Secure 
>>> annotation on that page. But that page is no longer working because @Secure 
>>> annotation ends up sending continuous redirects. What am I doing wrong?
>>> 
>>> My BaseURLSource implementation:
>>> 
>>> BaseURLSource source = new BaseURLSource()
>>> {
>>> public String getBaseURL(boolean secure)
>>> {
>>>return (secure) ? baseURL : baseSecureURL;
>>> }
>>> }
>>> 
>>> Thanks,
>>> Dave
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
>> 
>> 
>> 
>> 

Re: web service problem

2010-02-08 Thread Peter Stavrinides
Jun, what does your binding look like?

regards,
Peter


- Original Message -
From: "Jun Tsai" 
To: "Tapestry users" 
Sent: Tuesday, 9 February, 2010 07:08:18 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: web service problem

2010/2/8 Peter Stavrinides 

> > Currently, Tapestry-IoC doesn't copy the annotations put in the service
> > implementation class and methods to the generated proxy. A workaround is
> > to put the annotation in the service interface.
> Do you mean put it in the implementation class rather? just tested it and
> it seems to work in the implementation class but not when annotating in the
> proxy!
>
> i.e. this works:
> @WebService(serviceName="myService")
> public class MyServiceImpl{
>
> }
>
> but not:
> public class SpotfireConnectImpl implements ServiceInterface{
>
> }
>
> @WebService(serviceName="myService")
> public interface ServiceInterface {
>
> }
>
>
I had tested it ,put the @WebService in implemention class,but it doesn't
work.

> regards,
> Peter
>
> --
> If you are not an intended recipient of this e-mail, please notify the
> sender, delete it and do not read, act upon, print, disclose, copy, retain
> or redistribute it. Please visit http://www.albourne.com/email.html for
> important additional terms relating to this e-mail.
>
> - Original Message -
> From: "Thiago H. de Paula Figueiredo" 
> To: "Tapestry users" 
> Sent: Monday, 8 February, 2010 14:02:51 GMT +02:00 Athens, Beirut,
> Bucharest, Istanbul
> Subject: Re: web service problem
>
> On Sun, 07 Feb 2010 02:52:37 -0200, Jun Tsai  wrote:
>
> > hi,all
>
> Hi!
>
> > Exception in thread "main" java.lang.IllegalArgumentException: class
> > $DataQueryService_126a6c0531a has neither @WebSerivce nor
> > @WebServiceProvider annotation
>
> Currently, Tapestry-IoC doesn't copy the annotations put in the service
> implementation class and methods to the generated proxy. A workaround is
> to put the annotation in the service interface.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, software architect and developer, 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
>
>


-- 
regards,
Jun Tsai

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



Re: web service problem

2010-02-08 Thread Peter Stavrinides
> I had tested it ,put the @WebService in implemention class,but it doesn't
> work.
Thats strange Jun, its definitely working for me... I wander what the 
difference could be, and you are sure? because I am running fine at every 
restart, I am using 5.1.0.5 on Jetty with the Metro web service stack via 
Maven... whats your configuration?

Cheers,
Peter

- Original Message -
From: "Jun Tsai" 
To: "Tapestry users" 
Sent: Tuesday, 9 February, 2010 07:08:18 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: web service problem

2010/2/8 Peter Stavrinides 

> > Currently, Tapestry-IoC doesn't copy the annotations put in the service
> > implementation class and methods to the generated proxy. A workaround is
> > to put the annotation in the service interface.
> Do you mean put it in the implementation class rather? just tested it and
> it seems to work in the implementation class but not when annotating in the
> proxy!
>
> i.e. this works:
> @WebService(serviceName="myService")
> public class MyServiceImpl{
>
> }
>
> but not:
> public class SpotfireConnectImpl implements ServiceInterface{
>
> }
>
> @WebService(serviceName="myService")
> public interface ServiceInterface {
>
> }
>
>
I had tested it ,put the @WebService in implemention class,but it doesn't
work.

> regards,
> Peter
>
> --
> If you are not an intended recipient of this e-mail, please notify the
> sender, delete it and do not read, act upon, print, disclose, copy, retain
> or redistribute it. Please visit http://www.albourne.com/email.html for
> important additional terms relating to this e-mail.
>
> - Original Message -
> From: "Thiago H. de Paula Figueiredo" 
> To: "Tapestry users" 
> Sent: Monday, 8 February, 2010 14:02:51 GMT +02:00 Athens, Beirut,
> Bucharest, Istanbul
> Subject: Re: web service problem
>
> On Sun, 07 Feb 2010 02:52:37 -0200, Jun Tsai  wrote:
>
> > hi,all
>
> Hi!
>
> > Exception in thread "main" java.lang.IllegalArgumentException: class
> > $DataQueryService_126a6c0531a has neither @WebSerivce nor
> > @WebServiceProvider annotation
>
> Currently, Tapestry-IoC doesn't copy the annotations put in the service
> implementation class and methods to the generated proxy. A workaround is
> to put the annotation in the service interface.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, software architect and developer, 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
>
>


-- 
regards,
Jun Tsai

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



Re: web service problem

2010-02-08 Thread Peter Stavrinides
> Currently, Tapestry-IoC doesn't copy the annotations put in the service  
> implementation class and methods to the generated proxy. A workaround is  
> to put the annotation in the service interface.
Do you mean put it in the implementation class rather? just tested it and it 
seems to work in the implementation class but not when annotating in the proxy!

i.e. this works:
@WebService(serviceName="myService")
public class MyServiceImpl{

}

but not:
public class SpotfireConnectImpl implements ServiceInterface{

}

@WebService(serviceName="myService")
public interface ServiceInterface {

}

regards,
Peter

-- 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Please visit http://www.albourne.com/email.html for important 
additional terms relating to this e-mail.

- Original Message -
From: "Thiago H. de Paula Figueiredo" 
To: "Tapestry users" 
Sent: Monday, 8 February, 2010 14:02:51 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: web service problem

On Sun, 07 Feb 2010 02:52:37 -0200, Jun Tsai  wrote:

> hi,all

Hi!

> Exception in thread "main" java.lang.IllegalArgumentException: class
> $DataQueryService_126a6c0531a has neither @WebSerivce nor
> @WebServiceProvider annotation

Currently, Tapestry-IoC doesn't copy the annotations put in the service  
implementation class and methods to the generated proxy. A workaround is  
to put the annotation in the service interface.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, 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: How to decorate a service that has already been decorated ?

2010-02-03 Thread Peter Stavrinides
> Not 100% related, but I created an ActivationContextEncoder interface  
> and corresponding ActivationContextEncoderSource service. This way, I can  
> have the logic for generating the activation context value for a given  
> type separate from its ValudeEncoder logic. The above pseudo-id lookup  
> logic above could be implemented in a reusable way with  
> ActivationContextEncoder.
Interesting solution!  

I agree that one way or another you can't avoid these checks, so better to find 
a way to make this code reusable and as generic as possible. My solution was to 
annotate my pages in order to determine the referenced context variables at 
runtime, then reuse the checking code in a service injected in a base page/s 
(or even a dispatcher)... perhaps not as elegant as yours, but its flexible and 
it works for me.

cheers,
Peter


- Original Message -
From: "Thiago H. de Paula Figueiredo" 
To: "Tapestry users" 
Sent: Wednesday, 3 February, 2010 02:43:11 GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: Re: How to decorate a service that has already been decorated ?

On Tue, 02 Feb 2010 19:21:22 -0200, Howard Lewis Ship   
wrote:

> Intresting. So perhaps instead of encoding the primary key of a
> Hibernate entity directly, you'd instead maintain a lookup combining
> user id and object id, mapped to a random string.  The random string
> would have to be in some kind of fast lookup table stored persistently
> (perhaps in the DB for sharing across the cluster, if any).

Is the overhead worth it? As attackers car intercept the URLs, you still  
need to check if the user can access that data.

> Anyway, that's the kind of idea that popped into my head ... what's
> your solution looking like?

Not 100% related, but I created an ActivationContextEncoder interface  
and corresponding ActivationContextEncoderSource service. This way, I can  
have the logic for generating the activation context value for a given  
type separate from its ValudeEncoder logic. The above pseudo-id lookup  
logic above could be implemented in a reusable way with  
ActivationContextEncoder.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, 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: New Tapestry Website - http://www.seesaw.com/

2010-01-29 Thread Peter Stavrinides
Hi Ben,

What motivated you to use Tapestry? obviously this is a great choice of course!


As a side note: IE 6 is a malware software developers dream come true, it has 
to be the worst browser since Netscape 4, it has two critical flaws:
1. A core design flaw in the zone-based security framework that is 
"un-patchable", a vulnerability allowing remote execution via Active X, you 
enable any active X control, then you are susceptible, and 
2. Incomplete Support for AJAX which requires active X enabled

So its probably a wise decision to not support it.

regards,
Peter


- Original Message -
From: "Ben Gidley" 
To: "Tapestry users" 
Sent: Friday, 29 January, 2010 13:41:13 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: New Tapestry Website - http://www.seesaw.com/

It is delibrate :)

We don't support IE6. The beta login page is missing messaging telling you
this nicely, the main site does have it.

Ben Gidley

www.gidley.co.uk
b...@gidley.co.uk


On Fri, Jan 29, 2010 at 11:33 AM, Lance Java wrote:

> Hi... just to give you a heads up... the css is not working as expected in
> IE6 (screenshot attached)
> Your response to this may well be "get a better browser" which I totally
> understand.
>
> Cheers,
> Lance.
> On 29 January 2010 10:18, Ben Gidley  wrote:
>
>> Hi,
>>
>> We have just launched http://www.seesaw.com/ into beta this is a Tapestry
>> 5
>> powered website providing a video on demand site (like iPlayer or Hulu) in
>> the UK market.
>>
>> It is still in beta but if you sign up there is a good chance of being
>> invited soon.
>>
>> To help share this as a good Tapestry case study I will be producing some
>> blog articles on key bits and doing a talk at Skillsmatter in London on
>> the
>> 23rd March -
>> http://skillsmatter.com/event/java-jee/tapestry-5-in-action/zx-486sharing
>> our experiences with Tapestry.
>>
>> Thanks
>>
>> Ben Gidley
>>
>> www.gidley.co.uk
>> b...@gidley.co.uk
>>
>
>
>
> -
> 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: Easy Way to create a select model?

2010-01-28 Thread Peter Stavrinides
> I feel a little dumb, because for years I have been using Tapestry...
Well that makes two of us Andy, from my point of view its nice to see Kristians 
example, and I am sure for others too. 

cheers,
Peter




-- 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Please visit http://www.albourne.com/email.html for important 
additional terms relating to this e-mail.

- Original Message -
From: "Andy Pahne" 
To: "Tapestry users" 
Sent: Thursday, 28 January, 2010 17:08:21 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Easy Way to create a select model?



Yeah, that's it. Thanks a lot.




Am 28.01.2010 15:50, schrieb Ulrich Stärk:
> You are indeed missing something:
>
> http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Select.html
>  
>
>
> 
>
> HTH,
>
> Uli


-
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 5 and external web service

2010-01-22 Thread Peter Stavrinides


> There isn't anything I know that deals with webservices in Tapestry, but I  
> guess any webservice package would be easily integrated with Tapestry-IoC  
> (and thus Tapestry itself.
An example of this would be great Thiago, to me this seems harder than it 
should be, currently the best way I know of is to join the web service context 
with Tapestry's, which might not be  ideal but at least it works... is there a 
better way?

cheers,
Peter


- Original Message -
From: "Thiago H. de Paula Figueiredo" 
To: "Tapestry users" 
Sent: Friday, 22 January, 2010 14:25:58 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Tapestry 5 and external web service

On Fri, 22 Jan 2010 09:10:58 -0200, abangkis  wrote:

> Hello,

Hi!

> I have 2 question concerning tapestry and web service.
>
> 1. I have a service that being exposed as a web service using open
> esb. What is the easiest way to invoke the web service from tapestry ?
> do i need another library or is there some kind of tapestry-webservice
> plugin that tapestry already provide ?

There isn't anything I know that deals with webservices in Tapestry, but I  
guess any webservice package would be easily integrated with Tapestry-IoC  
(and thus Tapestry itself.

> 2. If i want to show the data in a grid, is there any way i can do
> this without turning the xml data to Pojo and insert it to a list to
> be used by the grid ?

Yes. Create a dummy BeanModel with BeanModelSource (or implement BeanModel  
yourself) and then add the columns using beanModel.add("columnId",  
propertyConduit). You'll need to implement PropertyConduit itself in this  
case. Regarding its set() method, you can give it a blank implementation,  
as you're just displaying data, not editing it.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, 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: [Announce] Wooki - Collaborative Writing

2010-01-19 Thread Peter Stavrinides
Robin and co. this is really fantastic, can't wait to take it for a spin!

:)

regards,
Peter

-- 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Please visit http://www.albourne.com/email.html for important 
additional terms relating to this e-mail.

- Original Message -
From: "Robin Komiwes" 
To: "Tapestry users" 
Cc: "Verachten Bruno" , "Christophe Cordenier" 

Sent: Tuesday, 19 January, 2010 17:24:42 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: [Announce] Wooki - Collaborative Writing

What would you need if you had to publish a document and then get it
reviewed by someone else? You will be looking for a publish platform, with
at least some comment system and a social network. That’s Wooki’s baseline.

Wooki is thought to be simple, based on a friendly user interface. Wooki
also wants to make your data as accessible as possible, by offering you the
possibility to import or export your documents in many formats, as PDF for
example.

Wooki has been created for two reasons. The first one was described just
above. The second one was to contribute to the open source world, and
especially to the Tapestry 5 community that will find a lot of concrete
application of Tapestry 5 concepts in it.

We are pleased to introduce you the first alpha-release of Wooki.
It is licensed under Apache 2 license, the same as Tapestry 5. It has been
created by Christophe Cordenier, Robin Komiwes and Bruno Verachten.

Try the demo and get Wooki now @ http://wookicentral.com

Source code : http://github.com/robink/wooki
Blog : http://spreadthesource.com
Twitter : http://twitter.com/spreadthesource

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



Re: Different ExceptionReport for different pages

2010-01-18 Thread Peter Stavrinides
> This is easier in 5.2 as there's a new RequestGlobals property that
> identifies the name of the page for the request.
Wow thats a useful feature, nice!



- Original Message -
From: "Howard Lewis Ship" 
To: "Tapestry users" , r...@su3analytics.com
Sent: Sunday, 17 January, 2010 21:54:19 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Different ExceptionReport for different pages

This is easier in 5.2 as there's a new RequestGlobals property that
identifies the name of the page for the request.

On Sun, Jan 17, 2010 at 11:03 AM, Richard Hill  wrote:
>
> Ok thanks. Is it possible to detect which page threw the exception? My
> logic needs to be based on the page that threw the exception as opposed
> to the type of exception.
>
>
>
>
>
> -Original Message-
> From: Thiago H. de Paula Figueiredo 
> Reply-to: "Tapestry users" 
> To: Tapestry users 
> Subject: Re: Different ExceptionReport for different pages
> Date: Sun, 17 Jan 2010 16:25:09 -0200
>
> On Sun, 17 Jan 2010 15:41:08 -0200, Richard Hill 
> wrote:
>
>> Hi All,
>
> Hi!
>
>> I have an ExceptionReport.java, .tml to present a pretty error page to
>> users. However there is one page where I would like to have a different
>> exception page. Is this possible?
>
> Simple answer: you can, but I think it's not worth the hassle. Just use
> some logic in your error page to show different content to different
> exceptions. You can also redirect to another page in your ExceptionReport
> page.
>
> Sophisticated answer: override the RequestExceptionHandler service. Draw
> some inspiration from RequestExceptionHandlerImpl.
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.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: Handling session expiry

2010-01-15 Thread Peter Stavrinides

> I don't use @SessionState with my HttpSessionBindingListener  
> implementation. I set it in the Session directly. ;)

Exactly, just set it in your web.xml:

  
com.web.application.SessionListener


And then in SessionListener:

/** @see HttpSessionListener#sessionCreated(HttpSessionEvent) */
public void sessionCreated(HttpSessionEvent event) {
Logger.getLogger(getClass()).info(
"Session created with id: " + 
event.getSession().getId());
}

/** @see HttpSessionListener#sessionDestroyed(HttpSessionEvent) */
public void sessionDestroyed(HttpSessionEvent event) {
  //your logic here
   }


and bobs your uncle!
Peter

-- 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Please visit http://www.albourne.com/email.html for important 
additional terms relating to this e-mail.

- Original Message -
From: "Thiago H. de Paula Figueiredo" 
To: "Tapestry users" 
Sent: Friday, 15 January, 2010 16:44:28 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Handling session expiry

On Fri, 15 Jan 2010 12:40:24 -0200, Massimo Lusetti   
wrote:

> On Fri, Jan 15, 2010 at 3:34 PM, Thiago H. de Paula Figueiredo
>  wrote:
>
>> T5 doesn't, but the Servlet API has. Create an  
>> HttpSessionBindingListener
>> implementation and add it to the Session. Its valueUnbound() method  
>> will be
>> invoked when the session is invalidated.
>
> Actually HttpSessionBindingListener.valueUnbound() Notifies the object
> that it is being unbound from a session and identifies the session, so
> due to the way T5 use the session with @SessionState object I would
> play carefully with it :)

I don't use @SessionState with my HttpSessionBindingListener  
implementation. I set it in the Session directly. ;)

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, 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: API for obtaining absolute URL of the page?

2010-01-14 Thread Peter Stavrinides
Hi Ilya,

IMHO I don't think this should be a Tapestry function, constructing an absolute 
URL is not always perfectly generic... i.e.: detecting SSL, port and hostname 
reliably to construct the URL from. Sometimes people configure SSL on 
non-standard ports, and browser headers are at best inconsistent. Since the 
servlet API provides what you need, (and only requires you to write a small 
block of code), it should suffice. But what I am getting at is that this code 
tends to be tied to your applications runtime environment.

Kind regards,
Peter


- Original Message -
From: "Ilya Obshadko" 
To: "Tapestry users" 
Sent: Tuesday, 15 December, 2009 20:42:36 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: API for obtaining absolute URL of the page?

Probably you've misunderstood my question.

My goal was not to create absolute URI (which is absolute only within a
single website), but full external URL that may appear, for example, in RSS
feed or mail notification.

toAbsoluteURI () method creates exactly what it says:

"Converts the link to an absolute URI, a complete path, starting with a
leading slash."

On Mon, Dec 14, 2009 at 10:15 AM, Kristian Marinkovic <
kristian.marinko...@porsche.co.at> wrote:

> hi
>
> just inject the LinkSource service and create a Link
> object which can generate the absolute URL of a page:
>
> @Inject
> private LinkSource linkSource;
>
> @Inject
> private ComponentResources resources;
>
> public void create() {
>String absolute =
> linkSource.createPageRenderLink(resources.getPageName(),
> false).toAbsoluteURI();
> }
>
>
> g,
> kris
>
>
>
> Ilya Obshadko 
> 12.12.2009 13:52
> Bitte antworten an
> "Tapestry users" 
>
>
> An
> Tapestry users 
> Kopie
>
> Thema
> API for obtaining absolute URL of the page?
>
>
>
>
>
>
> Just curious, if there is an API that could create absolute URL of the
> given
> page?
>
> Looking at Link interface, there IS a method createAbsoluteURI(), but it
> creates only URI, not URL meaningful for outside world. Still this kind of
> API would be very useful, for example for RSS feeds, mail notifications
> and
> any other sort of content that is not viewed on the website itself.
>
> I know that it's possible to @Inject HttpServletRequest and obtain all
> necessary data from it, but maybe I'm missing some easier way to do that?
>
> --
> Ilya Obshadko
>
>


-- 
Ilya Obshadko

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



Re: Discussion

2009-12-23 Thread Peter Stavrinides


-- 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Please visit http://www.albourne.com/email.html for important 
additional terms relating to this e-mail.

> I've also thought about this, and my only conclusion is that Tapestry is too
> difficult to master. Especially when it comes to tapestry-ioc and
> getting productive
> with it.
Only because of the lack of good docs and tutorials... its a pity though 
because it may appear daunting to begin with, but when you do learn it, it is 
so simple its sick.  

regards,
Peter


- Original Message -
From: "Piero Sartini" 
To: "Tapestry users" 
Sent: Wednesday, 23 December, 2009 12:28:35 GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: Re: Discussion

> Having seen some discussions in the past about the history of Tapestry, I'm
> wondering what the status of Tapestry with CDI support will be. In other
> words, is it again going to result a new major release incompatible with
> previous versions? I think CDI in it's current form, if should be supported,
> would require some fundamental changes to the core of Tapestry's IoC that
> would definitely result in API break. At least the Spring guys also say so
> about their framework.

I am not sure if it is possible or not to integrate CDI without
breaking backwards
compatibility... but it is something we should find out. Spring guys
are no reliable
source, they want to sell their product and if I were them, I would
fear CDI as well.

> I have an idea, may be a controversial one. I've seen much about Tapestry
> and think it's a nice Framework. But what I still don't understand is why
> it's not widely in use. It existed before Wicket but Wicket is far more
> popular. I don't think it's only because it's users are very vocal. There is
> also a saying that a good product sometimes sells itself.

I've also thought about this, and my only conclusion is that Tapestry is too
difficult to master. Especially when it comes to tapestry-ioc and
getting productive
with it.

I am not talking about building the frontend and components.. this is
easy and IMHO
the thing where tapestry really shines.

But there are way too less integrations - see my tapestry-jpa experiment for an
example. It works, but it would need some love from some smarter people than me
to get proper unit tests and some missing parts.

If I look at Wicket or other frameworks there are lots and lots of
integration modules
for just everything. Why is that? My answer is because it is way
easier to write them.

> My proposition is why not let Tapestry and Wicket join hands, migrate some
> of the nice ideas to Wicket and lets try to go standardize Wicket as a JSR.

I am not sure I would like this. I've tried wicket in the past, and
for me it is too verbose.
I don't like the "Swing"-Approach and these inner classes everywhere.
Tapestry's approach
to the front-end programming is excellent, I don't want to trade this.

But I would be perfectly fine trading the IoC container...

 Piero

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

2009-12-23 Thread Peter Stavrinides
> There's a recent discussion about that in the dev mailing list. Everyone  
> is invited. :)
Thiago could you provide a link perhaps?

-- 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Please visit http://www.albourne.com/email.html for important 
additional terms relating to this e-mail.

- Original Message -
From: "Gerald Bauer" 
To: "Tapestry users" 
Sent: Wednesday, 23 December, 2009 11:59:47 GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: Re: Discussion

Lutz,

Having seen some discussions in the past about the history of Tapestry, I'm
wondering what the status of Tapestry with CDI support will be. In other
words, is it again going to result a new major release incompatible with
previous versions? I think CDI in it's current form, if should be supported,
would require some fundamental changes to the core of Tapestry's IoC that
would definitely result in API break. At least the Spring guys also say so
about their framework.

I have an idea, may be a controversial one. I've seen much about Tapestry
and think it's a nice Framework. But what I still don't understand is why
it's not widely in use. It existed before Wicket but Wicket is far more
popular. I don't think it's only because it's users are very vocal. There is
also a saying that a good product sometimes sells itself.
My proposition is why not let Tapestry and Wicket join hands, migrate some
of the nice ideas to Wicket and lets try to go standardize Wicket as a JSR.

Again, I know this is a controversial proposition that might result in some
immature ones labeling and calling me names, as I've seen in the archives.
On the other hand I know there are wise and intelligent ones in this
community who would offer constructive arguments. It is these group of
people that I'll consider serious.

Gerald

2009/12/23 Lutz Hühnken 

> Hi everybody,
>
> I think the discussion on TheServerSide actually is somewhat
> interesting, but not because of the unfortunate Tapestry vs. Wicket
> flame war. Let's have a look at the topic leading to that...
>
> - One part of Java EE 6 is "CDI" (JSR 299)  -
> http://jcp.org/en/jsr/detail?id=299 - originally called "Web beans". I
> think it was inspired by Gavin Kings Seam Framework.
>
> - The reference implementation for that seems to be something called
> "Weld" - http://docs.jboss.org/weld/reference/1.0.0/en-US/html/
>
> - Weld has Wicket support build in, and the examples are given in
> Wicket (although the Java EE "standard" would be JSF 2) because Wicket
> is easier to learn than JSF (at least Gavin King says so in
> http://in.relation.to/Bloggers/HowToStartLearningJavaEE6, but I think
> many would agree with that).
>
> So the interesting (to me, at least) questions are:
>
> - How does CDI relate to Tapesty and Tapestry IOC?
>
> - Should / could Tapestry incorporate / conform to CDI somehow?
>
> - Should we try to add Tapestry support to Weld?
>
> - Or is Java EE 6 / CDI just not relevant to Tapestry?
>
> I haven't really looked at Web Beans resp. CDI yet, but from first
> site, it defines some context scopes (request, session, application,
> conversation) and some annotation based dependency injection.
> Both areas are already covered by Tapestry (although afaik there is no
> conversation scope (yet) in Tapestry).
>
> So are CDI and Tapestry mutually exclusive? Or should Tapestry be
> refactored to use standard CDI annotations, so it can claim to be a
> CDI / JSR 299 implementation?
>
> I would love to hear your opinions about that.
>
> Regards,
> Lutz
>
>
>
>
> --
> altocon GmbH
> http://www.altocon.de/
> Software Development, Consulting
> Hamburg, Germany
>
> -
> 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: Help with using DWR with Tapestry

2009-12-21 Thread Peter Stavrinides
What is Session? surely you should be using an SSO, and not a singleton 
service? i.e.: 

@SessionState
private Session _session;

-- 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Please visit http://www.albourne.com/email.html for important 
additional terms relating to this e-mail.

- Original Message -
From: "Ashwanth Kumar" 
To: "Tapestry users" 
Sent: Monday, 21 December, 2009 19:35:09 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Help with using DWR with Tapestry

Hello,

In my project, i would like to use DWR along with Tapestry! But i've a
probelm. Its like i need to access the DB, i use Hibernate with Tapestry. In
my class i've:

@Inject
private Session _session;

when i access this class from DWR, Tapestry doesn't interfere at all. But,
i'm getting a null pointer exception where i first start using the Session.
How and what should be done for this?

 - Ashwanth Kumar

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



Re: [ANNOUNCEMENT] New Tapestry 5 book

2009-11-12 Thread Peter Stavrinides
+1


- Original Message -
From: "Ivano Luberti" 
To: "Tapestry users" 
Sent: Thursday, 12 November, 2009 10:21:35 GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: Re: [ANNOUNCEMENT] New Tapestry 5 book

+1
If you need something signed with blood, drop me a copy of the document :-D


Igor Drobiazko ha scritto:
> Good news. My publisher made the first step towards the translation. They
> contacted several publishers outside Germany to find one that is interested
> in translation. If some of them is interested then we will have the english
> version of the book.
>
> If you want to help me to make the translation possible make some noise
> here. The more comments here the more likely we will have a translation.
> I'll keep you informed about the progress.
>
> On Wed, Sep 16, 2009 at 7:28 PM, Igor Drobiazko 
> wrote:
>
>   
>> Hello folks,
>>
>> I am pleased to announce a new Tapestry 5 book. The book is written in
>> German and is available as eBook on publisher's website:
>>
>>
>> http://www.addison-wesley.de/main/main.asp?page=home/bookdetails&ProductID=174975
>>
>>
>> The hardcover version of the book will be available starting from Sep 28
>> 2009.
>> I'll make another announcement when the hardcover version is released.
>>
>> Among other things the book covers :
>>* Getting Started with Tapestry 5
>>* Concepts of the framework
>>* Localization/internationalization
>>* Creating Forms
>>* Generation of user interfaces for JavaBeans
>>* Writing own components and mixins
>>* Ajax
>>* Writing tests for Tapestry applications
>>* Hibernate and Spring integration
>>* Dependency Injection and Tapestry IoC
>>* AOP and bytecode manipuation
>>
>> Special thanks go to Howard and Ulrich Stärk. Howard gave me some hints on
>> how to write a better book and wrote a foreword.
>> Ulrich was responsible for the technical review of the book and helped me
>> to improve the quality.
>>
>> Enjoy
>>
>> --
>> Best regards,
>>
>> Igor Drobiazko
>>
>> 
>
>
>
>   

-- 
==
dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344
web: www.archicoop.it
==


-
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 Central] Next Steps for Tapestry

2009-11-10 Thread Peter Stavrinides
My 2 cents, in order of priority:

1. Ongoing bug fixes, prioritized by severity and then community votes
2. Comprehensive multi-language docs (preferably community driven via 
collaboration software), including ALL types of docs (cookbook, API reference, 
tutorials, quickstart) and all in one place
3. A Tapestry Bible, but not another beginners book, it should have 
intermediate and advanced concepts explained with examples.
4. Least of all is new features in my list, they are nice to have but 
maintaining the user base means putting your house in order first (i.e.: all of 
the above) before doing new funky stuff with Tapestry
5. This last one is not critical, but an idea stemming from Tapestry 3 days: a 
place once again for users to share custom components, preferably directly off 
the Tapestry site... I personally see the Tapestry site as a hub of all 
Tapestry related activities. 

best wishes!
Peter


- Original Message -
From: "Borut Bolčina" 
To: "Tapestry users" 
Sent: Tuesday, 10 November, 2009 12:58:34 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: [Tapestry Central] Next Steps for Tapestry

And of course we can make more of this:
http://www.questionpro.com/akira/ShowResults?id=1151880&mode=data

The above was initiated long time ago:
http://bbwebcraft.blogspot.com/2009/02/wishlist-and-survey-for-tapestry-5.html

-borut

2009/11/10 Borut Bolčina 

> Hi,
>
> 2009/11/10 Inge Solvoll 
>
>
>
>> Maybe it would be a good idea to find out what most newcomers ask for, and
>> just put it in there, even if it doesn't make that much sense? It COULD
>> attract more people.
>>
>>
> That is exactly why I opened http://tapestry5.ideascale.com/
>
> -borut
>

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



Re: T5: Disable JavaScript usage

2009-10-09 Thread Peter Stavrinides
> I've to create a WebApp which may use plain html only! Is it possible/does
> it make sense to use Tapestry for that?
Yes of course,


> I would like to use Tapestry for that app because i made some good
> experience with it, but is Tapestry able to avoid JavaScript at all?
You are not forced to use JavaScript, Tapestry does include a minimum of 
JavaScript, but you don't have to use it.

cheers,
Peter



- Original Message -
From: "Klaus Kopruch" 
To: users@tapestry.apache.org
Sent: Friday, 9 October, 2009 12:00:16 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: T5: Disable JavaScript usage


Hello *

I've to create a WebApp which may use plain html only! Is it possible/does
it make sense to use Tapestry for that?

I would like to use Tapestry for that app because i made some good
experience with it, but is Tapestry able to avoid JavaScript at all?

Thanks for help
Klaus
-- 
View this message in context: 
http://www.nabble.com/T5%3A-Disable-JavaScript-usage-tp25817796p25817796.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: Problem with error404

2009-10-07 Thread Peter Stavrinides

Just as a side note, error pages work correctly in Tomcat 6 as well.

regards,
Peter 
-- 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Please visit http://www.albourne.com/email.html for important 
additional terms relating to this e-mail.

- Original Message -
From: "cordenier christophe" 
To: "Tapestry users" 
Sent: Wednesday, 7 October, 2009 16:44:17 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Problem with error404

Thanks, I did it.

2009/10/7 Thiago H. de Paula Figueiredo 

> Em Wed, 07 Oct 2009 10:17:09 -0300, Robin Komiwes 
> escreveu:
>
>  I must agree with Christophe. With the current behavior, you are not able
>> to distinguish a page that doesn't exist.
>>
>
> Please post a JIRA about it.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

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



Re: [t5] upgrade to java 6 and javassist

2009-10-07 Thread Peter Stavrinides

Tapestry works perfectly with Java 6 now!!

Lets not be ridiculous and claim that you need to shorten methods and method 
names etc in order to get it working, it has been completely compatible for 
some time now. This is a library issue, you must use 3.9.0.GA, which is the 
version provided by Tapestry 5.1, beware of Chenillekit it brings in an old 
version javassist 3.7, which in most causes this problem.

You must include this in your pom:


org.chenillekit
chenillekit-tapestry
1.2.0   


jboss
javassist

 



Cheers,
Peter

-- 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Please visit http://www.albourne.com/email.html for important 
additional terms relating to this e-mail.

- Original Message -
From: "Cameron Newham" 
To: "Tapestry users" 
Sent: Wednesday, 7 October, 2009 11:40:27 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: RE: [t5] upgrade to java 6 and javassist

When I had trouble with javassist a few months ago it was because there
were multiple versions on the classpath.

I'm using Java 1.6 and have had no problems since sorting out what jars
were being included.

I see I'm currently using 3.8.0.GA.


-Original Message-
From: Ville Virtanen [mailto:ville.virta...@cerion.fi] 
Sent: 07 October 2009 05:11
To: users@tapestry.apache.org
Subject: Re: [t5] upgrade to java 6 and javassist


Hi,

Also make 100% sure that there aren't multiple javassists (different
versions in classpath) AND that the included javassist version is the
right
one. Check this from the produced war, do NOT trust what the ide is
saying
;)

Sometimes we have had problems like this, but those were because maven
dependencies affected to the included javassist version.

We use java 6, and our compile targets are 1.6 in about ten projects, we
have multiple developers compiling with different versions of java and
haven't had any problems besides those javaassist version related.

The version of javassist that gets included for us is 3.9.0.GA

 - Ville

Ps. Below is the mvn configuration we're using w/ netbeans


org.apache.maven.plugins
maven-compiler-plugin

1.6
1.6
true
UTF-8
true
true




Thiago H. de Paula Figueiredo wrote:
> 
> Em Tue, 06 Oct 2009 17:39:17 -0300, Fermin Da Costa Gomez  
>  escreveu:
> 
>> Using Eclipse, my Compiler compliance level is set at 1.5 already and

>> still. What OS are you using?
> 
> Ubuntu. But I guess it's not operating-system related.
> 
>> The @OnEvent i understand but i can't find a 'ready made' entry for
the
>> EventConstants.
> 
> What do you mean by ready-made? EventConstants is just a class that  
> declares String constants. You can use the event name directly if you
want  
> or need.
> 
>> Do i make my own enum for that?
> 
> No, event names are Strings.
> 
>> And if so, how does that
>> hook into the autocompleter mixin without additional coding?
> 
> I'm not following you here. All events are hooked by name and,
optionally,  
> component id, just that.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/-t5--upgrade-to-java-6-and-javassist-tp25295834p25
780245.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


**
 
Experience the British Library online at http://www.bl.uk/
 
The British Library’s new interactive Annual Report and Accounts 2007/08 : 
http://www.bl.uk/knowledge
 
Help the British Library conserve the world's knowledge. Adopt a Book. 
http://www.bl.uk/adoptabook
 
The Library's St Pancras site is WiFi - enabled
 
*
 
The information contained in this e-mail is confidential and may be legally 
privileged. It is intended for the addressee(s) only. If you are not the 
intended recipient, please delete this e-mail and notify the 
mailto:postmas...@bl.uk : The contents of this e-mail must not be disclosed or 
copied without the sender's consent.
 
The statements and opinions expressed in this message are those of the author 
and do not necessarily reflect those of the British Library.

Re: Validation question - at which point are property values set before post

2009-10-07 Thread Peter Stavrinides
Thanks for the explanations, much appreciated to all.

Peter

- Original Message -
From: "cordenier christophe" 
To: "Tapestry users" 
Sent: Wednesday, 7 October, 2009 15:07:52 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Validation question - at which point are property values set  
before post

Hi

The solutions suggested by Dirk and Urlich sounds good to me.

Actually, in the submission process the target variable set with 'value'
attribute is modified only if validation succeeds. This is why your code
doesn't work.

Christophe.

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



Re: Validation question - at which point are property values set before post

2009-10-07 Thread Peter Stavrinides
Anybody?

- Original Message -
From: "Peter Stavrinides" 
To: "Tapestry Mailing List" 
Sent: Tuesday, 6 October, 2009 10:07:53 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Validation question - at which point are property values set before 
post

Hi everyone,

I came across what seems a strange scenario to me, using Tapestry 5 validation. 
I am looking for a little understanding more than anything else with regards to 
'the point at which properties values are set, before a form posts'...  please 
examine this code snippet:

//This code works
public void onSuccess() throws SQLException {

if(isTerminated()){
if(personnelData.getEndDate() == null){  
employeeform.recordError("End date is 
required");
return;
}
}
...
}

//And this code doesn't because the property personnelData.getEndDate() appears 
to not have been set yet!

void onValidateFromEndDate(){
if(isTerminated()){
if(personnelData.getEndDate() == null){
employeeform.recordError("End date is required");
}
}
}

personnelData.getEndDate() evaluates to a date in the onSuccess() method, but 
in the onValidateFromEndDate validator it is null?? the component in question 
is a datepicker, so the value is set via JavaScript. I am wandering why 
Tapestry doesn't pick up the value change until the onSuccess() event triggers.

Thanks,
Peter

-
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: Jetty lock on JS-files in classpath breaks eclipse autobuild

2009-10-06 Thread Peter Stavrinides
If you are moving to maven the you will have the maven plug-in to run your app, 
and the default maven setup will work out of the box, so really there is very 
little for you to configure. 

Add your source folders (and matching resource folders) to the build path, 
configure the output folder and nothing more.

Peter

-- 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Please visit http://www.albourne.com/email.html for important 
additional terms relating to this e-mail.

- Original Message -
From: "Inge Solvoll" 
To: "Tapestry users" 
Sent: Wednesday, 7 October, 2009 09:40:36 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Jetty lock on JS-files in classpath breaks eclipse autobuild

The file synch approach worked nicely. But it would be nice to hear about
other and possibly better solutions, as this is a hack that is a bit
cumbersome to distribute among our developers...

My environment:

T5.1.0.5
Eclipse 3.4
Vista 64 bit
Java 1.6u17 64 bit
Jetty 6.1.12rc1

I have configured jetty to point to my project directory to launch the
webapp through a "mycontext.xml" in /contexts. My project
structure is pretty much a war layout, with all java files and T5 resource
files in CVS under /src. We're planning migration from ant to
Maven, but no luck getting the resources needed yet.

Howard: In what way are classes folders added to the runtime path? I guess
they are in eclipse, but is the webapp running on a standalone jetty aware
of their existence? When I set WEB-INF/classes as build target for my src
folder, all class files end up there, accessible in a standard webapp way.
Are other classes folders added as jars in WEB-INF/lib?

On Tue, Oct 6, 2009 at 7:18 PM, Howard Lewis Ship  wrote:

> One option here is to put your non-Java resources into a folder,
> src/main/resources, and mark that folder as a classes folder (not a
> source folder). classes folder are simply added to the runtime path
> with no copying. This is what I do.
>
> On Tue, Oct 6, 2009 at 7:59 AM, Peter Stavrinides
>  wrote:
> > What is your exact environment / configuration?
> >
> > - Original Message -
> > From: "Inge Solvoll" 
> > To: "Tapestry users" 
> > Sent: Tuesday, 6 October, 2009 10:57:30 GMT +02:00 Athens, Beirut,
> Bucharest, Istanbul
> > Subject: Jetty lock on JS-files in classpath breaks eclipse autobuild
> >
> > Hi!
> >
> > I'm having problems with my development environment.
> >
> > First of all: I have set the useFileMappedBuffer=false in
> > /etc/webdefault.xml
> >
> > My problem is that Tapestry 5 Javascript files located in WEB-INF/classes
> > and subfolders are locked by Jetty. This prevents eclipse from deleting
> > WEB-INF/classes to do a rebuild after I make a change in a java file. The
> > end result is that most class files are deleted and not rebuilt, so I
> have
> > to stop jetty, do a manual rebuild, and then start Jetty again. This if,
> of
> > course, a disaster for me...
> >
> > Does anyone here have a clue on how to prevent Jetty from locking the
> > resource files in WEB-INF/classes?
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.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: Jetty lock on JS-files in classpath breaks eclipse autobuild

2009-10-06 Thread Peter Stavrinides
What is your exact environment / configuration?

- Original Message -
From: "Inge Solvoll" 
To: "Tapestry users" 
Sent: Tuesday, 6 October, 2009 10:57:30 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Jetty lock on JS-files in classpath breaks eclipse autobuild

Hi!

I'm having problems with my development environment.

First of all: I have set the useFileMappedBuffer=false in
/etc/webdefault.xml

My problem is that Tapestry 5 Javascript files located in WEB-INF/classes
and subfolders are locked by Jetty. This prevents eclipse from deleting
WEB-INF/classes to do a rebuild after I make a change in a java file. The
end result is that most class files are deleted and not rebuilt, so I have
to stop jetty, do a manual rebuild, and then start Jetty again. This if, of
course, a disaster for me...

Does anyone here have a clue on how to prevent Jetty from locking the
resource files in WEB-INF/classes?

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



  1   2   3   4   5   6   >