Re: Confused about Select’s zone parameter

2016-02-04 Thread JumpStart
Here are some working examples that may help.

T5.4: 

http://jumpstart.doublenegative.com.au/jumpstart7/examples/ajax/select1

T5.3:

http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/select1

Geoff

> On 5 Feb 2016, at 5:54 AM, Lon Varscsak  wrote:
> 
> I understand that the “zone” parameter makes the Select submit its form
> data via an ajax request.  But I’m confused about what it does with the
> “zone” after that is complete.  I would expect that the contents of that
> zone be updated, but it doesn’t appear to do that.
> 
> If in my onValueChanged* method, I add the zone to the ajax renderer, it of
> course gets updated.
> 
> Am I missing something?
> 
> Thanks,
> 
> Lon
> 
> P.S. — Be gentle, I’m new to Tapestry :P


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



Re: jss.require(...) code is not executed when using ajaxResponseRenderer.addCallback(new JavaScriptCallback())

2016-02-04 Thread g
hello geoff,

thanks for your feedback, and indeed: I believe it looks very much
like a tapestry 5.4 bug ;-)

thanks & kind regards, g.

On 5 February 2016 at 02:00, JumpStart
 wrote:
> Sorry, just looked at your stack overflow example and I’m baffled as to why 
> it wouldn’t work.
>
> Geoff
>
>> On 5 Feb 2016, at 8:55 AM, JumpStart  
>> wrote:
>>
>> Here are some working examples that may help.
>>
>> In a callback:
>>
>>   
>> http://jumpstart.doublenegative.com.au/jumpstart7/examples/javascript/modal/1
>>
>> In afterRender:
>>
>>   
>> http://jumpstart.doublenegative.com.au/jumpstart7/examples/javascript/robust
>>
>> Geoff
>>
>>> On 5 Feb 2016, at 6:52 AM, g  wrote:
>>>
>>> hello,
>>>
>>> I noticed some inconsistent behavior when calling
>>> "jss.require(javascript).invoke(functionname).with(arguments)".
>>>
>>> if the call is made inside a construct
>>> "ajaxResponseRenderer.addCallback(new JavaScriptCallback() {public
>>> void run(JavaScriptSupport jss);}", the javascript code is NOT
>>> executed, where calling the same code inside void afterRender(){}, it
>>> DOES get executed correctly.
>>>
>>> so, I think there is a problem/bug in the code of the current 5.4.0
>>> tapestry when processing the jss.require inside a
>>> JavaScriptCallback...
>>> my code works fine in 5.3.8 when using the jss.addScript() rather than
>>> the jss.require...
>>>
>>> I posted sample source code on stackoverflow, but have not gotten any
>>> feedback so far:
>>> http://stackoverflow.com/questions/35127426/ajaxresponserenderer-addcallback-calling-requirejavascript-is-never-executed-f
>>>
>>> thanks for your feedback, g.
>>>
>>> -
>>> 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: jss.require(...) code is not executed when using ajaxResponseRenderer.addCallback(new JavaScriptCallback())

2016-02-04 Thread JumpStart
Sorry, just looked at your stack overflow example and I’m baffled as to why it 
wouldn’t work.

Geoff

