formState="NONE" is it safe to use with persistent properties ?

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

formState="NONE" is it safe to use with persistent properties ?

nhhockeyplayer
Folks,

I got a Home Page with a Gallery component sitting on top.

I am operating three loops

1. loop to render pagination links
2. nested loop to render collection looping columns and rows

If I remove formState="NONE" the app slows down to the point of barely usable.

if I put the formState back in the three loops I operate, the app is responsive... but my <select> components and their associated properties are haywire.

Currently I took the formState="NONE" out of the pagination link loop.
And the place where it is being used is in the actual rendering of the large images.

http://psinh.ddns.net:9011/psi/home

Is formState stomping all over my component persistent properties ?

Gallery.JAVA
    @Property
    @Persist
    private Integer itemsPerPage;

    @Property
    @Persist
    private Integer tableColumns;

Best regards
and thanks... KEN    
Best regards and thanks
Ken
Reply | Threaded
Open this post in threaded view
|

RE: formState="NONE" is it safe to use with persistent properties ?

nhhockeyplayer
I goto home page

I select itemsPerPage = 5

render it

I have to select it twice to get it to work now

i set it to 250

it wont stick unless I select it twice

really not fun

the formState is taking me out here

I dont want to propagate my properties to Home.JAVA

any ideas ?

Thanks for your assistance. This problem is perplexing... for a fundamental issue.

Ken
     
Best regards and thanks
Ken
Reply | Threaded
Open this post in threaded view
|

Re: formState="NONE" is it safe to use with persistent properties ?

Chris Poulsen
Sounds like you should take a look at valueencoders.

http://tapestry.apache.org/using-select-with-a-list.html#UsingSelectWithaList-ValueEncoder
is one example

On Fri, Jan 30, 2015 at 1:24 PM, nhhockeyplayer nashua <
[hidden email]> wrote:

> I goto home page
>
> I select itemsPerPage = 5
>
> render it
>
> I have to select it twice to get it to work now
>
> i set it to 250
>
> it wont stick unless I select it twice
>
> really not fun
>
> the formState is taking me out here
>
> I dont want to propagate my properties to Home.JAVA
>
> any ideas ?
>
> Thanks for your assistance. This problem is perplexing... for a
> fundamental issue.
>
> Ken
>
Reply | Threaded
Open this post in threaded view
|

Re: formState="NONE" is it safe to use with persistent properties ?

Thiago H de Paula Figueiredo
In reply to this post by nhhockeyplayer
On Fri, 30 Jan 2015 10:20:30 -0200, nhhockeyplayer nashua  
<[hidden email]> wrote:

> Folks,
>
> I got a Home Page with a Gallery component sitting on top.
>
> I am operating three loops
>
> 1. loop to render pagination links

This one should have form

> 2. nested loop to render collection looping columns and rows
>
> If I remove formState="NONE" the app slows down to the point of barely  
> usable.
>
> if I put the formState back in the three loops I operate, the app is  
> responsive... but my <select> components and their associated properties  
> are haywire.
>
> Currently I took the formState="NONE" out of the pagination link loop.
> And the place where it is being used is in the actual rendering of the  
> large images.
>
> http://psinh.ddns.net:9011/psi/home
>
> Is formState stomping all over my component persistent properties ?
>
> Gallery.JAVA
>     @Property
>     @Persist
>     private Integer itemsPerPage;
>
>     @Property
>     @Persist
>     private Integer tableColumns;
>
> Best regards
> and thanks... KEN  


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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: formState="NONE" is it safe to use with persistent properties ?

Thiago H de Paula Figueiredo
In reply to this post by nhhockeyplayer
Sorry, I hit the Send key by mistake . . .

On Fri, 30 Jan 2015 10:20:30 -0200, nhhockeyplayer nashua  
<[hidden email]> wrote:

> Folks,
>
> I got a Home Page with a Gallery component sitting on top.
>
> I am operating three loops
>
> 1. loop to render pagination links

This one should have formState="NONE", as there's nothing to be edited  
here.

> 2. nested loop to render collection looping columns and rows

This one shouldn't, as there's stuff to be edited inside them.

This is the same problem you've reported before. We need to know the part  
of the template that contains the loop plus the Java code related to it.  
It's very probably a problem of of not using formState, which default to  
VALUEs, which uses ValueEncoder to store the looped values. If you use  
VALUES and hasn't provided a ValueEncoder for the type of the objects  
being iterated. Tapestry will serialize the object. That's very probably  
the cause of your problem. Use formState="ITERATION" of provide a  
ValueEncoder that only uses the iterated object id.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: formState="NONE" is it safe to use with persistent properties ?

