Re: How do you display a validation error on a component at page load?

2015-08-25 Thread Geoff Callender
Are you using T5.3? 

Have you tried moving tracker.recordError(…) from setupRender() to 
onUploadException(…)? I don’t think there’s any need to do your own persisting 
of the error message (because Tapestry will persist the Form through the 
redirect because it has an error).

Unless I’ve missed something, the principle is the same for upload in a 
component as it is in a page. See


http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/fileupload

Geoff

> On 26 Aug 2015, at 3:25 am, Charlie Deuter  wrote:
> 
> I'm trying to use a onUploadException event listener to catch failed uploads 
> and report the error as a validation error after the page reloads. I have 
> access to the error when the page reloads, but I don't know how to report the 
> error as it is not clear how to report an error to the validation tracker 
> outside of a validation event.
> 
> Here is what I have at the moment, the setup render fails because the 
> validation tracker isn't yet available.
> 
> @Environmental
> private ValidationTracker tracker;
> 
> @SetupRender
> public void setupRender() {
>
> tracker.recordError(errorMessageService.getErrorMessageDescriptionText(exception)
> }
> @Persist(PersistenceConstants.FLASH)
> @Property
> private TotalUploadTooLargeException errMessage;
> 
> @OnEvent(UploadEvents.UPLOAD_EXCEPTION)
> Object onUploadException(FileUploadException ex) throws 
> TotalUploadTooLargeException
> {
>errMessage = new TotalUploadTooLargeException(1, 1, ex);
> 
>return this;
> }


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



How do you display a validation error on a component at page load?

2015-08-25 Thread Charlie Deuter
I'm trying to use a onUploadException event listener to catch failed uploads 
and report the error as a validation error after the page reloads. I have 
access to the error when the page reloads, but I don't know how to report the 
error as it is not clear how to report an error to the validation tracker 
outside of a validation event.

Here is what I have at the moment, the setup render fails because the 
validation tracker isn't yet available.

@Environmental
private ValidationTracker tracker;

@SetupRender
public void setupRender() {

tracker.recordError(errorMessageService.getErrorMessageDescriptionText(exception)
}
@Persist(PersistenceConstants.FLASH)
@Property
private TotalUploadTooLargeException errMessage;

@OnEvent(UploadEvents.UPLOAD_EXCEPTION)
Object onUploadException(FileUploadException ex) throws 
TotalUploadTooLargeException
{
errMessage = new TotalUploadTooLargeException(1, 1, ex);

return this;
}


RE: Inspection of Tapestry applications in IntelliJ

2015-08-25 Thread Svein-Erik Løken
Property need to be private to be resolved in the .tml

I use to add @SuppressWarnings("unused") when needed. I like to have no 
analysis error or warnings.  I wish that for my TML files too, but 
xmlns:p="tapestry:parameter" is not understood.  after  also 
gives me analysis error. I hope JetBrains will improve the Tapestry plugin when 
5.4 is released.

@SuppressWarnings("unused")
@Property
private String myProp;


My prop: ${myProp}

BTW: IntelliJ IU-142.4083 seems to be the best v15 EAP.




From: Chris Poulsen [via Apache Tapestry Mailing List Archives] 
[mailto:ml-node+s1045711n573113...@n5.nabble.com]
Sent: 25. august 2015 14:44
To: Svein-Erik Løken 
Subject: Re: Inspection of Tapestry applications in IntelliJ

There have been some improvements in the recent v15 EAPs.

Also you can adjust the unused inspection to not trigger on certain
annotations. (I think it is some sub-menu found under the "light bulb" when
having an unused field marked)

On Tue, Aug 25, 2015 at 2:29 PM, Poggenpohl, Daniel <
[hidden email]> wrote:

> Hello again,
>
> right after solving after another problem, I thought that maybe you could
> help me with another one regarding IntelliJ and Tapestry.
>
> The IDE has Tapestry support, but it seems to use a rather old Tapestry
> version (5.1?).
> The code inspections seem to be relatively dumb because @Property
> annotated members are seen as "never used". In tml files, sometimes I get
> error messages like "can't coerce List to selectModel" or "Cannot resolve
> symbol ${someSymbol}" when I have a getSomeSymbol() in my java class.
>
> How do you deal with that?
>
> Regards,
> Daniel P.
>


If you reply to this email, your message will be added to the discussion below:
http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Inspection-of-Tapestry-applications-in-IntelliJ-tp5731132p5731133.html
To unsubscribe from users@tapestry.apache.org 
Mailing List Archives, click 
here.
NAML


Re: Strange behavior using DataNucleus JDO, always getting same results

2015-08-25 Thread Thiago H de Paula Figueiredo
On Mon, 24 Aug 2015 21:19:25 -0300, yazmin georgina quintal  
 wrote:


I Know tapestry weave my page.java, I think that by some reason the  
weaving is replacing variable resultados with a cached value and using  
it in place of the returned value from JDO,


Tapestry does change the bytecode of page, component and mixin classes,  
but it doesn't change the body of methods. There's the @Cached annotation,  
but it just works on the return value. I don't think this is related to  
Tapestry.


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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



Re: Inspection of Tapestry applications in IntelliJ

2015-08-25 Thread Chris Poulsen
There have been some improvements in the recent v15 EAPs.

Also you can adjust the unused inspection to not trigger on certain
annotations. (I think it is some sub-menu found under the "light bulb" when
having an unused field marked)

On Tue, Aug 25, 2015 at 2:29 PM, Poggenpohl, Daniel <
daniel.poggenp...@isst.fraunhofer.de> wrote:

> Hello again,
>
> right after solving after another problem, I thought that maybe you could
> help me with another one regarding IntelliJ and Tapestry.
>
> The IDE has Tapestry support, but it seems to use a rather old Tapestry
> version (5.1?).
> The code inspections seem to be relatively dumb because @Property
> annotated members are seen as "never used". In tml files, sometimes I get
> error messages like "can't coerce List to selectModel" or "Cannot resolve
> symbol ${someSymbol}" when I have a getSomeSymbol() in my java class.
>
> How do you deal with that?
>
> Regards,
> Daniel P.
>


Inspection of Tapestry applications in IntelliJ

2015-08-25 Thread Poggenpohl, Daniel
Hello again,

right after solving after another problem, I thought that maybe you could help 
me with another one regarding IntelliJ and Tapestry.

The IDE has Tapestry support, but it seems to use a rather old Tapestry version 
(5.1?).
The code inspections seem to be relatively dumb because @Property annotated 
members are seen as "never used". In tml files, sometimes I get error messages 
like "can't coerce List to selectModel" or "Cannot resolve symbol 
${someSymbol}" when I have a getSomeSymbol() in my java class.

How do you deal with that?

Regards,
Daniel P.


AW: Debugging Tapestry with IntelliJ IDEA

2015-08-25 Thread Poggenpohl, Daniel
Hi,

Using production mode = false helped solve the problem with properties having 
"null" values.
The tapestry execution mode has to wait for now until we need different modes.

Thanks for helping.

Regards,
Daniel P.

-Ursprüngliche Nachricht-
Von: Poggenpohl, Daniel 
Gesendet: Dienstag, 25. August 2015 13:52
An: Tapestry users
Betreff: AW: Debugging Tapestry with IntelliJ IDEA

Hi everyone,

it seems that production mode (is set to true) is the problem.

We use build profiles and have three stages:
1. Local development
2. Deploying to a Test VM for load tests 3. Deploying to the official VM

Our tapestry module POM reflects this.
When I add a property
development
to the POM, it should load the additional DevelopmentModule which sets the 
production mode to false.
The DevelopmentModule isn't loaded, though.

Isn't this the way to go?

Regards,
Daniel P.

-Ursprüngliche Nachricht-
Von: Stephen Nutbrown [mailto:steves...@gmail.com]
Gesendet: Dienstag, 25. August 2015 13:26
An: Tapestry users
Betreff: Re: Debugging Tapestry with IntelliJ IDEA

Just to confirm it also works fine here too. I've found IntelliJ to be 
absolutely fantastic so far. I'm running it using jetty but I know there is an 
option for tomcat... I don't know if that could make a difference?
On 25 Aug 2015 11:33 am, "Chris Poulsen"  wrote:

> It works fine with IDEA here. A possibility could be that you are 
> running in production mode?
>
> On Tue, Aug 25, 2015 at 12:04 PM, Poggenpohl, Daniel < 
> daniel.poggenp...@isst.fraunhofer.de> wrote:
>
> > Hello everyone,
> >
> > we are evaluating IntelliJ IDEA for development and so far it has 
> > been quite good.
> > But the Tapestry specifics seem to hinder further evaluation.
> > Does anyone here use IntelliJ for development?
> >
> > When we debug code, page properties are always seen as having a "null"
> > value instead of the proxy that Eclipse used to show. What are we 
> > doing wrong?
> >
> > Regards,
> > Daniel P.
> >
>


Re: Debugging Tapestry with IntelliJ IDEA

2015-08-25 Thread Chris Poulsen
We usually simply set -Dtapestry.production-mode=false in the JVM when we
want dev mode.

On Tue, Aug 25, 2015 at 1:51 PM, Poggenpohl, Daniel <
daniel.poggenp...@isst.fraunhofer.de> wrote:

> Hi everyone,
>
> it seems that production mode (is set to true) is the problem.
>
> We use build profiles and have three stages:
> 1. Local development
> 2. Deploying to a Test VM for load tests
> 3. Deploying to the official VM
>
> Our tapestry module POM reflects this.
> When I add a property
> development
> to the POM, it should load the additional DevelopmentModule which sets the
> production mode to false.
> The DevelopmentModule isn't loaded, though.
>
> Isn't this the way to go?
>
> Regards,
> Daniel P.
>
> -Ursprüngliche Nachricht-
> Von: Stephen Nutbrown [mailto:steves...@gmail.com]
> Gesendet: Dienstag, 25. August 2015 13:26
> An: Tapestry users
> Betreff: Re: Debugging Tapestry with IntelliJ IDEA
>
> Just to confirm it also works fine here too. I've found IntelliJ to be
> absolutely fantastic so far. I'm running it using jetty but I know there is
> an option for tomcat... I don't know if that could make a difference?
> On 25 Aug 2015 11:33 am, "Chris Poulsen"  wrote:
>
> > It works fine with IDEA here. A possibility could be that you are
> > running in production mode?
> >
> > On Tue, Aug 25, 2015 at 12:04 PM, Poggenpohl, Daniel <
> > daniel.poggenp...@isst.fraunhofer.de> wrote:
> >
> > > Hello everyone,
> > >
> > > we are evaluating IntelliJ IDEA for development and so far it has
> > > been quite good.
> > > But the Tapestry specifics seem to hinder further evaluation.
> > > Does anyone here use IntelliJ for development?
> > >
> > > When we debug code, page properties are always seen as having a "null"
> > > value instead of the proxy that Eclipse used to show. What are we
> > > doing wrong?
> > >
> > > Regards,
> > > Daniel P.
> > >
> >
>


AW: Debugging Tapestry with IntelliJ IDEA

2015-08-25 Thread Poggenpohl, Daniel
Hi everyone,

it seems that production mode (is set to true) is the problem.

We use build profiles and have three stages:
1. Local development
2. Deploying to a Test VM for load tests
3. Deploying to the official VM

Our tapestry module POM reflects this.
When I add a property
development
to the POM, it should load the additional DevelopmentModule which sets the 
production mode to false.
The DevelopmentModule isn't loaded, though.

Isn't this the way to go?

Regards,
Daniel P.

-Ursprüngliche Nachricht-
Von: Stephen Nutbrown [mailto:steves...@gmail.com] 
Gesendet: Dienstag, 25. August 2015 13:26
An: Tapestry users
Betreff: Re: Debugging Tapestry with IntelliJ IDEA

Just to confirm it also works fine here too. I've found IntelliJ to be 
absolutely fantastic so far. I'm running it using jetty but I know there is an 
option for tomcat... I don't know if that could make a difference?
On 25 Aug 2015 11:33 am, "Chris Poulsen"  wrote:

> It works fine with IDEA here. A possibility could be that you are 
> running in production mode?
>
> On Tue, Aug 25, 2015 at 12:04 PM, Poggenpohl, Daniel < 
> daniel.poggenp...@isst.fraunhofer.de> wrote:
>
> > Hello everyone,
> >
> > we are evaluating IntelliJ IDEA for development and so far it has 
> > been quite good.
> > But the Tapestry specifics seem to hinder further evaluation.
> > Does anyone here use IntelliJ for development?
> >
> > When we debug code, page properties are always seen as having a "null"
> > value instead of the proxy that Eclipse used to show. What are we 
> > doing wrong?
> >
> > Regards,
> > Daniel P.
> >
>


RE: Debugging Tapestry with IntelliJ IDEA

2015-08-25 Thread Svein-Erik Løken
It is very good! Also for multi-module development and JavaScript debugging.

S-E

From: Charlouze [via Apache Tapestry Mailing List Archives] 
[mailto:ml-node+s1045711n5731127...@n5.nabble.com]
Sent: 25. august 2015 13:43
To: Svein-Erik Løken 
Subject: Re: Debugging Tapestry with IntelliJ IDEA

+1 (non-binding :D)

Le mar. 25 août 2015 à 13:25, Stephen Nutbrown <[hidden 
email]> a
écrit :

> Just to confirm it also works fine here too. I've found IntelliJ to be
> absolutely fantastic so far. I'm running it using jetty but I know there is
> an option for tomcat... I don't know if that could make a difference?
> On 25 Aug 2015 11:33 am, "Chris Poulsen" <[hidden 
> email]> wrote:
>
> > It works fine with IDEA here. A possibility could be that you are running
> > in production mode?
> >
> > On Tue, Aug 25, 2015 at 12:04 PM, Poggenpohl, Daniel <
> > [hidden email]> wrote:
> >
> > > Hello everyone,
> > >
> > > we are evaluating IntelliJ IDEA for development and so far it has been
> > > quite good.
> > > But the Tapestry specifics seem to hinder further evaluation.
> > > Does anyone here use IntelliJ for development?
> > >
> > > When we debug code, page properties are always seen as having a "null"
> > > value instead of the proxy that Eclipse used to show. What are we doing
> > > wrong?
> > >
> > > Regards,
> > > Daniel P.
> > >
> >
>


If you reply to this email, your message will be added to the discussion below:
http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Debugging-Tapestry-with-IntelliJ-IDEA-tp5731124p5731127.html
To unsubscribe from users@tapestry.apache.org 
Mailing List Archives, click 
here.
NAML


Re: Debugging Tapestry with IntelliJ IDEA

2015-08-25 Thread Charlouze
+1 (non-binding :D)

Le mar. 25 août 2015 à 13:25, Stephen Nutbrown  a
écrit :

> Just to confirm it also works fine here too. I've found IntelliJ to be
> absolutely fantastic so far. I'm running it using jetty but I know there is
> an option for tomcat... I don't know if that could make a difference?
> On 25 Aug 2015 11:33 am, "Chris Poulsen"  wrote:
>
> > It works fine with IDEA here. A possibility could be that you are running
> > in production mode?
> >
> > On Tue, Aug 25, 2015 at 12:04 PM, Poggenpohl, Daniel <
> > daniel.poggenp...@isst.fraunhofer.de> wrote:
> >
> > > Hello everyone,
> > >
> > > we are evaluating IntelliJ IDEA for development and so far it has been
> > > quite good.
> > > But the Tapestry specifics seem to hinder further evaluation.
> > > Does anyone here use IntelliJ for development?
> > >
> > > When we debug code, page properties are always seen as having a "null"
> > > value instead of the proxy that Eclipse used to show. What are we doing
> > > wrong?
> > >
> > > Regards,
> > > Daniel P.
> > >
> >
>


Re: Debugging Tapestry with IntelliJ IDEA

2015-08-25 Thread Stephen Nutbrown
Just to confirm it also works fine here too. I've found IntelliJ to be
absolutely fantastic so far. I'm running it using jetty but I know there is
an option for tomcat... I don't know if that could make a difference?
On 25 Aug 2015 11:33 am, "Chris Poulsen"  wrote:

> It works fine with IDEA here. A possibility could be that you are running
> in production mode?
>
> On Tue, Aug 25, 2015 at 12:04 PM, Poggenpohl, Daniel <
> daniel.poggenp...@isst.fraunhofer.de> wrote:
>
> > Hello everyone,
> >
> > we are evaluating IntelliJ IDEA for development and so far it has been
> > quite good.
> > But the Tapestry specifics seem to hinder further evaluation.
> > Does anyone here use IntelliJ for development?
> >
> > When we debug code, page properties are always seen as having a "null"
> > value instead of the proxy that Eclipse used to show. What are we doing
> > wrong?
> >
> > Regards,
> > Daniel P.
> >
>


Re: Debugging Tapestry with IntelliJ IDEA

2015-08-25 Thread Chris Poulsen
It works fine with IDEA here. A possibility could be that you are running
in production mode?

On Tue, Aug 25, 2015 at 12:04 PM, Poggenpohl, Daniel <
daniel.poggenp...@isst.fraunhofer.de> wrote:

> Hello everyone,
>
> we are evaluating IntelliJ IDEA for development and so far it has been
> quite good.
> But the Tapestry specifics seem to hinder further evaluation.
> Does anyone here use IntelliJ for development?
>
> When we debug code, page properties are always seen as having a "null"
> value instead of the proxy that Eclipse used to show. What are we doing
> wrong?
>
> Regards,
> Daniel P.
>


Debugging Tapestry with IntelliJ IDEA

2015-08-25 Thread Poggenpohl, Daniel
Hello everyone,

we are evaluating IntelliJ IDEA for development and so far it has been quite 
good.
But the Tapestry specifics seem to hinder further evaluation.
Does anyone here use IntelliJ for development?

When we debug code, page properties are always seen as having a "null" value 
instead of the proxy that Eclipse used to show. What are we doing wrong?

Regards,
Daniel P.