> On 5 Feb 2016, at 8:55 AM, JumpStart  
> wrote:
> 
> Here are some working examples that may help.
> 
> In a callback: 
> 
>   
> http://jumpstart.doublenegative.com.au/jumpstart7/examples/javascript/modal/1
> 
> In afterRender:
> 
>   
> http://jumpstart.doublenegative.com.au/jumpstart7/examples/javascript/robust
> 
> Geoff
> 
>> On 5 Feb 2016, at 6:52 AM, g  wrote:
>> 
>> hello,
>> 
>> I noticed some inconsistent behavior when calling
>> "jss.require(javascript).invoke(functionname).with(arguments)".
>> 
>> if the call is made inside a construct
>> "ajaxResponseRenderer.addCallback(new JavaScriptCallback() {public
>> void run(JavaScriptSupport jss);}", the javascript code is NOT
>> executed, where calling the same code inside void afterRender(){}, it
>> DOES get executed correctly.
>> 
>> so, I think there is a problem/bug in the code of the current 5.4.0
>> tapestry when processing the jss.require inside a
>> JavaScriptCallback...
>> my code works fine in 5.3.8 when using the jss.addScript() rather than
>> the jss.require...
>> 
>> I posted sample source code on stackoverflow, but have not gotten any
>> feedback so far:
>> http://stackoverflow.com/questions/35127426/ajaxresponserenderer-addcallback-calling-requirejavascript-is-never-executed-f
>> 
>> thanks for your feedback, g.
>> 
>> -
>> 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: jss.require(...) code is not executed when using ajaxResponseRenderer.addCallback(new JavaScriptCallback())

2016-02-04 Thread JumpStart
Here are some working examples that may help.

In a callback: 


http://jumpstart.doublenegative.com.au/jumpstart7/examples/javascript/modal/1

In afterRender:


http://jumpstart.doublenegative.com.au/jumpstart7/examples/javascript/robust

Geoff

> On 5 Feb 2016, at 6:52 AM, g  wrote:
> 
> hello,
> 
> I noticed some inconsistent behavior when calling
> "jss.require(javascript).invoke(functionname).with(arguments)".
> 
> if the call is made inside a construct
> "ajaxResponseRenderer.addCallback(new JavaScriptCallback() {public
> void run(JavaScriptSupport jss);}", the javascript code is NOT
> executed, where calling the same code inside void afterRender(){}, it
> DOES get executed correctly.
> 
> so, I think there is a problem/bug in the code of the current 5.4.0
> tapestry when processing the jss.require inside a
> JavaScriptCallback...
> my code works fine in 5.3.8 when using the jss.addScript() rather than
> the jss.require...
> 
> I posted sample source code on stackoverflow, but have not gotten any
> feedback so far:
> http://stackoverflow.com/questions/35127426/ajaxresponserenderer-addcallback-calling-requirejavascript-is-never-executed-f
> 
> thanks for your feedback, g.
> 
> -
> 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: Commit After not working after migrating to IntelliJ

2016-02-04 Thread abangkis
Ah, you are right. That helps a lot. Such a newbie mistake :)

Thanks Chris & Kalle.

On Thu, Feb 4, 2016 at 11:43 PM, Kalle Korhonen 
wrote:

> Yes Chris is right (see
>
> https://github.com/apache/tapestry-5/blob/master/tapestry-hibernate/src/main/java/org/apache/tapestry5/internal/hibernate/CommitAfterWorker.java
> ),
> you need to depend on tapestry-hibernate. tapestry-hibernate-core is for
> non-web projects (where you need the advisor to tell to ioc when to
> commit).
>
> Kalle
>
> On Thu, Feb 4, 2016 at 6:47 AM, Chris Poulsen 
> wrote:
>
> > I have not used the hibernate integration myself. But my guess is that
> you
> > should depend on tapestry-hibernate instead of
> tapestry-hibernate-core
> > As far as I can tell from the sources, the CommitAfterWorker class lives
> in
> > that module.
> >
> > HTH.
> >
> > --
> > Chris
> >
> > On Thu, Feb 4, 2016 at 2:39 PM, abangkis  wrote:
> >
> > > Hi Dmitry, thanks for the response. I understand that if you wan't to
> do
> > a
> > > commit from your DAO (for example if your DAO is invoke by a scheduler,
> > or
> > > other non user interaction) you need to add the transaction advice. But
> > in
> > > my understanding if the action is from a tapestry page, you just need
> to
> > > add the commit after annotation on the page. I did this successfully
> in a
> > > few project when I'm still using eclipse. So i was wondering if this an
> > > intellij/jetty/gradle thing that a more experienced user of the IDE
> might
> > > know.
> > >
> > > On another note, this is also the first time I''m using maven based
> > > dependency, maybe there's something on there too :)
> > >
> > > On Thu, Feb 4, 2016 at 8:29 PM, Dmitry Gusev 
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > I think you're missing the transaction advice, it's mentioned at the
> > > bottom
> > > > on this page:
> > > > https://tapestry.apache.org/hibernate-user-guide.html
> > > >
> > > > Finally, you should use the HibernateTransactionAdvisor to add
> > > transaction
> > > > advice:
> > > > @Match("*DAO")
> > > > public static void adviseTransactions(HibernateTransactionAdvisor
> > > advisor,
> > > > MethodAdviceReceiver receiver)
> > > > {
> > > > advisor.addTransactionCommitAdvice(receiver);
> > > > }
> > > >
> > > > This advice method is configured to match against any service whose
> id
> > > ends
> > > > with "DAO", such as "PersonDAO".
> > > >
> > > > The advisor scans the service interface and identifies any methods
> with
> > > the
> > > > @CommitAfter annotation.
> > > >
> > > > On Thu, Feb 4, 2016 at 4:03 PM, abangkis  wrote:
> > > >
> > > > > I managed to setup and import the simple project to github if
> anyone
> > > have
> > > > > the time to look at it. https://github.com/abangkis/CommitTest.
> > First
> > > > time
> > > > > using git, let me know if something is missing.
> > > > >
> > > > > Thanks
> > > > >
> > > > > On Thu, Feb 4, 2016 at 5:53 AM, abangkis 
> wrote:
> > > > >
> > > > > > Hello, I've just recently migrated from Eclipse + Ant + Tomcat to
> > > > > IntelliJ
> > > > > > IDEA 15 CE + Gradle + Jetty. At first all of my development setup
> > is
> > > > > > working fine and then I realized that my @CommitAfter annotation
> is
> > > not
> > > > > > being honored, while other query runs fine. I'm using Tapestry
> > 5.4.0
> > > > from
> > > > > > jcenter.
> > > > > >
> > > > > > To confirm my problem, I created a simple project with a single
> > page
> > > > with
> > > > > > an add method:
> > > > > >
> > > > > > @CommitAfter
> > > > > > public void onActionFromAdd(){
> > > > > > logger.debug("trying add with commit after");
> > > > > >
> > > > > > User user = new User();
> > > > > > user.setPassword("");
> > > > > > user.setName("testing user 3");
> > > > > >
> > > > > > userManager.add(user);
> > > > > > //try {
> > > > > > //manager.commit();
> > > > > > //} catch (Exception e) {
> > > > > > //e.printStackTrace();
> > > > > > //}
> > > > > >
> > > > > > }
> > > > > >
> > > > > >
> > > > > > If i manually commit using Injected HibernateSessionManager in
> the
> > > > page,
> > > > > > it will work. But using @CommitAfter annotation isn't. Anybody
> know
> > > why
> > > > > is
> > > > > > this happening?
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > > --
> > > > > > http://www.mreunionlabs.net/ 
> > > > > > twitter : @mreunionlabs @abangkis
> > > > > > page : https://plus.google.com/104168782385184990771
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > http://www.mreunionlabs.net/ 
> > > > > twitter : @mreunionlabs @abangkis
> > > > > page : https://plus.google.com/104168782385184990771
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Dmitry Gusev
> > > >
> > > > AnjLab Team
> > > > http://anjlab.com
> > > >
> > >
> > >
> > >
> > > --
> > > http://www.mreunionlabs.net/ 

jss.require(...) code is not executed when using ajaxResponseRenderer.addCallback(new JavaScriptCallback())

2016-02-04 Thread g
hello,

I noticed some inconsistent behavior when calling
"jss.require(javascript).invoke(functionname).with(arguments)".

if the call is made inside a construct
"ajaxResponseRenderer.addCallback(new JavaScriptCallback() {public
void run(JavaScriptSupport jss);}", the javascript code is NOT
executed, where calling the same code inside void afterRender(){}, it
DOES get executed correctly.