George Christman
In reply to this post by nhhockeyplayer
You need to provide more code, but it sounds like your reloading the
loop before persisting your items per page, then on your second change
it picks up your persisted value from your first change. That would be
my guess. Why not put those values in the url so they become
bookmarkable, less memory consumption, and you won't lose your place
on page refresh? I'm not sure how formstate would be effecting
performance like that?

On Fri, Jan 30, 2015 at 7:24 AM, nhhockeyplayer nashua
<[hidden email]> wrote:

> I goto home page
>
> I select itemsPerPage = 5
>
> render it
>
> I have to select it twice to get it to work now
>
> i set it to 250
>
> it wont stick unless I select it twice
>
> really not fun
>
> the formState is taking me out here
>
> I dont want to propagate my properties to Home.JAVA
>
> any ideas ?
>
> Thanks for your assistance. This problem is perplexing... for a fundamental issue.
>
> Ken
>



--
George Christman
CEO
www.CarDaddy.com
P.O. Box 735
Johnstown, New York

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: formState="NONE" is it safe to use with persistent properties ?

nhhockeyplayer
In reply to this post by Thiago H de Paula Figueiredo
Thanks Thiago,
I kept the formState="NONE" for the <select> properties.
I put formState="ITERATION" for the image loop which marks up editable images.
 
The issue persists... on the <select> controls... try it yourself and see
http://psinh.ddns.net:9011/psi/home
 
set tableColumns to 5 that works
set tableColumns to 4 fails (<select> punches back to 5 and gallery stays same) ???
 
I am not sure what to think or do.
 
I will post the two four modules HOME.JAVA and GALLERY.JAVA to your email

Best regards
and thanks... KEN
 

> To: [hidden email]; [hidden email]
> Subject: Re: formState="NONE" is it safe to use with persistent properties ?
> Date: Fri, 30 Jan 2015 12:06:44 -0200
> From: [hidden email]
>
> Sorry, I hit the Send key by mistake . . .
>
> On Fri, 30 Jan 2015 10:20:30 -0200, nhhockeyplayer nashua  
> <[hidden email]> wrote:
>
> > Folks,
> >
> > I got a Home Page with a Gallery component sitting on top.
> >
> > I am operating three loops
> >
> > 1. loop to render pagination links
>
> This one should have formState="NONE", as there's nothing to be edited  
> here.
>
> > 2. nested loop to render collection looping columns and rows
>
> This one shouldn't, as there's stuff to be edited inside them.
>
> This is the same problem you've reported before. We need to know the part  
> of the template that contains the loop plus the Java code related to it.  
> It's very probably a problem of of not using formState, which default to  
> VALUEs, which uses ValueEncoder to store the looped values. If you use  
> VALUES and hasn't provided a ValueEncoder for the type of the objects  
> being iterated. Tapestry will serialize the object. That's very probably  
> the cause of your problem. Use formState="ITERATION" of provide a  
> ValueEncoder that only uses the iterated object id.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
     
Best regards and thanks
Ken
Reply | Threaded
Open this post in threaded view
|

RE: formState="NONE" is it safe to use with persistent properties ?

nhhockeyplayer


Best regards
and thanks... KEN
 

From: [hidden email]
To: [hidden email]; [hidden email]
Subject: RE: formState="NONE" is it safe to use with persistent properties ?
Date: Fri, 30 Jan 2015 14:20:24 -0500

Thanks Thiago,
I kept the formState="NONE" for the <select> properties.
I put formState="ITERATION" for the image loop which marks up editable images.
 
The issue persists... on the <select> controls... try it yourself and see
http://psinh.ddns.net:9011/psi/home
 
set tableColumns to 5 that works
set tableColumns to 4 fails (<select> punches back to 5 and gallery stays same) ???
 
I am not sure what to think or do.
 
I will post the two four modules HOME.JAVA and GALLERY.JAVA to your email

Best regards
and thanks... KEN
 
> To: [hidden email]; [hidden email]

