RE: Possible render problem/bug

2009-08-07 Thread Henning Petersen
I usually put the component inside a block and use it in both locations:


...


  ...





Foo


While the markup looks slightly messier, this saves you from having two
event handlers for the same thing.

Cheers
Henning

-Original Message-
From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] 
Sent: Friday, August 07, 2009 3:50 PM
To: Tapestry users
Subject: Re: Possible render problem/bug

Em Fri, 07 Aug 2009 10:47:29 -0300, Sebastian Hennebrueder  
 escreveu:

> I found this work around as well but this would require a second event  
> listener method.

You can use @OnEvent("action") in that case.

> But I suppose that the ids need to be unique on the Tapestry component  
> tree, so the fact that  the id is unique on the rendered result is not  
> relevant.

Absolutely right.

> As a consequence, I will need the second event listener (not really a  
> problem)

Not quite. :)

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



combine-scripts issue

2009-07-30 Thread Henning Petersen
Hi everybody,

I am experiencing seemingly random problems when I use combined scripts
under IE7 and IE8. It seems that sometimes, these browsers are unable to
fully load the combined script. In IE8, I see a permanent loading spinner,
and the page remains completely unresponsive to user input due to
Tapestry.waitForPage() (so that part _is_ loaded). I get this in IE7, too,
but there, the "Please wait" dialog displayed by Tapestry.waitForPage()
shows up and does not go away, as the request never completes.

All this is very hard to reproduce. It happens every once in a while on
pages with a certain set of scripts, and not at all on others. Also,
reloading the page ususally fixes the problem, which then later re-appears
sometimes. And I have never seen the problem in FF, Chrome or Safari, which
makes everything extra-hard to track down. There is also a web proxy
involved in the setup.

Setting tapestry.combine-scripts=false completely solves the problem. Have
you observed similar problems with combined scripts, or do you have a wild
guess what I'm missing?

Thanks
Henning


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



RE: again on webservices

2009-07-22 Thread Henning Petersen
I wouldn't run the web service through Tapestry at all. Instead, register
your web service as a separate servlet inside your application with a
certain path (e.g. "/ws/"), and make sure the Tapestry filter ignores those
paths by a contribution to your app module:

public static void contributeIgnoredPathsFilter(
final Configuration configuration) {
configuration.add("/ws/.*");
}

That will allow T5 and any other servlet to co-exist peacefully. You can
then use the same Spring context you use in T5 with your web service as
well. IMO, running the whole web service through T5 would gain you nothing,
at best.

Kind regards
Henning

-Original Message-
From: Thibaut Gadiolet [mailto:thibaut.gadio...@gmail.com] 
Sent: Tuesday, July 21, 2009 10:09 PM
To: Tapestry users
Subject: Re: again on webservices

Hi folks,

I was browsing nabble looking for something about Axis2 integration when I
found this topic.
So here is my question:

I have a web application based on Tapestry/Hibernate/Spring built by Maven.
My boss asked me to create a new Java Class and make it a Web Service.

So Andrea, how did you make it ?
Someone's got an easy solution to make a T5 page run with Axis ?


Thibaut




On Fri, May 22, 2009 at 4:23 PM, Andrea Chiumenti  wrote:

> I did, I can put a working example online if you want!
> but someone should write something on the wiki, unfortunately I have
> too many projects to bring on and i really don't have time, what I can
> do is to put a working example online.
>
> cheers kiuma
>
> On Wed, May 20, 2009 at 10:47 AM, Alfie Kirkpatrick
>  wrote:
> > If you are after full SOAP web service support it might make more sense
> > to wire in a framework like Axis or Glassfish Metro directly into
> > web.xml and not tie it to Tapestry pages per se.
> >
> > Which does raise a follow up question... has anyone successfully wired
> > Tapestry IOC with a web service framework, so we can have Tapestry
> > control the lifecycle of the web service implementation, inject other
> > services into it, etc, etc?
> >
> > Thanks, Alfie.
> >
> > -Original Message-
> > From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com]
> > Sent: 19 May 2009 22:47
> > To: Tapestry users
> > Subject: Re: again on webservices
> >
> > Em Tue, 19 May 2009 15:57:36 -0300, Andrea Chiumenti 
> >
> > escreveu:
> >
> >> I have a simple question:
> >> may a T5 page behave like a webservice (soap) ?
> >
> > Yes. Why not? :)
> > You can use Tapestry's templating engine to generate the answer or use
> > another code or framework to generate the answer and return it as a
> > StreamResponse.
> >
> > --
> > Thiago H. de Paula Figueiredo
> > Consultor, desenvolvedor e instrutor em Java
> > 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
>
>


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



Injecting Tapestry services into Spring beans

2009-07-10 Thread Henning Petersen
Hi everybody,

I'm trying to inject two services from Tapestry-Spring-Security into a
Spring bean, using Tapestry 5.1.0.5 and Spring 2.5.6-SEC01.

The way I think this should work is this:

public class PasswordChangeServiceImpl implements PasswordChangeService {

@Inject
private SaltSourceService saltSource;
@Inject
private PasswordEncoder passwordEncoder;

...

private String createPasswordHash(String plainTextPass) {
UserDetails userDetails = ...
Object salt = this.saltSource.getSalt(userDetails);
return this.passwordEncoder.encodePassword(plainTextPass,
salt);
}

}

and


...(other dependencies)...


I inject the service instance into my page using the @Inject annotation: 

public class UserProfile {
@Inject private PasswordChangeService passwordChangeService;
...
}

The service is properly configured as far as the dependencies handled by
Spring are concerned, but the two services that I'd like to be injected from
Tapestry's IoC newer make it into the instance, and I get a
NullPointerException when they are accessed.

Both SaltSourceService and PasswordEncoder are defined and visible on the
service status page, and they work like a charm when injected into
components directly. I'm not using 5.0 compatibility mode.

Does anyone have an idea what I am missing?

Thanks
Henning


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