Re: Jasper Reports integration module-GSOC 2010

2010-04-06 Thread Ulrich Stärk

Welcome on this list Charith.

So what exactly are you planning to do? What will your integration look like? Please discuss your 
more concrete ideas. Just saying "I'll do a JasperReports integration because JasperReports is nice" 
just is not enough. You should think of how the integration is supposed to work, what components you 
are planning to implement and think of what problems you might encounter on your way.


Cheers,

Uli

On 07.04.2010 01:26, Charith Madusanka wrote:

i'm Create JasperReports integration GSOC   2010 project. my idea
was writing JasperReports integration  module   to tapesty.
it will help to developer  make easer do all report generation in
tapsrty. Jasper
is very nice and it have following advantages,

- easy to use

- you will find lots of support on the web

- there is a very good support for special features of print file formats

- support for very elaborate output


charitha



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



Embed an installation application in your tapestry 5 application

2010-04-06 Thread Christophe Cordenier
Hi,

For Tapestry developers who are interested in a easy way to build a
configuration wizard for their Tapestry 5 applications, we have started a
new project called 'tapestry5-installer' that allows to load the 'real'
application after the configuration is finished.

This solution is currently under test with wooki.

http://github.com/spreadthesource/tapestry5-installer/

http://spreadthesource.com/2010/04/create-your-web-installation-wizard-for-your-tapestry-5-applications/


-- 
Regards,
Christophe Cordenier.

Developer of wooki @wookicentral.com


Jasper Reports integration module-GSOC 2010

2010-04-06 Thread Charith Madusanka
i'm Create JasperReports integration GSOC   2010 project. my idea
was writing JasperReports integration  module   to tapesty.
it will help to developer  make easer do all report generation in
tapsrty. Jasper
is very nice and it have following advantages,

- easy to use

- you will find lots of support on the web

- there is a very good support for special features of print file formats

- support for very elaborate output


charitha


AjaxFormLoop and Radio button

2010-04-06 Thread raulmt

Hi,

I'm trying to use an AjaxFormLoop for rows that have a textfield and a radio
button. Outside the AjaxFormLoop I have a RadioGroup component to "contain"
all the Radio. But when I click the addRowLink I have an error because
RadioContainer is not in the environment (which is normal because RadioGroup
doesn't get rendered in the addRow event...). Is there a way to accomplish
this or a RadioGroup with its Radio MUST be rendered all together?

Thanks.
-- 
View this message in context: 
http://n2.nabble.com/AjaxFormLoop-and-Radio-button-tp4861936p4861936.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



Re: Select with CustomTO

2010-04-06 Thread Thiago H. de Paula Figueiredo
On Tue, 06 Apr 2010 17:32:04 -0300, Michael Gentry   
wrote:



Hi Thiago,


Hi!


I'm curious as to why you think putting a List in a Session is very
wrong?  Especially since I do it often.  :-)


Lists themselves aren't problematic, but the amount of memory used per  
user is.


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



Re: Select with CustomTO

2010-04-06 Thread Michael Gentry
Hi Thiago,

I'm curious as to why you think putting a List in a Session is very
wrong?  Especially since I do it often.  :-)

Thanks!

mrg


On Tue, Apr 6, 2010 at 8:29 AM, Thiago H. de Paula Figueiredo
 wrote:
> That approach, in my humble opinion, is plain wrong. You have to retrieve a
> list of objects when you need just one of them (wrong) or put a list in a
> session (very wrong). Create one instance of OptionModelImpl for each of
> your options (objects) and pass them to a SelectModelImpl.

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



Zone updating / caching

2010-04-06 Thread Jim O'Callaghan
Is there a convenient way of ensuring a zone updates from the server upon
browser back or is something hackish in onLoad required?  I found this
previous related query below but don't want to completely abandon the
browser cache for multiple pages / image heavy areas etc.. 

http://www.nabble.com/T5---Zone-update-annoyance.-tp22680692p22708410.html

 

The context is a menu component that can be used in many places that
references a variable held at SessionContext to get an idea of where it is
in the menu hierarchy.  Is there something that can be set at block / zone
level that will force a zone show / update / etc?

 

Would be grateful to head how other users have worked around this.

 

Regards,

Jim.



Re: Select with CustomTO