> Subject: Re: formState="NONE" is it safe to use with persistent properties ?
> Date: Fri, 30 Jan 2015 12:06:44 -0200
> From: [hidden email]
>
> Sorry, I hit the Send key by mistake . . .
>
> On Fri, 30 Jan 2015 10:20:30 -0200, nhhockeyplayer nashua
> <[hidden email]> wrote:
>
> > Folks,
> >
> > I got a Home Page with a Gallery component sitting on top.
> >
> > I am operating three loops
> >
> > 1. loop to render pagination links
>
> This one should have formState="NONE", as there's nothing to be edited
> here.
>
> > 2. nested loop to render collection looping columns and rows
>
> This one shouldn't, as there's stuff to be edited inside them.
>
> This is the same problem you've reported before. We need to know the part
> of the template that contains the loop plus the Java code related to it.
> It's very probably a problem of of not using formState, which default to
> VALUEs, which uses ValueEncoder to store the looped values. If you use
> VALUES and hasn't provided a ValueEncoder for the type of the objects
> being iterated. Tapestry will serialize the object. That's very probably
> the cause of your problem. Use formState="ITERATION" of provide a
> ValueEncoder that only uses the iterated object id.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Gallery.java (17K) Download Attachment
Home.java (20K) Download Attachment
Best regards and thanks
Ken
Reply | Threaded
Open this post in threaded view
|

RE: formState="NONE" is it safe to use with persistent properties ?

nhhockeyplayer
Ok its a lot better now... I only got it to reproduce once... but that may have been a glitch.
 
Plus Geoff identified some javascript errors I been too lazy to repair.
 
I will try to find some time to clean those up.
 
I integrated Angular to this and haven't gotten that running cleanly yet.

But the gallery seems better.
 
I will go with that for now. Its good enough for the girl I go out with.

Best regards
and thanks... KEN
 
From: [hidden email]
To: [hidden email]; [hidden email]
Subject: RE: formState="NONE" is it safe to use with persistent properties ?
Date: Fri, 30 Jan 2015 14:21:54 -0500






Best regards
and thanks... KEN
 
From: [hidden email]
To: [hidden email]; [hidden email]
Subject: RE: formState="NONE" is it safe to use with persistent properties ?
Date: Fri, 30 Jan 2015 14:20:24 -0500




Thanks Thiago,
I kept the formState="NONE" for the <select> properties.
I put formState="ITERATION" for the image loop which marks up editable images.
 
The issue persists... on the <select> controls... try it yourself and see
http://psinh.ddns.net:9011/psi/home
 
set tableColumns to 5 that works
set tableColumns to 4 fails (<select> punches back to 5 and gallery stays same) ???
 
I am not sure what to think or do.
 
I will post the two four modules HOME.JAVA and GALLERY.JAVA to your email

Best regards
and thanks... KEN
 

> To: [hidden email]; [hidden email]
> Subject: Re: formState="NONE" is it safe to use with persistent properties ?
> Date: Fri, 30 Jan 2015 12:06:44 -0200
> From: [hidden email]
>
> Sorry, I hit the Send key by mistake . . .
>
> On Fri, 30 Jan 2015 10:20:30 -0200, nhhockeyplayer nashua  
> <[hidden email]> wrote:
>
> > Folks,
> >
> > I got a Home Page with a Gallery component sitting on top.
> >
> > I am operating three loops
> >
> > 1. loop to render pagination links
>
> This one should have formState="NONE", as there's nothing to be edited  
> here.
>
> > 2. nested loop to render collection looping columns and rows
>
> This one shouldn't, as there's stuff to be edited inside them.
>
> This is the same problem you've reported before. We need to know the part  
> of the template that contains the loop plus the Java code related to it.  
> It's very probably a problem of of not using formState, which default to  
> VALUEs, which uses ValueEncoder to store the looped values. If you use  
> VALUES and hasn't provided a ValueEncoder for the type of the objects  
> being iterated. Tapestry will serialize the object. That's very probably  
> the cause of your problem. Use formState="ITERATION" of provide a  
> ValueEncoder that only uses the iterated object id.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
             
Best regards and thanks
Ken
Reply | Threaded
Open this post in threaded view
|

Re: formState="NONE" is it safe to use with persistent properties ?

Thiago H de Paula Figueiredo
In reply to this post by George Christman
On Fri, 30 Jan 2015 14:43:49 -0200, George Christman  
<[hidden email]> wrote:

> I'm not sure how formstate would be effecting
> performance like that?

Without a provided ValueEncoder, a Loop inside a Form results in all the  
looped objects being serialized, then Base-64-ed, then put in a hidden  
input and the process being reversed when the form is submitted. That's  
very probably the performance hit, but we cannot be 100% because he didn't  
answer yet about ValueEncoders.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: formState="NONE" is it safe to use with persistent properties ?

nhhockeyplayer
In reply to this post by nhhockeyplayer
sorry Thiago for stalling
when I get a chance I will revisit this

currently its intermittent and with the formState being configured properly for each loop I still see state issues with the <select> properties persisted

I just got bigger fish to fry right now and will return to it eventually

thanks
     
Best regards and thanks
Ken