Re: question-answer flow

2015-04-23 Thread Thiago H de Paula Figueiredo
On Thu, 23 Apr 2015 14:53:27 -0300, Cheng Zhang wrote: Hi, Hi! Our app need a new feature, asking the user to answer a series of questions, the next question is based on the answer of previous question. Basically it is a Q&A flow or tree. The Spring Web Flow might be a good framework for

question-answer flow

2015-04-23 Thread Cheng Zhang
Hi, Our app need a new feature, asking the user to answer a series of questions, the next question is based on the answer of previous question. Basically it is a Q&A flow or tree. The Spring Web Flow might be a good framework for this requirement but I found some integration with T4 rather than T5

Re: AW: AW: Splitting a tapestry web app into modules

2015-04-23 Thread Charlouze
g) Allow tapestry to add advisors h) it seems correct to me look there, it may help you : https://tapestry.apache.org/integrating-with-jpa.html Le jeu. 23 avr. 2015 à 16:21, Poggenpohl, Daniel < daniel.poggenp...@isst.fraunhofer.de> a écrit : > Hello, > > I have regressed to the old 2.0 namespac

AW: AW: AW: Splitting a tapestry web app into modules

2015-04-23 Thread Poggenpohl, Daniel
Hello, I have regressed to the old 2.0 namespace. Your version would probably work also because you don't use 2.1 specific XML elements, I think. I don't know what those are and I don't plan on using them right now, so I'll leave it at that. And presto: Suddenly I have tables that are generate

Re: AW: AW: Splitting a tapestry web app into modules

2015-04-23 Thread Charlouze
I"m using JPA 2.1 and: http://java.sun.com/xml/ns/persistence"; version="1.0"> Le jeu. 23 avr. 2015 à 15:38, Poggenpohl, Daniel < daniel.poggenp...@isst.fraunhofer.de> a écrit : > Hello again, > > I've come to a breakthrough with the problem in b.2): > My persistence.xml is being parsed using the

AW: AW: AW: Splitting a tapestry web app into modules

2015-04-23 Thread Poggenpohl, Daniel
Hello again, I've come to a breakthrough with the problem in b.2): My persistence.xml is being parsed using the org.apache.tapestry5.internal.jpa.PersistenceContentHandler. This XML handler checks for private static final String NAMESPACE_URI = "http://java.sun.com/xml/ns/persistence";; My old s

Re: AW: AW: AW: Splitting a tapestry web app into modules

2015-04-23 Thread Charlouze
The @PersistenceContext annotation is like the @Inject for EM. If you have only one persistence unit, you don't need to use it, the EM will be passed to the constructor by the registry. If you have multiple persistence unit as it seems that you do, you have to annotate the constructor parameter wit

Re: AW: AW: AW: Splitting a tapestry web app into modules

2015-04-23 Thread Thiago H de Paula Figueiredo
On Thu, 23 Apr 2015 08:46:53 -0300, Poggenpohl, Daniel wrote: Hi, thank you for your time, but I still have more questions... e) Are the [...]Module classes to be placed in the services package in the Tapestry app module? The package doesn't matter, unless in the case described below. f

AW: AW: AW: Splitting a tapestry web app into modules

2015-04-23 Thread Poggenpohl, Daniel
Hi, thank you for your time, but I still have more questions... e) Are the [...]Module classes to be placed in the services package in the Tapestry app module? f) Is the naming important? Or could I have a FooModule class without having a Foo module? And another topic has arisen, which leads me

Re: AW: AW: Splitting a tapestry web app into modules

2015-04-23 Thread Charlouze
Yep it's correct and no, there isn't any order. Each of your modules should have its own ModuleNameModule class. This class should contain a "public static void bind(ServiceBinder binder)" method where services are bound to the tapestry registry. An implementation of service should have a constru

AW: AW: AW: Splitting a tapestry web app into modules

2015-04-23 Thread Poggenpohl, Daniel
Hi again, so how flexible is this? I'm currently thinking about adding the tapestry-annotations dependency to my controller who needs to @Inject the DAOs. But if the DAOs themselves are declared as services, then I could add the necessary DAO interfaces to my controller constructor as parameter

Re: AW: AW: Splitting a tapestry web app into modules

2015-04-23 Thread Charlouze
If your service is bound to the registry via a ServiceBinder then it should. Le jeu. 23 avr. 2015 à 11:50, Poggenpohl, Daniel < daniel.poggenp...@isst.fraunhofer.de> a écrit : > Hi, > > do you mean that if I add an EntityManager as a parameter to my service > constructor, the appropriate EntityMa

Tapestry 5.3.8 SelectModelFactory#create throws npe when used with default implementation @interface

2015-04-23 Thread Hendrik Grewe
Hi @all! Since Java 7 has reached end of support we did switch to Java 8 within our application. Since Java 8 it is possible to setup default methods within interfaces [1]. We do have multiple DAOs which do implement the same interface. Before Java 8 we had to implement the same method in each cla

Tapestry 5.3.8 SelectModelFactory#create throws npe when used with default implementation @interface

2015-04-23 Thread Hendrik Grewe
Hi @all! Since Java 7 has reached end of support we did switch to Java 8 within our application. Since Java 8 it is possible to setup default methods within interfaces [1]. We do have multiple DAOs which do implement the same interface. Before Java 8 we had to implement the same method in each cla

AW: AW: AW: Splitting a tapestry web app into modules

2015-04-23 Thread Poggenpohl, Daniel
Hi, do you mean that if I add an EntityManager as a parameter to my service constructor, the appropriate EntityManager is inserted as a parameter value by Tapestry? Like in other methods in AppModule that I read about? Regards, Daniel P. -Ursprüngliche Nachricht- Von: Charlouze [mailto

Tapestry 5.3.8 SelectModelFactory#create throws npe when used with default implementation @interface

2015-04-23 Thread Hendrik Grewe
Hi @all! Since Java 7 has reached end of support we did switch to Java 8 within our application. Since Java 8 it is possible to setup default methods within interfaces [1]. We do have multiple DAOs which do implement the same interface. Before Java 8 we had to implement the same method in each cla

Re: AW: AW: Splitting a tapestry web app into modules

2015-04-23 Thread Charlouze
Hey ! You can define your DAO as service and get any other services you need in your DAO by adding parameters to your DAO constructor. Le jeu. 23 avr. 2015 à 11:23, Poggenpohl, Daniel < daniel.poggenp...@isst.fraunhofer.de> a écrit : > Hi everyone, > > thank you for adressing my questions, I thi

AW: AW: AW: Splitting a tapestry web app into modules

2015-04-23 Thread Poggenpohl, Daniel
Hi everyone, thank you for adressing my questions, I think that helped me to accomplish my goal. One more question for the moment: d) My dao-hibernate module, the DAO implementation module using hibernate as a persistence provider... Previously, in my single module project, I would have the DAO