2010-04-06 Thread Thiago H. de Paula Figueiredo
On Tue, 06 Apr 2010 13:38:38 -0300, Benny Law   
wrote:



Both of these Impl classes are in an internal package inside Tapestry. I
have always wondered whether it is considered good practice to  
instantiate these internal classes directly in our code?


You're right. Tapestry misses some public usable SelectModel and  
OptionModel implementation. While this doesn't happen, you can use these  
classes.


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



[Tapestry Central] Meta-Programming Java with Tapestry

2010-04-06 Thread Howard
A significant amount of what Tapestry does is meta programming: code
that modifies other code. Generally, we're talking about adding
behavior to component classes, which are transformed as they are loaded
into memory. The meta-programming is the code that sees all those
annotations on methods and fields, and rebuilds the classes so that
everything works at runtime.
Unlike AspectJ, Tapestry does all of its meta-programming at runtime.
This fits in better with live class reloading, and also allows for
loaded libraries to extend the meta-programming that's built-in to the
framework.
All the facilities Tapestry has evolved to handle meta-programming make
it easy to add new features. For example, I was doing some work with
the Heartbeat enviromental object. Heartbeat allows you to schedule
part of your behavior for "later". First off, why would you need this?
A simple example is the relationship between a Label component and a
form control component such as TextField. In your template, you may use
the two together:
 

The for parameter there is not a simple string, it is a component id.
You can see that in the source for the Label component:
@Parameter(name = "for", required = true, allowNull = false,
defaultPrefix = BindingConstants.COMPONENT) private Field field;

Why does for="email" match agains the email component, and not some
property of the page named email? That's what the defaultPrefix
annotation attribute does: it says "pretend there's a component: prefix
on the binding unless the programmer supplies an explicit prefix."
So you'd think that would wrap it up, we just need to do the following
in the Label code:
writer.element("label", "for", field.getClientId());

Right? Just ask the field for its client-side id and now all is happy.
Alas, that won't work. The Label component renders before the
TextField, and the clientId property is not set until the TextField
renders. What we need to do is wait until they've both rendered, and
then fill in the for attribute after the fact.
That's where Heartbeat comes in. A Heartbeat represents a container
such as a Loop or a Form. A Heartbeat starts, and accumulates deferred
commands. When the Heartbeat ends, the deferred commands are executed.
Also, Heartbeats can nest.
Using the Heartbeat, we can wait until the end of the current heartbeat
after both the Label and the TextField have rendered and then get an
accurate view of the field's client-side id. Since Tapestry renders a
DOM (not a simple text stream) we can modify the Label's DOM Element
after the fact.
Without the meta-programming, it looks like this:
@Environmental private Heartbeat heartbeat; private Element
labelElement; boolean beginRender(MarkupWriter writer) { final Field
field = this.field; decorator.beforeLabel(field); labelElement =
writer.element("label"); resources.renderInformalParameters(writer);
Runnable command = new Runnable() { public void run() { String fieldId
= field.getClientId(); labelElement.forceAttributes("for",
fieldId, "id", fieldId + "-label"); decorator.insideLabel(field,
labelElement); } }; heartbeat.defer(command); return !ignoreBody; }

See, we've gotten the active Heartbeat instance for this request and we
provide a command, as a Runnable. We capture the label's Element in an
instance variable, and force the values of the for (and id) attributes.
Notice all the steps: inject the Heartbeat environmental, create the
Runnable, and pass it to defer().
So where does the meta-programming come in? Well, since Java doesn't
have closures, it has a pattern of using component methods for the same
function. Following that line of reasoning, we can replace the Runnable
instance with a method call that has special semantics, triggered by an
annotation:
private Element labelElement; boolean beginRender(MarkupWriter writer)
{ final Field field = this.field; decorator.beforeLabel(field);
labelElement = writer.element("label");
resources.renderInformalParameters(writer); updateAttributes();
return !ignoreBody; } @HeartbeatDeferred private void
updateAttributes() { String fieldId = field.getClientId();
labelElement.forceAttributes("for", fieldId, "id", fieldId + "-label");
decorator.insideLabel(field, labelElement); }

See what's gone on here? We invoke updateAttributes, but because of
this new annotation, @HeartbeatDeferred, the code doesn't execute
immediately, it waits for the end of the current heartbeat.
What's more surprising is how little code is necessary to accomplish
this. First, the new annotation:
@Target(ElementType.METHOD) @Retention(RUNTIME) @Documented @UseWith( {
COMPONENT, MIXIN, PAGE }) public @interface HeartbeatDeferred { }