so, I think there is a problem/bug in the code of the current 5.4.0
tapestry when processing the jss.require inside a
JavaScriptCallback...
my code works fine in 5.3.8 when using the jss.addScript() rather than
the jss.require...

I posted sample source code on stackoverflow, but have not gotten any
feedback so far:
http://stackoverflow.com/questions/35127426/ajaxresponserenderer-addcallback-calling-requirejavascript-is-never-executed-f

thanks for your feedback, g.

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



Confused about Select’s zone parameter

2016-02-04 Thread Lon Varscsak
I understand that the “zone” parameter makes the Select submit its form
data via an ajax request.  But I’m confused about what it does with the
“zone” after that is complete.  I would expect that the contents of that
zone be updated, but it doesn’t appear to do that.

If in my onValueChanged* method, I add the zone to the ajax renderer, it of
course gets updated.

Am I missing something?

Thanks,

Lon

P.S. — Be gentle, I’m new to Tapestry :P


Re: Commit After not working after migrating to IntelliJ

2016-02-04 Thread Kalle Korhonen
Yes Chris is right (see
https://github.com/apache/tapestry-5/blob/master/tapestry-hibernate/src/main/java/org/apache/tapestry5/internal/hibernate/CommitAfterWorker.java),
you need to depend on tapestry-hibernate. tapestry-hibernate-core is for
non-web projects (where you need the advisor to tell to ioc when to commit).

Kalle

On Thu, Feb 4, 2016 at 6:47 AM, Chris Poulsen 
wrote:

> I have not used the hibernate integration myself. But my guess is that you
> should depend on tapestry-hibernate instead of tapestry-hibernate-core
> As far as I can tell from the sources, the CommitAfterWorker class lives in
> that module.
>
> HTH.
>
> --
> Chris
>
> On Thu, Feb 4, 2016 at 2:39 PM, abangkis  wrote:
>
> > Hi Dmitry, thanks for the response. I understand that if you wan't to do
> a
> > commit from your DAO (for example if your DAO is invoke by a scheduler,
> or
> > other non user interaction) you need to add the transaction advice. But
> in
> > my understanding if the action is from a tapestry page, you just need to
> > add the commit after annotation on the page. I did this successfully in a
> > few project when I'm still using eclipse. So i was wondering if this an
> > intellij/jetty/gradle thing that a more experienced user of the IDE might
> > know.
> >
> > On another note, this is also the first time I''m using maven based
> > dependency, maybe there's something on there too :)
> >
> > On Thu, Feb 4, 2016 at 8:29 PM, Dmitry Gusev 
> > wrote:
> >
> > > Hi,
> > >
> > > I think you're missing the transaction advice, it's mentioned at the
> > bottom
> > > on this page:
> > > https://tapestry.apache.org/hibernate-user-guide.html
> > >
> > > Finally, you should use the HibernateTransactionAdvisor to add
> > transaction
> > > advice:
> > > @Match("*DAO")
> > > public static void adviseTransactions(HibernateTransactionAdvisor
> > advisor,
> > > MethodAdviceReceiver receiver)
> > > {
> > > advisor.addTransactionCommitAdvice(receiver);
> > > }
> > >
> > > This advice method is configured to match against any service whose id
> > ends
> > > with "DAO", such as "PersonDAO".
> > >
> > > The advisor scans the service interface and identifies any methods with
> > the
> > > @CommitAfter annotation.
> > >
> > > On Thu, Feb 4, 2016 at 4:03 PM, abangkis  wrote:
> > >
> > > > I managed to setup and import the simple project to github if anyone
> > have
> > > > the time to look at it. https://github.com/abangkis/CommitTest.
> First
> > > time
> > > > using git, let me know if something is missing.
> > > >
> > > > Thanks
> > > >
> > > > On Thu, Feb 4, 2016 at 5:53 AM, abangkis  wrote:
> > > >
> > > > > Hello, I've just recently migrated from Eclipse + Ant + Tomcat to
> > > > IntelliJ
> > > > > IDEA 15 CE + Gradle + Jetty. At first all of my development setup
> is
> > > > > working fine and then I realized that my @CommitAfter annotation is
> > not
> > > > > being honored, while other query runs fine. I'm using Tapestry
> 5.4.0
> > > from
> > > > > jcenter.
> > > > >
> > > > > To confirm my problem, I created a simple project with a single
> page
> > > with
> > > > > an add method:
> > > > >
> > > > > @CommitAfter
> > > > > public void onActionFromAdd(){
> > > > > logger.debug("trying add with commit after");
> > > > >
> > > > > User user = new User();
> > > > > user.setPassword("");
> > > > > user.setName("testing user 3");
> > > > >
> > > > > userManager.add(user);
> > > > > //try {
> > > > > //manager.commit();
> > > > > //} catch (Exception e) {
> > > > > //e.printStackTrace();
> > > > > //}
> > > > >
> > > > > }
> > > > >
> > > > >
> > > > > If i manually commit using Injected HibernateSessionManager in the
> > > page,
> > > > > it will work. But using @CommitAfter annotation isn't. Anybody know
> > why
> > > > is
> > > > > this happening?
> > > > >
> > > > > Thanks
> > > > >
> > > > > --
> > > > > http://www.mreunionlabs.net/ 
> > > > > twitter : @mreunionlabs @abangkis
> > > > > page : https://plus.google.com/104168782385184990771
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > http://www.mreunionlabs.net/ 
> > > > twitter : @mreunionlabs @abangkis
> > > > page : https://plus.google.com/104168782385184990771
> > > >
> > >
> > >
> > >
> > > --
> > > Dmitry Gusev
> > >
> > > AnjLab Team
> > > http://anjlab.com
> > >
> >
> >
> >
> > --
> > http://www.mreunionlabs.net/ 
> > twitter : @mreunionlabs @abangkis
> > page : https://plus.google.com/104168782385184990771
> >
>


Re: Commit After not working after migrating to IntelliJ

2016-02-04 Thread Chris Poulsen
I have not used the hibernate integration myself. But my guess is that you
should depend on tapestry-hibernate instead of tapestry-hibernate-core
As far as I can tell from the sources, the CommitAfterWorker class lives in
that module.

HTH.

-- 
Chris

On Thu, Feb 4, 2016 at 2:39 PM, abangkis  wrote:

> Hi Dmitry, thanks for the response. I understand that if you wan't to do a
> commit from your DAO (for example if your DAO is invoke by a scheduler, or
> other non user interaction) you need to add the transaction advice. But in
> my understanding if the action is from a tapestry page, you just need to
> add the commit after annotation on the page. I did this successfully in a
> few project when I'm still using eclipse. So i was wondering if this an
> intellij/jetty/gradle thing that a more experienced user of the IDE might
> know.
>
> On another note, this is also the first time I''m using maven based
> dependency, maybe there's something on there too :)
>
> On Thu, Feb 4, 2016 at 8:29 PM, Dmitry Gusev 
> wrote:
>
> > Hi,
> >
> > I think you're missing the transaction advice, it's mentioned at the
> bottom
> > on this page:
> > https://tapestry.apache.org/hibernate-user-guide.html
> >
> > Finally, you should use the HibernateTransactionAdvisor to add
> transaction
> > advice:
> > @Match("*DAO")
> > public static void adviseTransactions(HibernateTransactionAdvisor
> advisor,
> > MethodAdviceReceiver receiver)
> > {
> > advisor.addTransactionCommitAdvice(receiver);
> > }
> >
> > This advice method is configured to match against any service whose id
> ends
> > with "DAO", such as "PersonDAO".
> >
> > The advisor scans the service interface and identifies any methods with
> the
> > @CommitAfter annotation.
> >
> > On Thu, Feb 4, 2016 at 4:03 PM, abangkis  wrote:
> >
> > > I managed to setup and import the simple project to github if anyone
> have
> > > the time to look at it. https://github.com/abangkis/CommitTest. First
> > time
> > > using git, let me know if something is missing.
> > >
> > > Thanks
> > >
> > > On Thu, Feb 4, 2016 at 5:53 AM, abangkis  wrote:
> > >
> > > > Hello, I've just recently migrated from Eclipse + Ant + Tomcat to
> > > IntelliJ
> > > > IDEA 15 CE + Gradle + Jetty. At first all of my development setup is
> > > > working fine and then I realized that my @CommitAfter annotation is
> not
> > > > being honored, while other query runs fine. I'm using Tapestry 5.4.0
> > from
> > > > jcenter.
> > > >
> > > > To confirm my problem, I created a simple project with a single page
> > with
> > > > an add method:
> > > >
> > > > @CommitAfter
> > > > public void onActionFromAdd(){
> > > > logger.debug("trying add with commit after");
> > > >
> > > > User user = new User();
> > > > user.setPassword("");
> > > > user.setName("testing user 3");
> > > >
> > > > userManager.add(user);
> > > > //try {
> > > > //manager.commit();
> > > > //} catch (Exception e) {
> > > > //e.printStackTrace();
> > > > //}
> > > >
> > > > }
> > > >
> > > >
> > > > If i manually commit using Injected HibernateSessionManager in the
> > page,
> > > > it will work. But using @CommitAfter annotation isn't. Anybody know
> why
> > > is
> > > > this happening?
> > > >
> > > > Thanks
> > > >
> > > > --
> > > > http://www.mreunionlabs.net/ 
> > > > twitter : @mreunionlabs @abangkis
> > > > page : https://plus.google.com/104168782385184990771
> > > >
> > >
> > >
> > >
> > > --
> > > http://www.mreunionlabs.net/ 
> > > twitter : @mreunionlabs @abangkis
> > > page : https://plus.google.com/104168782385184990771
> > >
> >
> >
> >
> > --
> > Dmitry Gusev
> >
> > AnjLab Team
> > http://anjlab.com
> >
>
>
>
> --
> http://www.mreunionlabs.net/ 
> twitter : @mreunionlabs @abangkis
> page : https://plus.google.com/104168782385184990771
>


Re: Gradle version of maven archetype.

2016-02-04 Thread abangkis
Hmm... after reading that, i guess I'm just gonna write it down from
scratch and try to mimic the generated output of the maven archetype.
Thanks bob.

On Thu, Feb 4, 2016 at 8:32 PM, Bob Harner  wrote:

> See
> http://gradle.org/migrating-a-maven-build-to-gradle/
> On Feb 4, 2016 8:07 AM, "abangkis"  wrote:
>
> > I'm learning gradle, and planning to create something similar to tapestry
> > maven archetype as a gradle plugin. Is there a quick way to port maven
> > archetype to gradle, or do I have to write it down from scratch?
> >
> > Thanks
> >
> > --
> > http://www.mreunionlabs.net/ 
> > twitter : @mreunionlabs @abangkis
> > page : https://plus.google.com/104168782385184990771
> >
>



-- 
http://www.mreunionlabs.net/ 
twitter : @mreunionlabs @abangkis
page : https://plus.google.com/104168782385184990771


Re: Commit After not working after migrating to IntelliJ

2016-02-04 Thread abangkis
Hi Dmitry, thanks for the response. I understand that if you wan't to do a
commit from your DAO (for example if your DAO is invoke by a scheduler, or
other non user interaction) you need to add the transaction advice. But in
my understanding if the action is from a tapestry page, you just need to
add the commit after annotation on the page. I did this successfully in a
few project when I'm still using eclipse. So i was wondering if this an
intellij/jetty/gradle thing that a more experienced user of the IDE might
know.

On another note, this is also the first time I''m using maven based
dependency, maybe there's something on there too :)

On Thu, Feb 4, 2016 at 8:29 PM, Dmitry Gusev  wrote:

> Hi,
>
> I think you're missing the transaction advice, it's mentioned at the bottom
> on this page:
> https://tapestry.apache.org/hibernate-user-guide.html
>
> Finally, you should use the HibernateTransactionAdvisor to add transaction
> advice:
> @Match("*DAO")
> public static void adviseTransactions(HibernateTransactionAdvisor advisor,
> MethodAdviceReceiver receiver)
> {
> advisor.addTransactionCommitAdvice(receiver);
> }
>
> This advice method is configured to match against any service whose id ends
> with "DAO", such as "PersonDAO".
>
> The advisor scans the service interface and identifies any methods with the
> @CommitAfter annotation.
>
> On Thu, Feb 4, 2016 at 4:03 PM, abangkis  wrote:
>
> > I managed to setup and import the simple project to github if anyone have
> > the time to look at it. https://github.com/abangkis/CommitTest. First
> time
> > using git, let me know if something is missing.
> >
> > Thanks
> >
> > On Thu, Feb 4, 2016 at 5:53 AM, abangkis  wrote:
> >
> > > Hello, I've just recently migrated from Eclipse + Ant + Tomcat to
> > IntelliJ
> > > IDEA 15 CE + Gradle + Jetty. At first all of my development setup is
> > > working fine and then I realized that my @CommitAfter annotation is not
> > > being honored, while other query runs fine. I'm using Tapestry 5.4.0
> from
> > > jcenter.
> > >
> > > To confirm my problem, I created a simple project with a single page
> with
> > > an add method:
> > >
> > > @CommitAfter
> > > public void onActionFromAdd(){
> > > logger.debug("trying add with commit after");
> > >
> > > User user = new User();
> > > user.setPassword("");
> > > user.setName("testing user 3");
> > >
> > > userManager.add(user);
> > > //try {
> > > //manager.commit();
> > > //} catch (Exception e) {
> > > //e.printStackTrace();
> > > //}
> > >
> > > }
> > >
> > >
> > > If i manually commit using Injected HibernateSessionManager in the
> page,
> > > it will work. But using @CommitAfter annotation isn't. Anybody know why
> > is
> > > this happening?
> > >
> > > Thanks
> > >
> > > --
> > > http://www.mreunionlabs.net/ 
> > > twitter : @mreunionlabs @abangkis
> > > page : https://plus.google.com/104168782385184990771
> > >
> >
> >
> >
> > --
> > http://www.mreunionlabs.net/ 
> > twitter : @mreunionlabs @abangkis
> > page : https://plus.google.com/104168782385184990771
> >
>
>
>
> --
> Dmitry Gusev
>
> AnjLab Team
> http://anjlab.com
>



-- 
http://www.mreunionlabs.net/ 
twitter : @mreunionlabs @abangkis
page : https://plus.google.com/104168782385184990771


Re: Gradle version of maven archetype.

2016-02-04 Thread Bob Harner
See
http://gradle.org/migrating-a-maven-build-to-gradle/
On Feb 4, 2016 8:07 AM, "abangkis"  wrote:

> I'm learning gradle, and planning to create something similar to tapestry
> maven archetype as a gradle plugin. Is there a quick way to port maven
> archetype to gradle, or do I have to write it down from scratch?
>
> Thanks
>
> --
> http://www.mreunionlabs.net/ 
> twitter : @mreunionlabs @abangkis
> page : https://plus.google.com/104168782385184990771
>


Re: Commit After not working after migrating to IntelliJ

2016-02-04 Thread Dmitry Gusev
Hi,

I think you're missing the transaction advice, it's mentioned at the bottom
on this page:
https://tapestry.apache.org/hibernate-user-guide.html

Finally, you should use the HibernateTransactionAdvisor to add transaction
advice:
@Match("*DAO")
public static void adviseTransactions(HibernateTransactionAdvisor advisor,
MethodAdviceReceiver receiver)
{
advisor.addTransactionCommitAdvice(receiver);
}

This advice method is configured to match against any service whose id ends
with "DAO", such as "PersonDAO".

The advisor scans the service interface and identifies any methods with the
@CommitAfter annotation.

On Thu, Feb 4, 2016 at 4:03 PM, abangkis  wrote:

> I managed to setup and import the simple project to github if anyone have
> the time to look at it. https://github.com/abangkis/CommitTest. First time
> using git, let me know if something is missing.
>
> Thanks
>
> On Thu, Feb 4, 2016 at 5:53 AM, abangkis  wrote:
>
> > Hello, I've just recently migrated from Eclipse + Ant + Tomcat to
> IntelliJ
> > IDEA 15 CE + Gradle + Jetty. At first all of my development setup is
> > working fine and then I realized that my @CommitAfter annotation is not
> > being honored, while other query runs fine. I'm using Tapestry 5.4.0 from
> > jcenter.
> >
> > To confirm my problem, I created a simple project with a single page with
> > an add method:
> >
> > @CommitAfter
> > public void onActionFromAdd(){
> > logger.debug("trying add with commit after");
> >
> > User user = new User();
> > user.setPassword("");
> > user.setName("testing user 3");
> >
> > userManager.add(user);
> > //try {
> > //manager.commit();
> > //} catch (Exception e) {
> > //e.printStackTrace();
> > //}
> >
> > }
> >
> >
> > If i manually commit using Injected HibernateSessionManager in the page,
> > it will work. But using @CommitAfter annotation isn't. Anybody know why
> is
> > this happening?
> >
> > Thanks
> >
> > --
> > http://www.mreunionlabs.net/ 
> > twitter : @mreunionlabs @abangkis
> > page : https://plus.google.com/104168782385184990771
> >
>
>
>
> --
> http://www.mreunionlabs.net/ 
> twitter : @mreunionlabs @abangkis
> page : https://plus.google.com/104168782385184990771
>



-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com


Gradle version of maven archetype.

2016-02-04 Thread abangkis
I'm learning gradle, and planning to create something similar to tapestry
maven archetype as a gradle plugin. Is there a quick way to port maven
archetype to gradle, or do I have to write it down from scratch?

Thanks

-- 
http://www.mreunionlabs.net/ 
twitter : @mreunionlabs @abangkis
page : https://plus.google.com/104168782385184990771


Re: Commit After not working after migrating to IntelliJ

2016-02-04 Thread abangkis
I managed to setup and import the simple project to github if anyone have
the time to look at it. https://github.com/abangkis/CommitTest. First time
using git, let me know if something is missing.

Thanks

On Thu, Feb 4, 2016 at 5:53 AM, abangkis  wrote:

> Hello, I've just recently migrated from Eclipse + Ant + Tomcat to IntelliJ
> IDEA 15 CE + Gradle + Jetty. At first all of my development setup is
> working fine and then I realized that my @CommitAfter annotation is not
> being honored, while other query runs fine. I'm using Tapestry 5.4.0 from
> jcenter.
>
> To confirm my problem, I created a simple project with a single page with
> an add method:
>
> @CommitAfter
> public void onActionFromAdd(){
> logger.debug("trying add with commit after");
>
> User user = new User();
> user.setPassword("");
> user.setName("testing user 3");
>
> userManager.add(user);
> //try {
> //manager.commit();
> //} catch (Exception e) {
> //e.printStackTrace();
> //}
>
> }
>
>
> If i manually commit using Injected HibernateSessionManager in the page,
> it will work. But using @CommitAfter annotation isn't. Anybody know why is
> this happening?
>
> Thanks
>
> --
> http://www.mreunionlabs.net/ 
> twitter : @mreunionlabs @abangkis
> page : https://plus.google.com/104168782385184990771
>



-- 
http://www.mreunionlabs.net/ 
twitter : @mreunionlabs @abangkis
page : https://plus.google.com/104168782385184990771