The @UseWith annotation is for documentation purposes only, to make it
clear that this annotation is for use with components, pages and
mixins ... but can't be expected to work elsewhere, such as in services
layer objects.
Next we need the actual meta-programming code. Component
meta-programming is accomplished by classes that implement the
ComponentCl

Re: Select with CustomTO

2010-04-06 Thread Benny Law
>
> I took a look to:
>> http://wiki.apache.org/tapestry/Tapestry5HowtoSelectWithObjects
>>
>
> That approach, in my humble opinion, is plain wrong. You have to retrieve a
> list of objects when you need just one of them (wrong) or put a list in a
> session (very wrong). Create one instance of OptionModelImpl for each of
> your options (objects) and pass them to a SelectModelImpl.
>

Both of these Impl classes are in an internal package inside Tapestry. I
have always wondered whether it is considered good practice to instantiate
these internal classes directly in our code?

Benny


Re: ServiceOverride recursion issue - T5.2

2010-04-06 Thread Andrus Adamchik
FWIW, when I got back to the override issue after a few days of  
unrelated work (mostly expanding the registry with a few unrelated  
services), suddenly this started to work:


@SubModule( { ServicesModule.class })
public class AppModule {

public static void contributeServiceOverride(
MappedConfiguration, Object> configuration,
@Local ISiteService siteServiceOverride) {

configuration.add(ISiteService.class, siteServiceOverride);
}

public static ISiteService buildXyz(IDataService dataService) {
return new MySiteService(dataService);
}
}

A different order of service loading or a typo in the old build method  
name... Hard to say now.


Andrus


On Apr 2, 2010, at 4:52 PM, Andrus Adamchik wrote:


Ok, not very specific, but I found what you are referring to.

Unfortunately @Local annotation on the override itself doesn't help.  
It seems like I have to define local versions of all dependencies,  
which is something I'd really like to avoid for stateless services.  
A similar structure of services worked with Hivemind and T4, so I  
wonder if there's a way to make it work in T5 as well? (other than  
binding concrete service implementation at the app level to avoid  
overrides)


Andrus


On Apr 2, 2010, at 4:21 PM, Howard Lewis Ship wrote:


http://tapestry.apache.org/tapestry5.1/tapestry-ioc/cookbook/override.html

On Fri, Apr 2, 2010 at 3:58 AM, Andrus Adamchik > wrote:

Hi guys,

having a bit of trouble overriding my services with T5.2 (build  
from a few
days ago ... can't use 5.1 due to some bugs that got fixed in  
5.2). I have

AppModule and a submodule:

@SubModule( { ServicesModule.class })
public class AppModule {

  public static void bind(ServiceBinder binder) {
  // this works if ISiteService is not bound in  
ServicesModule
  // binder.bind(ISiteService.class,  
MySiteService.class);

  }

  public static void contributeServiceOverride(
  MappedConfiguration, Object>  
configuration)

{

  // this fails with exception below
  configuration.addInstance(ISiteService.class,
MySiteService.class);
  }
}

On startup I get an error below about recursive loading of
'ServiceOverride'. MySiteService has a long chain of dependencies,  
but
nothing is recursive in it. If instead I override with a mock  
service with

no dependencies, things work. So the culprit here is not the custom
services, but rather Tapestry 'ServiceOverride'. Any idea what's  
wrong?


Thanks,
Andrus


[02/Apr/2010:13:50:03] main  ERROR Registry: Construction of service
'ServiceOverride' has failed due to recursion: the service depends  
on itself

in some way. Please check
org 
.apache.tapestry5.ioc.internal.services.ServiceOverrideImpl(Map) (at

ServiceOverrideImpl.java:31) via
org 
.apache 
.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder) (at
TapestryIOCModule.java:46) for references to another service that  
is itself

dependent on service 'ServiceOverride'.
[02/Apr/2010:13:50:03] main  ERROR Registry: Operations trace:
[02/Apr/2010:13:50:03] main  ERROR Registry: [ 1] Realizing service
ServletApplicationInitializer
[02/Apr/2010:13:50:03] main  ERROR Registry: [ 2] Invoking
org 
.apache 
.tapestry5 
.services.TapestryModule.buildServletApplicationInitializer(Logger,

List, ApplicationInitializer) (at TapestryModule.java:1435)
[02/Apr/2010:13:50:03] main  ERROR Registry: [ 3] Constructing  
module class

org.apache.tapestry5.services.TapestryModule
[02/Apr/2010:13:50:03] main  ERROR Registry: [ 4] Determining  
injection
value for parameter #1  
(org.apache.tapestry5.ioc.services.PipelineBuilder)
[02/Apr/2010:13:50:03] main  ERROR Registry: [ 5] Resolving object  
of type
org.apache.tapestry5.ioc.services.PipelineBuilder using  
MasterObjectProvider

[02/Apr/2010:13:50:03] main  ERROR Registry: [ 6] Realizing service
ServiceOverride
[02/Apr/2010:13:50:03] main  ERROR Registry: [ 7] Invoking
org 
.apache.tapestry5.ioc.internal.services.ServiceOverrideImpl(Map) (at

ServiceOverrideImpl.java:31) via
org 
.apache 
.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder) (at

TapestryIOCModule.java:46)
[02/Apr/2010:13:50:03] main  ERROR Registry: [ 8] Determining  
injection

value for parameter #1 (java.util.Map)
[02/Apr/2010:13:50:03] main  ERROR Registry: [ 9] Collecting mapped
configuration for service ServiceOverride
[02/Apr/2010:13:50:03] main  ERROR Registry: [10] Invoking method
x 
.services.AppModule.contributeServiceOverride(MappedConfiguration)  
(at

AppModule.java:25).
[02/Apr/2010:13:50:03] main  ERROR Registry: [11] Autobuilding  
instance of

class x.services.site.MySiteService
[02/Apr/2010:13:50:03] main  ERROR Registry: [12] Determining  
injection

value for parameter #1 (.service.db.IDataService)
[02/Apr/2010:13:50:03] main  ERROR Registry: [13] Resolving object  
of type

.service.db.

Re: Possible memory leak in zone update?

2010-04-06 Thread Jochen Berger
Andreas,

sorry for not responding for so long, but I have been busy with a lot of
other stuff.

Andreas Andreou wrote:
> Chrome's Developer Tools (ctrl+shift+i) have a "profiles" tab.
> Once selected, you'll find a "Take heap snapshot" at the bottom...
> press it once at the start, then again at the end of the activity
> you want to perform and it'll show you what changed

Thanks a lot for the hint. I have tried the developer tools but only
came to the conclusion that something is leaking memory, which didn't
get me very far.
I also spent some days with trying tapestry 5.2, hacking tapestry.js,
trying to rephrase bits of code that looked suspicious to me, but
without much success. Today I also tried the new prototype RC, but the
results were comparable to the 1.6.1 one.
Today I stumbled upon a ticket in the prototype bugtracker [1], and
after applying parts of the appended patch and playing around, I am now
sure, that it is definitely related.
Unfortunately, that patch increases the CPU usage considerably, mostly
due to the CACHE=CACHE.without(element) line.
I haven't yet made up my mind whether to completely remove the CACHE
parts (which seem to be needed for IE only, which I don't care about for
that project) or spend more time to find a better way, but I thought I'd
share my findings.

Regards,
Jochen

[1] https://prototype.lighthouseapp.com/projects/8886/tickets/466


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



Res: [T5.1] Can I manually use the IoC container to obtain Objects?

2010-04-06 Thread Kristian Marinkovic
right... classes that are not controlled by Tapestry IoC cannot 
use Tapestry IoC dependency injection.

therefore you have to switch to programmatic configuration. 

g,
kris



Von:Everton Agner 
An: Tapestry users 
Datum:  06.04.2010 14:50
Betreff:Res: Res: [T5.1] Can I manually use the IoC container to 
obtain Objects?



So, if I configure at Runtime - in my own HibernateConfigurer (which I 
already have it, btw) - the listeners are added to the Tap IoC registry? 
Umm... I'll try it, it sounds pretty good.

Thanks :)

- Everton





De: Kristian Marinkovic 
Para: Tapestry users 
Enviadas: Terça-feira, 6 de Abril de 2010 9:38:48
Assunto: Res: [T5.1] Can I manually use the IoC container to obtain 
Objects?

when using tapestry-hibernate you can contribute your own
HibernateConfigurer which has access to the Hibernate Configuration.
then you can add an EventListener, build by Tapestry IOC, to the 
configuration.

i guess you'll have to do it akin.

or (not a clean solution) you set the tapestry ioc registry into a public 
static field somewhere. so you can access it from your listener.

g,
kris



Von:Everton Agner 
An: Tapestry users 
Datum:  06.04.2010 14:29
Betreff:Res: [T5.1] Can I manually use the IoC container to obtain 

Objects?



Anything?





De: Everton Agner 
Para: Tapestry Users 
Enviadas: Segunda-feira, 5 de Abril de 2010 15:42:55
Assunto: [T5.1] Can I manually use the IoC container to obtain Objects?

Hi,

As I've said before, I'm integration Envers in my T5.1 Application, and 
everything seems clear except for : How can I obtain the Request object by 

the IoC if the Enver's RevisionListener class is not controlled by the 
IoC? (it's a Singleton per EntityManagerFactory object as far as I've 
read)

So... can I manually use the IoC container to obtain Objects? I guess T5.1 

will not understand some @Inject annotations in a 
not-T5.1-IoC-controlled-Class.

If not, how can I add my RevisionListener Class to the T5.1 IoC control?

Thanks

- Everton





Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com




Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com



 

Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com


Res: Res: [T5.1] Can I manually use the IoC container to obtain Objects?

2010-04-06 Thread Everton Agner
So, if I configure at Runtime - in my own HibernateConfigurer (which I already 
have it, btw) - the listeners are added to the Tap IoC registry? Umm... I'll 
try it, it sounds pretty good.

Thanks :)

- Everton





De: Kristian Marinkovic 
Para: Tapestry users 
Enviadas: Terça-feira, 6 de Abril de 2010 9:38:48
Assunto: Res: [T5.1] Can I manually use the IoC container to obtain Objects?

when using tapestry-hibernate you can contribute your own
HibernateConfigurer which has access to the Hibernate Configuration.
then you can add an EventListener, build by Tapestry IOC, to the 
configuration.

i guess you'll have to do it akin.

or (not a clean solution) you set the tapestry ioc registry into a public 
static field somewhere. so you can access it from your listener.

g,
kris



Von:Everton Agner 
An: Tapestry users 
Datum:  06.04.2010 14:29
Betreff:Res: [T5.1] Can I manually use the IoC container to obtain 
Objects?



Anything?





De: Everton Agner 
Para: Tapestry Users 
Enviadas: Segunda-feira, 5 de Abril de 2010 15:42:55
Assunto: [T5.1] Can I manually use the IoC container to obtain Objects?

Hi,

As I've said before, I'm integration Envers in my T5.1 Application, and 
everything seems clear except for : How can I obtain the Request object by 
the IoC if the Enver's RevisionListener class is not controlled by the 
IoC? (it's a Singleton per EntityManagerFactory object as far as I've 
read)

So... can I manually use the IoC container to obtain Objects? I guess T5.1 
will not understand some @Inject annotations in a 
not-T5.1-IoC-controlled-Class.

If not, how can I add my RevisionListener Class to the T5.1 IoC control?

Thanks

- Everton





Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com




Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com



  

Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com

Res: [T5.1] Can I manually use the IoC container to obtain Objects?

2010-04-06 Thread Kristian Marinkovic
when using tapestry-hibernate you can contribute your own
HibernateConfigurer which has access to the Hibernate Configuration.
then you can add an EventListener, build by Tapestry IOC, to the 
configuration.

i guess you'll have to do it akin.

or (not a clean solution) you set the tapestry ioc registry into a public 
static field somewhere. so you can access it from your listener.

g,
kris



Von:Everton Agner 
An: Tapestry users 
Datum:  06.04.2010 14:29
Betreff:Res: [T5.1] Can I manually use the IoC container to obtain 
Objects?



Anything?





De: Everton Agner 
Para: Tapestry Users 
Enviadas: Segunda-feira, 5 de Abril de 2010 15:42:55
Assunto: [T5.1] Can I manually use the IoC container to obtain Objects?

Hi,

As I've said before, I'm integration Envers in my T5.1 Application, and 
everything seems clear except for : How can I obtain the Request object by 
the IoC if the Enver's RevisionListener class is not controlled by the 
IoC? (it's a Singleton per EntityManagerFactory object as far as I've 
read)

So... can I manually use the IoC container to obtain Objects? I guess T5.1 
will not understand some @Inject annotations in a 
not-T5.1-IoC-controlled-Class.

If not, how can I add my RevisionListener Class to the T5.1 IoC control?

Thanks

- Everton



 

Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com


 

Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com


Re: Select with CustomTO

2010-04-06 Thread Thiago H. de Paula Figueiredo
On Tue, 06 Apr 2010 08:54:33 -0300, Santiago W. Fernandez Lorenzo  
 wrote:



Hello.


Hi!


I took a look to:
http://wiki.apache.org/tapestry/Tapestry5HowtoSelectWithObjects


That approach, in my humble opinion, is plain wrong. You have to retrieve  
a list of objects when you need just one of them (wrong) or put a list in  
a session (very wrong). Create one instance of OptionModelImpl for each of  
your options (objects) and pass them to a SelectModelImpl.


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



Res: [T5.1] Can I manually use the IoC container to obtain Objects?

2010-04-06 Thread Everton Agner
Anything?





De: Everton Agner 
Para: Tapestry Users 
Enviadas: Segunda-feira, 5 de Abril de 2010 15:42:55
Assunto: [T5.1] Can I manually use the IoC container to obtain Objects?

Hi,

As I've said before, I'm integration Envers in my T5.1 Application, and 
everything seems clear except for : How can I obtain the Request object by the 
IoC if the Enver's RevisionListener class is not controlled by the IoC? (it's a 
Singleton per EntityManagerFactory object as far as I've read)

So... can I manually use the IoC container to obtain Objects? I guess T5.1 will 
not understand some @Inject annotations in a not-T5.1-IoC-controlled-Class.

If not, how can I add my RevisionListener Class to the T5.1 IoC control?

Thanks

- Everton



  

Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com


  

Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com

Re: submit form on Safari and Opera doesn't work

2010-04-06 Thread LiborGMC


You're complicating your implementation beyond needed. What you're trying  
is to do two requests in sequence: one to submit the form, other to handle  
an event. This is very error-prone, as it relies on the ordering of the  
arrival of the. Just use a LinkSubmit: the form will be submitted and the  
selected event will be triggered in the same request.

 Well, LinkSubmit didn't works for me. But you are right that my problem was
in ordering of click events. So I got rid off action on click and all my
logic I put to "submitForm" handler. Type of action I send as a hidden
field. It starts finally work even in Safari and Opera.
Many thanks

Libor
-- 
View this message in context: 
http://old.nabble.com/submit-form-on-Safari-and-Opera-doesn%27t-work-tp28081757p28150868.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



Select with CustomTO

2010-04-06 Thread Santiago W. Fernandez Lorenzo
Hello.

I'm having trouble making a *select based on CustomTOs.*

I explain myself:

I have three entities:
- *User*(idUser, name, surname, phone,...)
- *Proyect*(idProyect, name, city,)
- *Member*(idMember, idUser, idProyect, ...)

I want to* make a select using user.name as label and member.idMember as
value.*
I took a look to:
http://wiki.apache.org/tapestry/Tapestry5HowtoSelectWithObjects

Now, I have the following:
- *MemberCTO(idMember, name)*, with a public Constructor, and getters &
setters for idMember, name

--
On the page (.tml) I have:

 

 
 

--
On the page (.java) I have
...
@Persist @Property private memberCTO memberCTO;
private GenericSelectModel membersCTO;
public  GenericSelectModel getmembersCTO(){
return membersCTO;
}

void setupRender() {
membersCTO = new GenericSelectModel
(memberDao.findUsersInProyect( fase.getProyecto().getIdProyecto()),
 memberCTO.class, "name", "idMember", _access);
}
The source code of GenericSelectModel was obtained from:
http://wiki.apache.org/tapestry/Tapestry5HowtoSelectWithObjects


I try to load the page, and I get an error (you can see it at the end).

I debugged the code, and I can say:
- membersCTO contains an ArrayList with the data obtained form
the DB.
- GenericSelectModel, establish (at the Constructor):
  - idFieldAdapter...: PropertyAdarptedImpl. name='idMember'
  - labelFieldAdapter: PropertyAdarptedImpl. name='name'
  (I think its correct)
- List getOptions() {} (Inside GenericSelectModel class)
for (T obj : list) {
 optionModelList.add(new OptionModelImpl(nvl(labelFieldAdapter.get(obj)),
obj));
}
 Generate an exception.
 Particularlly: labelFieldAdapter.get(obj) doesnt work:
 obj:
Object[2]  (id=438)
 *[0]** *Long  (id=445)
 value 6
*[1]* "admin" (id=446)
 count 5
hash 0
 offset 0
value (id=447)

 Exception: java.lang.RuntimeException: Error reading property 'name' of
[Ljava.lang.Object;@1890909: object is not an instance of declaring class



ERROR:
-

An unexpected application exception has occurred.

org.apache.tapestry5.internal.services.RenderQueueException
Render queue error in BeforeRenderTemplate[project/Task:miembrocto]: Error
reading property 'name' of [Ljava.lang.Object;@191e550: object is not an
instance of declaring class
 




location
classpath:serviguide/inludes/proyectos/web/pages/project/Task.tml, line 81
java.lang.IllegalArgumentException
object is not an instance of declaring class
Hide uninteresting stack frames Stack trace
java.lang.reflect.Method.invoke(Method.java:597)
org.apache.tapestry5.ioc.internal.services.PropertyAdapterImpl.get(PropertyAdapterImpl.java:96)
serviguide.inludes.proyectos.web.util.GenericSelectModel.getOptions(GenericSelectModel.java:68)
org.apache.tapestry5.util.AbstractSelectModel.visit(AbstractSelectModel.java:46)
org.apache.tapestry5.corelib.components.Select.options(Select.java:236)
org.apache.tapestry5.corelib.components.Select.beforeRenderTemplate(Select.java)
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeforeRenderTemplatePhase.invokeComponent(ComponentPageElementImpl.java:253)
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.run(ComponentPageElementImpl.java:164)
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:941)
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$400(ComponentPageElementImpl.java:49)
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.callback(ComponentPageElementImpl.java:159)
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeforeRenderTemplatePhase.render(ComponentPageElementImpl.java:258)
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:74)
org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:121)
org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37)
org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryModule.java:1748)
org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.java:1732)
org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:1714)
org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryModule.java:1700)
org.apache.tapestry5.services.TapestryModule$23.renderMarkup(TapestryModule.java:1681)
org.apache.tapestry5.services.TapestryModule$22.renderMarkup(TapestryModule.java:1662)
org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:64)
org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:61)
org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:63)
org.apache.tapestry5.services.TapestryModule$33.handle(TapestryModu

problems with client validation Internet Explorer 8 - no background images

2010-04-06 Thread Kiss Izolda
Hello, I have set the form parameter: clientValidation=true and defined 
validations for the fields, like this:txtRowsPerPage-required-message=You must provide a value for: rows per page!
when the validation fails the following div appears:You 
must provide a value for: rows per page!  Using Internet Explorer 
8: only the message appears no background images. I guess I have to redefine 
one or more of the following css entries:html > body div.t-error-popup spanhtml 
> body div.t-error-popupdiv.t-error-popup
div.t-error-popup span Could somebody write me which and how exactly? thanx in 
advance Izolda

Re: Unit testing with tapestry 5.1 and spring

2010-04-06 Thread Paul Field
> I'm looking at the Testify framework, and while it looks promising, it 
still
> doesn't connect up the spring layer.
> 
> It also puts a /foo in front of every asset and page link on my page. 
> Frustrating

The "/foo" is a default context that Tapestry adds when using its testing 
features. It looks annoying but it is kind-of useful because it makes sure 
you are testing with a context value and helps avoid your features working 
when there is no context and then breaking when there is one (only likely 
to happen for low-level URL mangling features though).

I have looked at connecting the Spring layer into tests and it is quite 
hard to do. The tapestry-spring integration doesn't provide hooks that 
allow it to work outside a web container - it could do with some 
refactoring to allow this :-)

In case it helps, here's what my projects are doing: we do acceptance 
testing using Fitnesse with a full Spring container and the tests start 
just below the web UI. Then we unit test Tapestry components with Testify 
and integration test the whole lot with a small number of Selenium tests. 
We also use Selenium for any rich UIs with Ajax or Javascript.

Paul






---

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and delete this e-mail. Any unauthorized copying, 
disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional 
EU corporate and regulatory disclosures.