RE: Memory consumption in T4.1.2 - Hard data

2007-08-28 Thread Marcus.Schulte
But that POM does use snapshots.
You shouldn't need the repository
http://people.apache.org/repo/m2-snapshot-repository
at all.
Probably, there are no very significant differences between the latest
4.1.2 snapshot and the release. But nevertheless, for a productive
environment, I'd always go with a released version.

> -Original Message-
> From: Peter Stavrinides [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, August 29, 2007 7:45 AM
> To: Tapestry users
> Subject: Re: Memory consumption in T4.1.2 - Hard data
> 
> This is my POM:
> 
> 
> 
> 
> always
> warn
> 
> 
> always
> fail
> 
> apache.snapshots
> http://people.apache.org/repo/m2-snapshot-repository
> 
> 
> 
> 
> org.apache.tapestry
> tapestry-framework
> 4.1.2-SNAPSHOT
> test
> 
> 
> org.apache.tapestry
> tapestry-annotations
> 4.1.2-SNAPSHOT
> test
> 
> 
> org.apache.tapestry
> tapestry-contrib
> 4.1.2-SNAPSHOT
> test
> 
> 
> org.apache.tapestry
> tapestry-portlet
> 4.1.2-SNAPSHOT
> test
> 
> 
> [EMAIL PROTECTED] wrote:
> >  
> >   
> >> my configuration is as follows:
> >>
> >> JDK 6.01 32bit JVM (I have also tested on a 64 bit with no
> >> luck) Tomcat 5.5.20 Debian Linux (2.6.15.28 kernel) Tapestry 
> >> 4.1.2-SNAPSHOT with ognl 2.7
> >>
> >> 
> >
> > Hi Peter, 4.1.2-SNAPSHOT is a typo, I suppose?
> >
> >   
> >> regards,
> >> Peter
> >>
> >> Jesse Kuhnert wrote:
> >> 
> >>> I'd downgrade then if I were you.   Extensive profiling 
> with yourkit
> >>> hasn't shed any new light on whatever problems others are having.
> >>> The OGNL classes indeed aren't being kept in the javassist
> >>>   
> >> pool from
> >> 
> >>> what I can tell.
> >>>
> >>> I have another yourkit snapshot binary to look at so we'll
> >>>   
> >> see what that says.
> >> 
> >>> I don't remember - have you filed any bug reports or reported any 
> >>> problems?  Are you getting ognl exceptions during
> >>>   
> >> development as well
> >> 
> >>> as production?  Do these errors sound like
> >>>   
> >> umpotential errors
> >> 
> >>> that should be looked at further?
> >>>
> >>> On 8/28/07, Peter Stavrinides <[EMAIL PROTECTED]> wrote:
> >>>   
> >>>   
>  Hi Jessie
> 
>  Any progress on this?  sorry to bug you, but I have 
> to take a 
>  decision soon, I have two production machines that will need to 
>  upgrade or downgrade Tapestry.
> 
>  Best wishes,
>  Peter
> 
>  Jon Oakes wrote:
>  
>  
> > Hi Bryan,
> >
> > I am a relative newbie but I was wondering if  you are
> >   
> >> running with
> >> 
> > caching enabled or disabled?  It might make sense to 
> keep things 
> > around when caching is disabled whereas I think it would
> >   
> >> clearly be
> >> 
> > a bug to keep things around with it disabled.
> >
> > Jon Oakes
> >
> >
> > Jesse Kuhnert wrote:
> >   
> >   
> >> Hmmm...well,  I don't think I like the sound of any of
> >> 
> >> that.  I'm just
> >> 
> >> going to pretend this problem doesn't exist.   (just kidding)
> >>
> >> I had thought I was doing something special with the ognl 
> >> compilations that would cause its generated classes to 
> not hang 
> >> around afterwards in any pools.
> >>
> >> I'll take a look at things this weekend and am sure a fix will 
> >> appear in between now and Monday - if there is a
> >> 
> >> reasonable fix to be found.
> >> 
> >> (in 4.1.3 snapshot form)
> >>
> >> On 8/24/07, Bryan Dotzour <[EMAIL PROTECTED]>
> >> 
> >>  wrote:
> >> 
> >> 
> >> 
> >>> I and another colleague of mine have been investigating
> >>>   
> >> what seems
> >> 
> >>> to be a "memory leak" in our Tapestry application for about a 
> >>> month since we upgraded to T4.1.2.  I won't bore you
> >>>   
> >> with the saga
> >> 
> >>> of the last month, but I would like to present the data I've 
> >>> gathered and look to the list for a proposed solution.  I was 
> >>> reading a recent thread in which Jesse said (08/09/2007):
> >>>
> >>>
> >>>
> >>> "There is a map that grows as large as the system using it 
> >>> internally to javassist of various cached reflection
> >>>   
> >> info - but it
> >> 
> >>> doesn't leak in any way."
> >>>
> >>> This is precisely what I've found in profiling our
> >>>   
> >> application and
> >> 
> >>> it
> >>> *appears* to be this map that is causing our applications to 
> >>> eventually run out of memory.
> >>>
> >>> The YourKit profiler shows me that, as time goes on,
> >>>   
> >> there is an
> >> 
> >>> instance of HiveMindClassPool  that grows and grows as class 
> >>> instan

Re: Memory consumption in T4.1.2 - Hard data

2007-08-28 Thread Peter Stavrinides

This is my POM:




always
warn


always
fail

apache.snapshots
http://people.apache.org/repo/m2-snapshot-repository




org.apache.tapestry
tapestry-framework
4.1.2-SNAPSHOT
test


org.apache.tapestry
tapestry-annotations
4.1.2-SNAPSHOT
test


org.apache.tapestry
tapestry-contrib
4.1.2-SNAPSHOT
test


org.apache.tapestry
tapestry-portlet
4.1.2-SNAPSHOT
test


[EMAIL PROTECTED] wrote:
 
  

my configuration is as follows:

JDK 6.01 32bit JVM (I have also tested on a 64 bit with no 
luck) Tomcat 5.5.20 Debian Linux (2.6.15.28 kernel) Tapestry 
4.1.2-SNAPSHOT with ognl 2.7





Hi Peter, 4.1.2-SNAPSHOT is a typo, I suppose?

  

regards,
Peter

Jesse Kuhnert wrote:


I'd downgrade then if I were you.   Extensive profiling with yourkit
hasn't shed any new light on whatever problems others are having.
The OGNL classes indeed aren't being kept in the javassist 
  
pool from 


what I can tell.

I have another yourkit snapshot binary to look at so we'll 
  

see what that says.

I don't remember - have you filed any bug reports or reported any 
problems?  Are you getting ognl exceptions during 
  
development as well 

as production?  Do these errors sound like 
  
umpotential errors 


that should be looked at further?

On 8/28/07, Peter Stavrinides <[EMAIL PROTECTED]> wrote:
  
  

Hi Jessie

Any progress on this?  sorry to bug you, but I have to take a 
decision soon, I have two production machines that will need to 
upgrade or downgrade Tapestry.


Best wishes,
Peter

Jon Oakes wrote:



Hi Bryan,

I am a relative newbie but I was wondering if  you are 
  
running with 

caching enabled or disabled?  It might make sense to keep things 
around when caching is disabled whereas I think it would 
  
clearly be 


a bug to keep things around with it disabled.

Jon Oakes


Jesse Kuhnert wrote:
  
  
Hmmm...well,  I don't think I like the sound of any of 


that.  I'm just


going to pretend this problem doesn't exist.   (just kidding)

I had thought I was doing something special with the ognl 
compilations that would cause its generated classes to not hang 
around afterwards in any pools.


I'll take a look at things this weekend and am sure a fix will 
appear in between now and Monday - if there is a 


reasonable fix to be found.


(in 4.1.3 snapshot form)

On 8/24/07, Bryan Dotzour <[EMAIL PROTECTED]> 


 wrote:



I and another colleague of mine have been investigating 
  
what seems 

to be a "memory leak" in our Tapestry application for about a 
month since we upgraded to T4.1.2.  I won't bore you 
  
with the saga 

of the last month, but I would like to present the data I've 
gathered and look to the list for a proposed solution.  I was 
reading a recent thread in which Jesse said (08/09/2007):




"There is a map that grows as large as the system using it 
internally to javassist of various cached reflection 
  
info - but it 


doesn't leak in any way."

This is precisely what I've found in profiling our 
  
application and 


it
*appears* to be this map that is causing our applications to 
eventually run out of memory.


The YourKit profiler shows me that, as time goes on, 
  
there is an 

instance of HiveMindClassPool  that grows and grows as class 
instances are created.  This class extends from 
javassist.ClassPool and is the map that Jesse is 
  
talking about in 

his quote above.  And he's right, I wouldn't say that the class 
pool "leaks" either because it looks like it's designed 
  
to retain 


that memory until the class pool itself is no longer needed.



Take this quote from the javassist.ClassPool javadocs:

"Memory consumption memo:
ClassPool objects hold all the CtClasses that have been 
  
created so 

that the consistency among modified classes can be guaranteed. 
Thus if a large number of CtClasses are processed, the 
  
ClassPool 

will consume a huge amount of memory. To avoid this, a 
  
ClassPool 

object should be recreated, for example, every hundred classes 
processed. Note that
getDefault() is a singleton factory. Otherwise, detach() in 
CtClass should be used to avoid huge memory consumption. "


This huge memory consumption by the ClassPool is what I was 
seeing. In particular it is the ClassPool that is held 
  

onto by OgnlRuntime.

Inspecting this object in the profiler showed that it has a map 
containing about 45,000 classes.  All of the keys into this map 
were things like:  "ASTTest_11494aca9af" and 
  
"ASTAnd_11494ace4fb" 

and the values are instances of javassist.CtNewClass.  
  
Each entry 

in this map looks like it retains about 1,900 bytes, 
  
fo

Re: Memory consumption in T4.1.2 - Hard data

2007-08-28 Thread Peter Stavrinides

Yes
[EMAIL PROTECTED] wrote:
 
  

my configuration is as follows:

JDK 6.01 32bit JVM (I have also tested on a 64 bit with no 
luck) Tomcat 5.5.20 Debian Linux (2.6.15.28 kernel) Tapestry 
4.1.2-SNAPSHOT with ognl 2.7





Hi Peter, 4.1.2-SNAPSHOT is a typo, I suppose?

  

regards,
Peter

Jesse Kuhnert wrote:


I'd downgrade then if I were you.   Extensive profiling with yourkit
hasn't shed any new light on whatever problems others are having.
The OGNL classes indeed aren't being kept in the javassist 
  
pool from 


what I can tell.

I have another yourkit snapshot binary to look at so we'll 
  

see what that says.

I don't remember - have you filed any bug reports or reported any 
problems?  Are you getting ognl exceptions during 
  
development as well 

as production?  Do these errors sound like 
  
umpotential errors 


that should be looked at further?

On 8/28/07, Peter Stavrinides <[EMAIL PROTECTED]> wrote:
  
  

Hi Jessie

Any progress on this?  sorry to bug you, but I have to take a 
decision soon, I have two production machines that will need to 
upgrade or downgrade Tapestry.


Best wishes,
Peter

Jon Oakes wrote:



Hi Bryan,

I am a relative newbie but I was wondering if  you are 
  
running with 

caching enabled or disabled?  It might make sense to keep things 
around when caching is disabled whereas I think it would 
  
clearly be 


a bug to keep things around with it disabled.

Jon Oakes


Jesse Kuhnert wrote:
  
  
Hmmm...well,  I don't think I like the sound of any of 


that.  I'm just


going to pretend this problem doesn't exist.   (just kidding)

I had thought I was doing something special with the ognl 
compilations that would cause its generated classes to not hang 
around afterwards in any pools.


I'll take a look at things this weekend and am sure a fix will 
appear in between now and Monday - if there is a 


reasonable fix to be found.


(in 4.1.3 snapshot form)

On 8/24/07, Bryan Dotzour <[EMAIL PROTECTED]> 


 wrote:



I and another colleague of mine have been investigating 
  
what seems 

to be a "memory leak" in our Tapestry application for about a 
month since we upgraded to T4.1.2.  I won't bore you 
  
with the saga 

of the last month, but I would like to present the data I've 
gathered and look to the list for a proposed solution.  I was 
reading a recent thread in which Jesse said (08/09/2007):




"There is a map that grows as large as the system using it 
internally to javassist of various cached reflection 
  
info - but it 


doesn't leak in any way."

This is precisely what I've found in profiling our 
  
application and 


it
*appears* to be this map that is causing our applications to 
eventually run out of memory.


The YourKit profiler shows me that, as time goes on, 
  
there is an 

instance of HiveMindClassPool  that grows and grows as class 
instances are created.  This class extends from 
javassist.ClassPool and is the map that Jesse is 
  
talking about in 

his quote above.  And he's right, I wouldn't say that the class 
pool "leaks" either because it looks like it's designed 
  
to retain 


that memory until the class pool itself is no longer needed.



Take this quote from the javassist.ClassPool javadocs:

"Memory consumption memo:
ClassPool objects hold all the CtClasses that have been 
  
created so 

that the consistency among modified classes can be guaranteed. 
Thus if a large number of CtClasses are processed, the 
  
ClassPool 

will consume a huge amount of memory. To avoid this, a 
  
ClassPool 

object should be recreated, for example, every hundred classes 
processed. Note that
getDefault() is a singleton factory. Otherwise, detach() in 
CtClass should be used to avoid huge memory consumption. "


This huge memory consumption by the ClassPool is what I was 
seeing. In particular it is the ClassPool that is held 
  

onto by OgnlRuntime.

Inspecting this object in the profiler showed that it has a map 
containing about 45,000 classes.  All of the keys into this map 
were things like:  "ASTTest_11494aca9af" and 
  
"ASTAnd_11494ace4fb" 

and the values are instances of javassist.CtNewClass.  
  
Each entry 

in this map looks like it retains about 1,900 bytes, 
  
for a grand 


total of about 90 MB of memory used.

These numbers came from my staging deployment where I had the 
profiler attached, using some reflection tricks I was 
  
able to look 

at a production site and found that it had about 
  
240,000 items in 


that class pool.. approximately 450 MB of memory.

So I guess t

Re: T4.1.2 / Spring 2.0.6 / Hib3 Lazy loading and PropertySelectionModel stuff

2007-08-28 Thread Marcus Schulte
One thing to be aware of is that the same db-row, in two different
Hibernate-Session, corresponds to two different objects. So with
session-per-request, if your PSModel is loaded in one request, and your
value-parameter-object in another. If you don't override
Object.equalsappropriately, Tapestry cannot know which list member to
show for a given
value.

2007/8/28, Jan Vissers <[EMAIL PROTECTED]>:
>
> Hi,
>
> I'm witnessing some 'interesting' behavior, using lazily loaded
> collections (Hibernate) combined with PropertySelectionModel stuff. Before
> getting into too much detail - using my JUnit tests I can prove that
> traversing the (nested) objectgraph actually has the information (albeit
> via CGLIB proxies). When using this in my T4.1.2 page however, I see that
> the correct poplist value doesn't get selected. In a read only version of
> the page on the other hand - where the poplist is dynamically replaced by
> a readonly display item - the information is shown.
>
> Is there something that I should be aware of in using T4/Hib3 regarding
> the selectionmodel component?
>
> -J.
>
> BTW: I'm using OpenSessionInView provided by Spring.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: T5:Tiles?

2007-08-28 Thread Josh Canfield

you will see in the address field first:
http://localhost/sample/layout.forums
then it goes back to http://localhost/sample/forums

but for Firefox or IE either in mac or windows, the layout.forums  
will not

be shown, only the final one.


I've tried it in Safari on my Mac and I've never seen that behavior.  
I don't believe that another request is generated simply by loading  
the page. Can you provide more information about what you are doing?  
Are your components and pages in the right folders?



TheDailyTube.com. The best new videos on the internet delivered fresh  
to your inbox.





Re: T3: DateTimePicker

2007-08-28 Thread Nick Westgate

Most readers here won't have a T3 project handy,
and even fewer will have used this component (I haven't).

Please define "didn't work".

Cheers,
Nick.


Nazmul Bhuiyan wrote:

I've downloaded the myworkspace-0.2.jar from
http://myworkspace.sourceforge.net/component-library.html.
I've tried to use this component as DatePicker but didn't work. I must have
missed something basic.
Can some one please some example how to use this component?
For example: in the html templet, .page and the java?
Thanks
Naz


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5:Tiles?

2007-08-28 Thread Angelo Chen

Hi Josh,

Your tip works, just an observation, when viewing the page in Mac's Safari,
for the url:

http://localhost/sample/forums

you will see in the address field first:
http://localhost/sample/layout.forums
then it goes back to http://localhost/sample/forums

but for Firefox or IE either in mac or windows, the layout.forums will not
be shown, only the final one.



Josh Canfield-2 wrote:
> 
> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd ">
> 
> Could it be as silly as a space after the xsd?
> 
> I have run the following successfully
> 
> -
> /src/main/resources/com/thedailytube/ui/tapestry/pages/SomePage.html
> ---
> 
> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> 
> SomePage Added Sidebar
> 
> This is the body content
> 
> 
> -
> /src/main/resources/com/thedailytube/ui/tapestry/components/Layout.html
> ---
> 
> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> 
> 
> The Header
> 
> 
> 
> 
> Top of Sidebar
> 
> Bottom of Sidebar
> 
> The Footer
> 
> 
> 
> 
> -- Layout.java ---
> 
> package com.thedailytube.ui.tapestry.components;
> 
> import org.apache.tapestry.Block;
> import org.apache.tapestry.annotations.Parameter;
> 
> public class Layout {
> @Parameter
> private Block _sidebarContent;
> 
> public Block getSidebarContent() {
> return _sidebarContent;
> }
> 
> public void setSidebarContent(Block sidebarContent) {
> this._sidebarContent = sidebarContent;
> }
> }
> 
> --- SomePage.java 
> 
> package com.thedailytube.ui.tapestry.pages;
> 
> public class SomePage {
> 
> }
> 
>  http://localhost:8080/somepage -
> 
> 
>  type="text/css">
> 
> The Header
> 
> 
>   
>   This is the body content
> 
> 
> 
> Top of Sidebar
> 
>   SomePage Added Sidebar
>   
> Bottom of Sidebar
> 
> The Footer
> 
> 
> 
> 
> 
> 
> 
> Josh
> 
> On 8/23/07, Angelo Chen <[EMAIL PROTECTED]> wrote:
>>
>>
>> Hi Josh,
>>
>> I added that but got another error:
>>
>> Component Somepage does not contain an embedded component with id 'html'.
>>
>> This is the Somepage.html:
>>
>> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>>
>> 
>> Add this additional to the sidebar
>> 
>> All of this goes into the content section
>>
>> 
>>
>>
>>
>> Josh Canfield-2 wrote:
>> >
>> > Sorry, I should have had the Layout.java in there too... What that
>> error
>> > is
>> > telling you is that it's looking for the 'sidebarContent' property in
>> your
>> > Layout.java class. You can define it as below:
>> >
>> > public class Layout {
>> > @Parameter
>> > private Block _sidebarContent;
>> >
>> > public Block getSidebarContent() {
>> > return _sidebarContent;
>> > }
>> >
>> > public void setSidebarContent(Block sidebarContent) {
>> > this._sidebarContent = sidebarContent;
>> > }
>> > }
>> >
>> > Josh
>> >
>> > On 8/23/07, Angelo Chen <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> Hi Josh,
>> >>
>> >> This looks interesting, I tried it with following steps:
>> >>
>> >> 1.put Layout.html in the myapp/components, add also a Layout.java
>> >> 2. put Somepage.html under WEB-INTF, add Somepage.java in myapp/pages
>> >>
>> >> when I access it with http://localhost:8080/Somepage.html, I got
>> >> following
>> >> error:
>> >>
>> >> Could not convert 'sidebarContent' into a component parameter binding:
>> >> Class
>> >> org.example.myapp.components.Layout does not contain a property named
>> >> 'sidebarContent' (within property expression 'sidebarContent').
>> >>
>> >> What I did wrong here? Thanks,
>> >>
>> >> A.C.
>> >>
>> >>
>> >> Josh Canfield-2 wrote:
>> >> >
>> >> > I love delegate for this type of stuff. If you want to define a
>> layout
>> >> and
>> >> > let the page decide what goes in the layout define a block parameter
>> >> and
>> >> > use
>> >> > delegate to render it:
>> >> >
>> >> > (this has been truncated and modified for brevity, so while this may
>> >> not
>> >> > work out of the box it's full size cousin does work...)
>> >> >
>> >> >  somepage.html 
>> >> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd
>> >> ">
>> >> > 
>> >> > Add this additional to the sidebar
>> >> > 
>> >> > All of this goes into the content section
>> >> >
>> >> > 
>> >> >
>> >> >
>> >> > - layout.html 
>> >> >
>> >> > > xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>> >> > ...
>> >> > 
>> >> >
>> >> > ...
>> >> > 
>> >> > 
>> >> > 
>> >> > 
>> >> > 
>> >> > 
>> >> > 
>> >> > ...
>> >> >
>> >> > 
>> >> > 
>> >> >
>> >> > Enjoy,
>> >> > Josh
>> >> >
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/T5%3ATiles--tf4310807.html#a12305428
>> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> -
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additi

RE: [T5] Localization

2007-08-28 Thread Doug Hauge
Passing parameters into the message formatter directly from HTML seems more 
natural than having to inject a 'Messages' interface into the page and add an 
accessor method for the message any time the number of format parameters is not 
0.

Doug

> -Original Message-
> From: Massimo Lusetti [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 28, 2007 2:32 PM
> To: Tapestry users
> Subject: Re: [T5] Localization
> 
> On 8/28/07, Christoph Jaeger <[EMAIL PROTECTED]> wrote:
> 
> > If not, does this seem difficult to implement?
> 
> Using normal ResourceBundle features? And doing that inside javacode
> where logic belongs?
> 
> --
> Massimo
> http://meridio.blogspot.com
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>> -Original Message-
>> From: Christoph Jaeger [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, August 28, 2007 2:13 PM
>> To: users@tapestry.apache.org
>> Subject: [T5] Localization
>> 
>> Hi,
>> 
>> is there a way to use messages with parameters directly from a HTML
>> template?
>> 
>> Something like:
>> 
>> ${message:results,prop:numberOfDatasets}
>> 
>> with
>> 
>> Page.java
>> 
>> ...
>> public int getNumberOfDatasets()
>> {
>>   return numberOfDatasets;
>> }
>> ...
>> 
>> Page_en.properties:
>> 
>> results: Found %d datasets.
>> 
>> Page_de.properties:
>> 
>> results: %d Datensätze gefunden.
>> 
>> If not, does this seem difficult to implement?
>> 
>> Thanks,
>> 
>> Best Regards,
>> 
>> Christoph Jäger
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 Error in 5.0.5 palette.js

2007-08-28 Thread Martin Reurings
Actually throwing an onclick event (which is what I assume is being 
used) on a disabled item isn't forbidden by specification.


But, it shouldn't be the cause of Opera's unwillingness to function. In 
the updateButtons method the disabled state of the buttons should be 
update in accordance to the Palletes' state (select should be enabled if 
there's available options etc.). So we may conclude this Component has 
not been tested outside FireFox :)


Thiago H. de Paula Figueiredo wrote:
Em Tue, 28 Aug 2007 20:51:30 -0300, Martin Reurings 
<[EMAIL PROTECTED]> escreveu:


Probably the best way to get some clarity is by adding a few alerts 
in some key places and compare the results of those alert between FF 
and IE. Just because it works in FF doesn't mean it's correct BTW.


T5's Palette buttons do not work on Opera either. They are rendered 
with disabled="disabled", something that is very strange. The same is 
rendered to Firefox, but in Firefox it works. It seems to me that 
Opera is doing the right thing (ignoring clicks in a button declared 
with disabled="disabled"). Am I right?


Thiago

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 Error in 5.0.5 palette.js

2007-08-28 Thread Thiago H. de Paula Figueiredo
Em Tue, 28 Aug 2007 20:51:30 -0300, Martin Reurings <[EMAIL PROTECTED]>  
escreveu:


Probably the best way to get some clarity is by adding a few alerts in  
some key places and compare the results of those alert between FF and  
IE. Just because it works in FF doesn't mean it's correct BTW.


T5's Palette buttons do not work on Opera either. They are rendered with  
disabled="disabled", something that is very strange. The same is rendered  
to Firefox, but in Firefox it works. It seems to me that Opera is doing  
the right thing (ignoring clicks in a button declared with  
disabled="disabled"). Am I right?


Thiago

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5:Tiles?

2007-08-28 Thread Thiago H. de Paula Figueiredo
Em Tue, 28 Aug 2007 20:52:28 -0300, Angelo Chen  
<[EMAIL PROTECTED]> escreveu:



Class org.sample.t5.pages.Home does not contain a property named 'myhome'
(within property expression 'myhome').



You want




Try 

The literal: prefix guarantees that the value after it is treated as a  
String. The default prefix for all bindings is prop:, as the error above  
shows. :)


Thiago.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5:Tiles?

2007-08-28 Thread Angelo Chen

Hi Josh,

I did like this:

http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>

but I got an error:

Class org.sample.t5.pages.Home does not contain a property named 'myhome'
(within property expression 'myhome').


Josh Canfield-2 wrote:
> 
> I think your problem is here:
> 
>> in my Somepage.html
>> 
>>
> 
> You want
> 
> 
> 
> Josh
> 
> On 8/28/07, Angelo Chen <[EMAIL PROTECTED]> wrote:
>>
>> Hi Josh,
>>
>> I tried to folow following method, but not working:
>>
>> my Layout.java like this:
>>
>> public class Layout {
>>
>>@Parameter
>>private Block _sidebarContent;
>>
>>public Block getSidebarContent() {
>>return _sidebarContent;
>>}
>>
>>public void setSidebarContent(Block sidebarContent) {
>>this._sidebarContent = sidebarContent;
>>}
>>
>>@Parameter
>>private String _title;
>>public String getTitle() {
>>return _title;
>>}
>>
>>public void setTitle(String title) {
>>this._title = title;
>>}
>>  
>> }
>>
>> in my Somepage.html
>> 
>>
>> i noticed the setter in Layout.java will not be called, why? thanks.
>>
>> A.C.
>>
>>
>>
>>
>>
>>
>> or you can add the title parameter to Layout and pass it from Somepage
>>
>> Layout.java:
>> @Parameter // if you want to require a title, add (required=true)
>> private String title; // add getter/setter
>>
>> Somepage.html
>> 
>> ...
>>
>>
>>
>>
>> Josh Canfield-2 wrote:
>> >
>> > On 8/24/07, Angelo Chen <[EMAIL PROTECTED]> wrote:
>> >>
>> >> Hi Josh,
>> >>
>> >> This works, now if I have this in the Layout.html:
>> >>
>> >> 
>> >>${title}
>> >> 
>> >>
>> >> Layout.java also has a getTtitle to return 'base page';
>> >>
>> >> now how to replace this title with 'somepage' in the somepage.html? I
>> add
>> >> a
>> >> getTitle in the Somepage.java, but it still picks up 'base page', any
>> >> solution to this?
>> >>
>> >
>> > There is no inheritance relationship between Somepage and Layout.
>> > Somepage contains a reference to the Layout object. You have options
>> > with how you are going to update the layout.
>> >
>> > You can inject the Layout object into Somepage and manipulate it by:
>> >
>> > @Component
>> > private Layout layout; // add getter/setter
>> > protected void beforeRender() {
>> >   layout.setTitle(title);
>> > }
>> >
>> > or you can add the title parameter to Layout and pass it from Somepage
>> >
>> > Layout.java:
>> > @Parameter // if you want to require a title, add (required=true)
>> > private String title; // add getter/setter
>> >
>> > Somepage.html
>> > 
>> > ...
>> > 
>> >
>> > Pick the one that makes the most sense for your application
>> >
>> >
>> >
>> >> A.C.
>> >> Josh Canfield-2 wrote:
>> >> >
>> >> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd
>> ">
>> >> >
>> >> > Could it be as silly as a space after the xsd?
>> >> >
>> >> > I have run the following successfully
>> >> >
>> >> > -
>> >> >
>> >>
>> /src/main/resources/com/thedailytube/ui/tapestry/pages/SomePage.html
>> >> > ---
>> >> >
>> >> > > >> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>> >> > 
>> >> > SomePage Added Sidebar
>> >> > 
>> >> > This is the body content
>> >> > 
>> >> >
>> >> > -
>> >> >
>> /src/main/resources/com/thedailytube/ui/tapestry/components/Layout.html
>> >> > ---
>> >> >
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/T5%3ATiles--tf4310807.html#a12309092
>> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> -
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > --
>> > TheDailyTube.com. Sign up and get the best new videos on the internet
>> > delivered fresh to your inbox.
>> >
>> > -
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/T5%3ATiles--tf4310807.html#a12368634
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> --
> TheDailyTube.com. Sign up and get the best new videos on the internet
> delivered fresh to your inbox.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3ATiles--tf4310807.html#a12378608
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: 

Re: T5 Error in 5.0.5 palette.js

2007-08-28 Thread Martin Reurings
I suppose I'd have to make the time to test through the Palette 
component to figure this one out. The syntax appears to be correct 
(apart from the trailing comma you already identified) and the lack of 
comments obscures a lot of what's going on.


There's some (to me) really obscure eventhandling going on which doesn't 
really help in understanding what could be going wrong :) My guess would 
be that IE doesn't change the state of something quite in the way 
FireFox would (judging from the bug you already solved it wasn't tested 
in anything else) and as a result you now don't have a set of objects to 
move, or something along those lines. Think along the lines of events 
which in FF are global, while in IE they only fire on the element.


Probably the best way to get some clarity is by adding a few alerts in 
some key places and compare the results of those alert between FF and 
IE. Just because it works in FF doesn't mean it's correct BTW.


I'm certain it's not a matter of syntax though!

Daniel Jue wrote:

I am using JS Eclipse, however I am no javascript wizard. :-)
JSEclipse didn't complaint about the extra comma!

I just had a look at the T4 pallet js (from the apache trunk) and it does
not have a comma after the end of the function listing.  However, the T4
version is way different and uses some dojo constructs as well as some
deprecation handling at the bottom.

https://svn.apache.org/repos/asf/tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/palette/


Here is the full T5 version, as of T5.0.5:


Tapestry.Palette = Class.create();
Tapestry.Palette.prototype = {
  initialize : function(id, reorder, naturalOrder) {
this.reorder = reorder;
// The SELECT elements

  this.avail = $(id + ":avail");
  this.selected = $(id);

  this.hidden = $(id + ":values");

  // Seperator used for values in the hidden field.
  this.sep = ";";

  // The BUTTON elements
  this.select = $(id + ":select");
  this.deselect = $(id + ":deselect");

  if (this.reorder) {
this.up = $(id + ":up");
this.down = $(id + ":down");
  }

  this.valueToOrderIndex = {};

  naturalOrder.split(this.sep).each(function (value, i) {
this.valueToOrderIndex[value] = i; }.bind(this));

  this.bindEvents();
  },

  bindEvents : function() {
var updateButtons = this.updateButtons.bindAsEventListener(this);
Event.observe(this.avail, "change", updateButtons);
Event.observe(this.selected, "change", updateButtons);

var selectClicked = this.selectClicked.bindAsEventListener(this);
Event.observe(this.select, "click", selectClicked);
Event.observe(this.avail, "dblclick", selectClicked);

var deselectClicked = this.deselectClicked.bindAsEventListener(this);

Event.observe(this.deselect, "click", deselectClicked);
Event.observe(this.selected, "dblclick", deselectClicked);

if (this.reorder) {
  Event.observe(this.up, "click", this.moveUpClicked.bindAsEventListener
(this));
  Event.observe(this.down, "click",
this.moveDownClicked.bindAsEventListener(this));
}
  },

  updateButtons: function() {
this.select.disabled = this.avail.selectedIndex < 0;

var nothingSelected = this.selected.selectedIndex < 0;

this.deselect.disabled = nothingSelected;

if (this.reorder) {
  this.up.disabled = nothingSelected || this.allSelectionsAtTop();
  this.down.disabled = nothingSelected || this.allSelectionsAtBottom();
}
  },

  indexOfLastSelection : function(select) {
if (select.selectedIndex < 0) return -1;

for (var i = select.options.length - 1; i >= select.selectedIndex; i--)
{
  if (select.options[i].selected) return i;
}

return -1;
  },

  allSelectionsAtTop: function() {
var last = this.indexOfLastSelection(this.selected);
var options = $A(this.selected.options);

return ! options.slice(0, last).any(function (o) { return ! o.selected;
});
  },

  allSelectionsAtBottom : function() {
var options = $A(this.selected.options);

// Make sure that all elements from the (first) selectedIndex to the end
are also selected.
return options.slice(this.selected.selectedIndex).all(function(o) {
return o.selected; });
  },

  selectClicked : function(event) {
 this.transferOptions(this.avail, this.selected, this.reorder);
  },

  deselectClicked : function(event) {
 this.transferOptions(this.selected, this.avail, false);
  },

  transferOptions : function (from, to, atEnd) {
// from: SELECT to move option(s) from (those that are selected)
// to: SELECT to add option(s) to
// atEnd : if true, add at end, otherwise by natural sort order
var toOptions = $A(to.options);

toOptions.each(function(option) { option.selected = false; });

var movers = this.removeSelectedOptions(from);
this.moveOptions(movers, to, atEnd);

  },

  updateHidden : function() {
// Every value in the selected list (whether enabled or not) i

Re: [T5] Usage of Grid component

2007-08-28 Thread Thiago H. de Paula Figueiredo
Em Tue, 28 Aug 2007 19:00:13 -0300, Daniel Jue <[EMAIL PROTECTED]>  
escreveu:


"Hacking" the beanmodel is definitely possible.  You can actually dump  
all the columns that bean model picks up, and re-add them to the  
beanmodel's
list in the order you want.  You'd probably want something more  
streamlined

if you are letting your users reorder the columns at run time.


I meant "hacking" as a synonim for "taking a look and coding". ?)


This is pretty essential since we should never rely on the order of
getters/setters in the code to determine the order of visual output.   
It's great to get started, but if you are like me and let your IDE sort  
your

class members for you, you'll need more than the default order.


Agreed!
I all wanted was something like a columns parameter that takes a  
comma-separated list of properties, existing or not. It must not be  
difficult to do.


Thiago

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T3: DateTimePicker

2007-08-28 Thread Nazmul Bhuiyan

I've downloaded the myworkspace-0.2.jar from
http://myworkspace.sourceforge.net/component-library.html.
I've tried to use this component as DatePicker but didn't work. I must have
missed something basic.
Can some one please some example how to use this component?
For example: in the html templet, .page and the java?
Thanks
Naz
-- 
View this message in context: 
http://www.nabble.com/T3%3A-DateTimePicker-tf4344767.html#a12377971
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 Error in 5.0.5 palette.js

2007-08-28 Thread Daniel Jue
I am using JS Eclipse, however I am no javascript wizard. :-)
JSEclipse didn't complaint about the extra comma!

I just had a look at the T4 pallet js (from the apache trunk) and it does
not have a comma after the end of the function listing.  However, the T4
version is way different and uses some dojo constructs as well as some
deprecation handling at the bottom.

https://svn.apache.org/repos/asf/tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/palette/


Here is the full T5 version, as of T5.0.5:


Tapestry.Palette = Class.create();
Tapestry.Palette.prototype = {
  initialize : function(id, reorder, naturalOrder) {
this.reorder = reorder;
// The SELECT elements

  this.avail = $(id + ":avail");
  this.selected = $(id);

  this.hidden = $(id + ":values");

  // Seperator used for values in the hidden field.
  this.sep = ";";

  // The BUTTON elements
  this.select = $(id + ":select");
  this.deselect = $(id + ":deselect");

  if (this.reorder) {
this.up = $(id + ":up");
this.down = $(id + ":down");
  }

  this.valueToOrderIndex = {};

  naturalOrder.split(this.sep).each(function (value, i) {
this.valueToOrderIndex[value] = i; }.bind(this));

  this.bindEvents();
  },

  bindEvents : function() {
var updateButtons = this.updateButtons.bindAsEventListener(this);
Event.observe(this.avail, "change", updateButtons);
Event.observe(this.selected, "change", updateButtons);

var selectClicked = this.selectClicked.bindAsEventListener(this);
Event.observe(this.select, "click", selectClicked);
Event.observe(this.avail, "dblclick", selectClicked);

var deselectClicked = this.deselectClicked.bindAsEventListener(this);

Event.observe(this.deselect, "click", deselectClicked);
Event.observe(this.selected, "dblclick", deselectClicked);

if (this.reorder) {
  Event.observe(this.up, "click", this.moveUpClicked.bindAsEventListener
(this));
  Event.observe(this.down, "click",
this.moveDownClicked.bindAsEventListener(this));
}
  },

  updateButtons: function() {
this.select.disabled = this.avail.selectedIndex < 0;

var nothingSelected = this.selected.selectedIndex < 0;

this.deselect.disabled = nothingSelected;

if (this.reorder) {
  this.up.disabled = nothingSelected || this.allSelectionsAtTop();
  this.down.disabled = nothingSelected || this.allSelectionsAtBottom();
}
  },

  indexOfLastSelection : function(select) {
if (select.selectedIndex < 0) return -1;

for (var i = select.options.length - 1; i >= select.selectedIndex; i--)
{
  if (select.options[i].selected) return i;
}

return -1;
  },

  allSelectionsAtTop: function() {
var last = this.indexOfLastSelection(this.selected);
var options = $A(this.selected.options);

return ! options.slice(0, last).any(function (o) { return ! o.selected;
});
  },

  allSelectionsAtBottom : function() {
var options = $A(this.selected.options);

// Make sure that all elements from the (first) selectedIndex to the end
are also selected.
return options.slice(this.selected.selectedIndex).all(function(o) {
return o.selected; });
  },

  selectClicked : function(event) {
 this.transferOptions(this.avail, this.selected, this.reorder);
  },

  deselectClicked : function(event) {
 this.transferOptions(this.selected, this.avail, false);
  },

  transferOptions : function (from, to, atEnd) {
// from: SELECT to move option(s) from (those that are selected)
// to: SELECT to add option(s) to
// atEnd : if true, add at end, otherwise by natural sort order
var toOptions = $A(to.options);

toOptions.each(function(option) { option.selected = false; });

var movers = this.removeSelectedOptions(from);
this.moveOptions(movers, to, atEnd);

  },

  updateHidden : function() {
// Every value in the selected list (whether enabled or not) is combined
to form the value.
var values = $A(this.selected).map(function(o) { return o.value; });

this.hidden.value = values.join(this.sep);
  },

  moveUpClicked : function(event) {
var pos = this.selected.selectedIndex - 1;
var movers = this.removeSelectedOptions(this.selected);

var before = pos < 0 ? this.selected.options[0] : this.selected.options
[pos];

this.reorderSelected(movers, before);

Event.stop(event);
  },

  removeSelectedOptions : function(select) {
var movers = [];
var options = select.options;

for (var i = select.selectedIndex; i < select.length; i++) {
  var option = options[i];
  if (option.selected) {
select.remove(i--);
movers.push(option);
  }
}

return movers;
  },

  moveOptions : function(movers, to, atEnd) {

movers.each(function(option) { this.moveOption(option, to, atEnd);
}.bind(this));

this.updateHidden();
this.updateButtons();
  },

  moveOption : function(option, to, atEnd) {
var befor

Re: T5 Error in 5.0.5 palette.js

2007-08-28 Thread Martin Reurings
Without having a look at the rest of the code I can tell you without a 
doubt you are on the right track there.
When using Object Notation Firefox has some weird parsing error which 
allows it to successfully parse an object that has the illegal syntax 
you just highlighted. Make no mistake though, only Firefox is capable of 
this, Opera probably chokes on it and I know Safari will for sure.


If you'd be developing using Eclipse it may help to open up that JS code 
in JSEclipse (Free download from Adobe), it has a reasonably 
well-behaving syntax checker, it might help you fixing up the syntax :)


Daniel Jue wrote:

When using the Palette component, I am getting a Javascript error in IE,

Line: 183
Char: 1
Error: Expected identifier, string or number
Code: 0


  reorderSelected : function(movers,  before) {
movers.each (function(option) { this.selected.add(option, before);
}.bind(this));

this.updateHidden();
this.updateButtons();
  },
};

Line 183 is the line after the };

I think the extra comma after the end of the reorderSelected code block is
to blame.
For me it was causing an error in IE6 which prevented me from using the
select button in the Palette.

I removed the "extra" comma, but then when I highlight some items and click
the select button, I get a Type Mismatch error on the comma at the end of
this function:

  moveOption : function(option, to, atEnd) {
var before = null;

if (!atEnd) {
  var optionOrder = this.valueToOrderIndex[option.value];
  var candidate = $A(to.options).find(function (o) {
return this.valueToOrderIndex[o.value] > optionOrder;
}.bind(this));
  if (candidate) before = candidate;
}

to.add(option, before);
  },

Is the T5 Palette working fine for anyone using IE?
The IE Version I am testing is
6.0.2900.2180.xpsp_sp2_gdr.070227-2254


Everything works fine in Firefox, of course.

  


--
(   /'  _/_ __  _ _
|/|///)(/(/(//_(-/
   _/
E-mail: [EMAIL PROTECTED]
Website: http://www.windgazer.nl

"The trouble with doing something right the first time, is nobody
appreciates how difficult it was."
  -- Unknown Artist


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T5] Usage of Grid component

2007-08-28 Thread Daniel Jue
"Hacking" the beanmodel is definitely possible.  You can actually dump all
the columns that bean model picks up, and re-add them to the beanmodel's
list in the order you want.  You'd probably want something more streamlined
if you are letting your users reorder the columns at run time.

This is pretty essential since we should never rely on the order of
getters/setters in the code to determine the order of visual output.  It's
great to get started, but if you are like me and let your IDE sort your
class members for you, you'll need more than the default order.

I was able to do this with much help from this list, btw.

I'll try and post some code later, but you can search the list for now.

On 8/28/07, Thiago H de Paula Figueiredo <[EMAIL PROTECTED]> wrote:
>
> On Tue, 28 Aug 2007 17:39:30 -0300, Christoph Jaeger
> <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > is there a simple example of how to use the grid component, which is
> > just a bit more complex than
> >
> > 
>
> Something I really miss in Grid that is present in T4's contrib:Table
> flexibility
> (
> http://tapestry.apache.org/tapestry4.1/tapestry-contrib/componentreference/table.html
> ),
> specifically the columns parameter. That's why I'm developing an
> application en T5 and I'm not using Grid yet: it doesn't allow me to
> reorder the columns easily. I tried to grok the BeanModel default
> implementation, but I had to have a working code quickly and then I
> postponed my BeanModel hackings. :)
>
> --
> Thiago H. de Paula Figueiredo
> Desenvolvedor, Instrutor e Consultor de Tecnologia
> Eteg Tecnologia da Informação Ltda.
> http://www.eteg.com.br
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


T5 Error in 5.0.5 palette.js

2007-08-28 Thread Daniel Jue
When using the Palette component, I am getting a Javascript error in IE,

Line: 183
Char: 1
Error: Expected identifier, string or number
Code: 0


  reorderSelected : function(movers,  before) {
movers.each (function(option) { this.selected.add(option, before);
}.bind(this));

this.updateHidden();
this.updateButtons();
  },
};

Line 183 is the line after the };

I think the extra comma after the end of the reorderSelected code block is
to blame.
For me it was causing an error in IE6 which prevented me from using the
select button in the Palette.

I removed the "extra" comma, but then when I highlight some items and click
the select button, I get a Type Mismatch error on the comma at the end of
this function:

  moveOption : function(option, to, atEnd) {
var before = null;

if (!atEnd) {
  var optionOrder = this.valueToOrderIndex[option.value];
  var candidate = $A(to.options).find(function (o) {
return this.valueToOrderIndex[o.value] > optionOrder;
}.bind(this));
  if (candidate) before = candidate;
}

to.add(option, before);
  },

Is the T5 Palette working fine for anyone using IE?
The IE Version I am testing is
6.0.2900.2180.xpsp_sp2_gdr.070227-2254


Everything works fine in Firefox, of course.


Re: [T5] Localization

2007-08-28 Thread Massimo Lusetti
On 8/28/07, Christoph Jaeger <[EMAIL PROTECTED]> wrote:

> If not, does this seem difficult to implement?

Using normal ResourceBundle features? And doing that inside javacode
where logic belongs?

-- 
Massimo
http://meridio.blogspot.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[T5] Localization

2007-08-28 Thread Christoph Jaeger
Hi,

is there a way to use messages with parameters directly from a HTML
template?

Something like:

${message:results,prop:numberOfDatasets}

with

Page.java

...
public int getNumberOfDatasets()
{
  return numberOfDatasets;
}
...

Page_en.properties:

results:Found %d datasets.

Page_de.properties:

results:%d Datensätze gefunden.

If not, does this seem difficult to implement?

Thanks,

Best Regards,

Christoph Jäger

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T4.1.2 / Spring 2.0.6 / Hib3 Lazy loading and PropertySelectionModel stuff

2007-08-28 Thread Jan Vissers
Hi,

I'm witnessing some 'interesting' behavior, using lazily loaded
collections (Hibernate) combined with PropertySelectionModel stuff. Before
getting into too much detail - using my JUnit tests I can prove that
traversing the (nested) objectgraph actually has the information (albeit
via CGLIB proxies). When using this in my T4.1.2 page however, I see that
the correct poplist value doesn't get selected. In a read only version of
the page on the other hand - where the poplist is dynamically replaced by
a readonly display item - the information is shown.

Is there something that I should be aware of in using T4/Hib3 regarding
the selectionmodel component?

-J.

BTW: I'm using OpenSessionInView provided by Spring.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T5] Usage of Grid component

2007-08-28 Thread Thiago H de Paula Figueiredo
On Tue, 28 Aug 2007 17:39:30 -0300, Christoph Jaeger  
<[EMAIL PROTECTED]> wrote:



Hi,

is there a simple example of how to use the grid component, which is
just a bit more complex than




Something I really miss in Grid that is present in T4's contrib:Table  
flexibility  
(http://tapestry.apache.org/tapestry4.1/tapestry-contrib/componentreference/table.html),  
specifically the columns parameter. That's why I'm developing an  
application en T5 and I'm not using Grid yet: it doesn't allow me to  
reorder the columns easily. I tried to grok the BeanModel default  
implementation, but I had to have a working code quickly and then I  
postponed my BeanModel hackings. :)


--
Thiago H. de Paula Figueiredo
Desenvolvedor, Instrutor e Consultor de Tecnologia
Eteg Tecnologia da Informação Ltda.
http://www.eteg.com.br

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[T5] Usage of Grid component

2007-08-28 Thread Christoph Jaeger
Hi,

is there a simple example of how to use the grid component, which is
just a bit more complex than



There are basically two things I am looking for at the moment:

1. hide columns (without using annotations in the java files, my feeling
is that the configuration which fields to show on the web-form does not
belong in an annotation in the java entity, but in the page)

2. create a link (actionlink?) in each row to reach a page where the
specific item can be edited

I think almost every tapestry application will use features like this in
a grid, but I could not find a simple example of how to do it.

I someone points me to the right direction, I will create a simple
example for the wiki.

Thanks,

Christoph Jäger

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 Conditional New Window on submit

2007-08-28 Thread Josh Canfield
When you submit a form with target set to _blank the new window is
opened and the form is submitted there. The current page is not
refreshed. If you want to see the errors in the original window and
only open a new window you after the input is known to be good then
you have to post back to the same page and allow it to reload. If the
input is good then open the new window with the report.

I can't think of a way to do that without some javascript...

Josh


On 8/28/07, Daniel Jue <[EMAIL PROTECTED]> wrote:
> Right now I have a form that opens a new window on submit, like this:
>
> 
> 
> 
>  src="${runreportbtn}"/>
> 
>
> The error processing it does is all server side.  However, if there is an
> error, it will open a new window and show the form's page, including the
> errors.
> At this point I have duplicate forms, and one shows the error.
>
> I want to only open the next page in a new window "on Success"  Is this
> possible?  Do I need to be using Javascript for this?
>
> Thanks,
> Daniel
>


-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



dojo widget question - where is StretchPane.js ?

2007-08-28 Thread Ken nashua

Folks,

There is planey of support since October 2006 of a widget named Stretchpane 
which optimizes or emulates a variation of css overflow:visible and 
basically automates it for parent container widgets/elements.


I checked out the latest dojo from http://svn.dojotoolkit.org/dojo/trunk

But StretchPane is no where to be found.

Can anyone elaobrate... thanks.

Best regards
Ken in nashua

_
Messenger Café — open for fun 24/7. Hot games, cool activities served daily. 
Visit now. http://cafemessenger.com?ocid=TXT_TAGHM_AugHMtagline



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T5 Conditional New Window on submit

2007-08-28 Thread Daniel Jue
Right now I have a form that opens a new window on submit, like this:







The error processing it does is all server side.  However, if there is an
error, it will open a new window and show the form's page, including the
errors.
At this point I have duplicate forms, and one shows the error.

I want to only open the next page in a new window "on Success"  Is this
possible?  Do I need to be using Javascript for this?

Thanks,
Daniel


Re: T5 Tree Component javascript and DOM

2007-08-28 Thread Josh Canfield
> Does anyone have a better solution for this?  This must have been solved
> elsewhere...
> Is there a hook in prototype we can use for making things run after the DOM
> is complete?  The problem doesn't happen with Firefox 2.
>

Off the top of my head I would suggest adding your javascript to the
onload event.

Event.observe( window, 'load', function() {
  // Put the Javascript that needs to happen when the page
  // loads here
} );

On 8/28/07, Daniel Jue <[EMAIL PROTECTED]> wrote:
> It figures that I would run into this problem.  Placing the Tree Component's
> java script block, as seen on the wiki, can cause Abort errors on IE (tested
> ie6) because it's modifying the DOM before it is loaded all the way.  (I am
> using a larger, complex page to experience these errors)  My page probably
> has 30-40 components on it, and the Tree I have is right in the middle of
> that stack.
>
> To remedy the problem, I put the 7 lines of javascript code at the bottom of
> my border component, to make sure it always goes last.
>
> 
>treeObj = new JSDragDropTree();
>treeObj.setTreeId('reporttree');
>treeObj.setImageFolder('/IEIS2/images/tree/');
>treeObj.setRenameAllowed (false);
>treeObj.setDeleteAllowed(false);
>treeObj.initTree();
>treeObj.expandAll();
> 
>
>
> But for pages that don't have a tree on them, I get a script error because
> JSDragDropTree is undefined.
>
> Does anyone have a better solution for this?  This must have been solved
> elsewhere...
> Is there a hook in prototype we can use for making things run after the DOM
> is complete?  The problem doesn't happen with Firefox 2.
>


-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How do I get a page from a sub-package

2007-08-28 Thread mraible

Thanks - this helped me discover my problem. I appreciate the help.

Matt


Marcus.Schulte wrote:
> 
> page-pathes are always relative to your pages-package, so
> cycle.getPage("admin/UserList") should be fine.
> Somehow, Tapestry seems to find your template in
> /admin/UserList and associates it with BasePage.
> Could it be, that you have a page class named UserList in both the pages
> package and the admin sub-package? Maybe a dirty build after moving
> thins around?
> 
>> -Original Message-
>> From: mraible [mailto:[EMAIL PROTECTED] 
>> Sent: Tuesday, August 28, 2007 3:59 PM
>> To: users@tapestry.apache.org
>> Subject: Re: How do I get a page from a sub-package
>> 
>> 
>> I have the following configured:
>> 
>> > value="org.appfuse.webapp.pages"/>
>> 
>> Are you saying I should change it to:
>> 
>> > value="org.appfuse.webapp.pages,org.appfuse.webapp.pages.admin"/>
>> 
>> Are you sure it doesn't scan sub-packages by default? It 
>> seems to - if I put a class in this package and move the page 
>> into a matching sub-directory, it works. However, when I get 
>> a page from the IRequestCycle, I don't know how to traverse 
>> into the sub-package (or above the current package for that matter).
>> 
>> Thanks,
>> 
>> Matt
>> 
>> 
>> Martino Piccinato wrote:
>> > 
>> > I think you can use configuration parameter
>> > 
>> > org.apache.tapestry.component-class-packages
>> > 
>> > (from documentation) A comma-seperated list of package names, used 
>> > when  searching for the component class  . These must 
>> appear as   
>> > tags in the application or library specification containing the 
>> > component
>> > 
>> > 
>> > For other options you can see
>> > 
>> > http://tapestry.apache.org/tapestry4.1/usersguide/components.html
>> > 
>> > at the section "Referencing Library Components"
>> > 
>> > 
>> > On 8/28/07, mraible <[EMAIL PROTECTED]> wrote:
>> >>
>> >> I have a UserForm class in a "pages" package and a 
>> UserList class in 
>> >> an "admin" sub-package. In UserForm, how do I get UserList? The 
>> >> following doesn't seem to work:
>> >>
>> >> UserList nextPage = (UserList) cycle.getPage("UserList");
>> >>
>> >> Results in: java.lang.ClassCastException: $UserList_4
>> >>
>> >> If I change it to cycle.getPage("admin/UserList"), I get:
>> >>
>> >> java.lang.ClassCastException: $BasePage_4
>> >>
>> >> The last option (cycle.getPage("admin.UserList")) seems a 
>> bit closer, 
>> >> but still doesn't work:
>> >>
>> >> java.lang.NoClassDefFoundError: 
>> >> org/appfuse/webapp/pages/Admin/UserList
>> >> (wrong name: org/appfuse/webapp/pages/admin/UserList)
>> >>
>> >> Thanks,
>> >>
>> >> Matt
>> >>
>> >> --
>> >> View this message in context:
>> >> 
>> http://www.nabble.com/How-do-I-get-a-page-from-a-sub-package-tf433985
>> >> 7.html#a12362460 Sent from the Tapestry - User mailing 
>> list archive 
>> >> at Nabble.com.
>> >>
>> >>
>> >> 
>> -
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> > 
>> > 
>> -
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> > 
>> > 
>> > 
>> 
>> --
>> View this message in context: 
>> http://www.nabble.com/How-do-I-get-a-page-from-a-sub-package-t
>> f4339857.html#a12368479
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>> 
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-do-I-get-a-page-from-a-sub-package-tf4339857.html#a12372309
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T5 Tree Component javascript and DOM

2007-08-28 Thread Daniel Jue
It figures that I would run into this problem.  Placing the Tree Component's
java script block, as seen on the wiki, can cause Abort errors on IE (tested
ie6) because it's modifying the DOM before it is loaded all the way.  (I am
using a larger, complex page to experience these errors)  My page probably
has 30-40 components on it, and the Tree I have is right in the middle of
that stack.

To remedy the problem, I put the 7 lines of javascript code at the bottom of
my border component, to make sure it always goes last.


treeObj = new JSDragDropTree();
treeObj.setTreeId('reporttree');
treeObj.setImageFolder('/IEIS2/images/tree/');
treeObj.setRenameAllowed (false);
treeObj.setDeleteAllowed(false);
treeObj.initTree();
treeObj.expandAll();



But for pages that don't have a tree on them, I get a script error because
JSDragDropTree is undefined.

Does anyone have a better solution for this?  This must have been solved
elsewhere...
Is there a hook in prototype we can use for making things run after the DOM
is complete?  The problem doesn't happen with Firefox 2.


Re: T5:Tiles?

2007-08-28 Thread Josh Canfield
I think your problem is here:

> in my Somepage.html
> 
>

You want



Josh

On 8/28/07, Angelo Chen <[EMAIL PROTECTED]> wrote:
>
> Hi Josh,
>
> I tried to folow following method, but not working:
>
> my Layout.java like this:
>
> public class Layout {
>
>@Parameter
>private Block _sidebarContent;
>
>public Block getSidebarContent() {
>return _sidebarContent;
>}
>
>public void setSidebarContent(Block sidebarContent) {
>this._sidebarContent = sidebarContent;
>}
>
>@Parameter
>private String _title;
>public String getTitle() {
>return _title;
>}
>
>public void setTitle(String title) {
>this._title = title;
>}
>  
> }
>
> in my Somepage.html
> 
>
> i noticed the setter in Layout.java will not be called, why? thanks.
>
> A.C.
>
>
>
>
>
>
> or you can add the title parameter to Layout and pass it from Somepage
>
> Layout.java:
> @Parameter // if you want to require a title, add (required=true)
> private String title; // add getter/setter
>
> Somepage.html
> 
> ...
>
>
>
>
> Josh Canfield-2 wrote:
> >
> > On 8/24/07, Angelo Chen <[EMAIL PROTECTED]> wrote:
> >>
> >> Hi Josh,
> >>
> >> This works, now if I have this in the Layout.html:
> >>
> >> 
> >>${title}
> >> 
> >>
> >> Layout.java also has a getTtitle to return 'base page';
> >>
> >> now how to replace this title with 'somepage' in the somepage.html? I add
> >> a
> >> getTitle in the Somepage.java, but it still picks up 'base page', any
> >> solution to this?
> >>
> >
> > There is no inheritance relationship between Somepage and Layout.
> > Somepage contains a reference to the Layout object. You have options
> > with how you are going to update the layout.
> >
> > You can inject the Layout object into Somepage and manipulate it by:
> >
> > @Component
> > private Layout layout; // add getter/setter
> > protected void beforeRender() {
> >   layout.setTitle(title);
> > }
> >
> > or you can add the title parameter to Layout and pass it from Somepage
> >
> > Layout.java:
> > @Parameter // if you want to require a title, add (required=true)
> > private String title; // add getter/setter
> >
> > Somepage.html
> > 
> > ...
> > 
> >
> > Pick the one that makes the most sense for your application
> >
> >
> >
> >> A.C.
> >> Josh Canfield-2 wrote:
> >> >
> >> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd ">
> >> >
> >> > Could it be as silly as a space after the xsd?
> >> >
> >> > I have run the following successfully
> >> >
> >> > -
> >> >
> >> /src/main/resources/com/thedailytube/ui/tapestry/pages/SomePage.html
> >> > ---
> >> >
> >> >  >> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> >> > 
> >> > SomePage Added Sidebar
> >> > 
> >> > This is the body content
> >> > 
> >> >
> >> > -
> >> > /src/main/resources/com/thedailytube/ui/tapestry/components/Layout.html
> >> > ---
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/T5%3ATiles--tf4310807.html#a12309092
> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
> >
> > --
> > --
> > TheDailyTube.com. Sign up and get the best new videos on the internet
> > delivered fresh to your inbox.
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/T5%3ATiles--tf4310807.html#a12368634
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[T5] SelectObject component added to the Wiki

2007-08-28 Thread Marcelo lotif
http://wiki.apache.org/tapestry/Tapestry5SelectObject

-- 
Atenciosamente,
Marcelo Lotif


RE: How do I get a page from a sub-package

2007-08-28 Thread Marcus.Schulte
page-pathes are always relative to your pages-package, so
cycle.getPage("admin/UserList") should be fine.
Somehow, Tapestry seems to find your template in
/admin/UserList and associates it with BasePage.
Could it be, that you have a page class named UserList in both the pages
package and the admin sub-package? Maybe a dirty build after moving
thins around?

> -Original Message-
> From: mraible [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, August 28, 2007 3:59 PM
> To: users@tapestry.apache.org
> Subject: Re: How do I get a page from a sub-package
> 
> 
> I have the following configured:
> 
>  value="org.appfuse.webapp.pages"/>
> 
> Are you saying I should change it to:
> 
>  value="org.appfuse.webapp.pages,org.appfuse.webapp.pages.admin"/>
> 
> Are you sure it doesn't scan sub-packages by default? It 
> seems to - if I put a class in this package and move the page 
> into a matching sub-directory, it works. However, when I get 
> a page from the IRequestCycle, I don't know how to traverse 
> into the sub-package (or above the current package for that matter).
> 
> Thanks,
> 
> Matt
> 
> 
> Martino Piccinato wrote:
> > 
> > I think you can use configuration parameter
> > 
> > org.apache.tapestry.component-class-packages
> > 
> > (from documentation) A comma-seperated list of package names, used 
> > when  searching for the component class  . These must 
> appear as   
> > tags in the application or library specification containing the 
> > component
> > 
> > 
> > For other options you can see
> > 
> > http://tapestry.apache.org/tapestry4.1/usersguide/components.html
> > 
> > at the section "Referencing Library Components"
> > 
> > 
> > On 8/28/07, mraible <[EMAIL PROTECTED]> wrote:
> >>
> >> I have a UserForm class in a "pages" package and a 
> UserList class in 
> >> an "admin" sub-package. In UserForm, how do I get UserList? The 
> >> following doesn't seem to work:
> >>
> >> UserList nextPage = (UserList) cycle.getPage("UserList");
> >>
> >> Results in: java.lang.ClassCastException: $UserList_4
> >>
> >> If I change it to cycle.getPage("admin/UserList"), I get:
> >>
> >> java.lang.ClassCastException: $BasePage_4
> >>
> >> The last option (cycle.getPage("admin.UserList")) seems a 
> bit closer, 
> >> but still doesn't work:
> >>
> >> java.lang.NoClassDefFoundError: 
> >> org/appfuse/webapp/pages/Admin/UserList
> >> (wrong name: org/appfuse/webapp/pages/admin/UserList)
> >>
> >> Thanks,
> >>
> >> Matt
> >>
> >> --
> >> View this message in context:
> >> 
> http://www.nabble.com/How-do-I-get-a-page-from-a-sub-package-tf433985
> >> 7.html#a12362460 Sent from the Tapestry - User mailing 
> list archive 
> >> at Nabble.com.
> >>
> >>
> >> 
> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > 
> 
> --
> View this message in context: 
> http://www.nabble.com/How-do-I-get-a-page-from-a-sub-package-t
> f4339857.html#a12368479
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Memory consumption in T4.1.2 - Hard data

2007-08-28 Thread Marcus.Schulte
 
> my configuration is as follows:
> 
> JDK 6.01 32bit JVM (I have also tested on a 64 bit with no 
> luck) Tomcat 5.5.20 Debian Linux (2.6.15.28 kernel) Tapestry 
> 4.1.2-SNAPSHOT with ognl 2.7
> 

Hi Peter, 4.1.2-SNAPSHOT is a typo, I suppose?

> regards,
> Peter
> 
> Jesse Kuhnert wrote:
> > I'd downgrade then if I were you.   Extensive profiling with yourkit
> > hasn't shed any new light on whatever problems others are having.
> > The OGNL classes indeed aren't being kept in the javassist 
> pool from 
> > what I can tell.
> >
> > I have another yourkit snapshot binary to look at so we'll 
> see what that says.
> >
> > I don't remember - have you filed any bug reports or reported any 
> > problems?  Are you getting ognl exceptions during 
> development as well 
> > as production?  Do these errors sound like 
> umpotential errors 
> > that should be looked at further?
> >
> > On 8/28/07, Peter Stavrinides <[EMAIL PROTECTED]> wrote:
> >   
> >> Hi Jessie
> >>
> >> Any progress on this?  sorry to bug you, but I have to take a 
> >> decision soon, I have two production machines that will need to 
> >> upgrade or downgrade Tapestry.
> >>
> >> Best wishes,
> >> Peter
> >>
> >> Jon Oakes wrote:
> >> 
> >>> Hi Bryan,
> >>>
> >>> I am a relative newbie but I was wondering if  you are 
> running with 
> >>> caching enabled or disabled?  It might make sense to keep things 
> >>> around when caching is disabled whereas I think it would 
> clearly be 
> >>> a bug to keep things around with it disabled.
> >>>
> >>> Jon Oakes
> >>>
> >>>
> >>> Jesse Kuhnert wrote:
> >>>   
>  Hmmm...well,  I don't think I like the sound of any of 
> that.  I'm just
>  going to pretend this problem doesn't exist.   (just kidding)
> 
>  I had thought I was doing something special with the ognl 
>  compilations that would cause its generated classes to not hang 
>  around afterwards in any pools.
> 
>  I'll take a look at things this weekend and am sure a fix will 
>  appear in between now and Monday - if there is a 
> reasonable fix to be found.
>  (in 4.1.3 snapshot form)
> 
>  On 8/24/07, Bryan Dotzour <[EMAIL PROTECTED]> 
>  wrote:
> 
>  
> > I and another colleague of mine have been investigating 
> what seems 
> > to be a "memory leak" in our Tapestry application for about a 
> > month since we upgraded to T4.1.2.  I won't bore you 
> with the saga 
> > of the last month, but I would like to present the data I've 
> > gathered and look to the list for a proposed solution.  I was 
> > reading a recent thread in which Jesse said (08/09/2007):
> >
> >
> >
> > "There is a map that grows as large as the system using it 
> > internally to javassist of various cached reflection 
> info - but it 
> > doesn't leak in any way."
> >
> > This is precisely what I've found in profiling our 
> application and 
> > it
> > *appears* to be this map that is causing our applications to 
> > eventually run out of memory.
> >
> > The YourKit profiler shows me that, as time goes on, 
> there is an 
> > instance of HiveMindClassPool  that grows and grows as class 
> > instances are created.  This class extends from 
> > javassist.ClassPool and is the map that Jesse is 
> talking about in 
> > his quote above.  And he's right, I wouldn't say that the class 
> > pool "leaks" either because it looks like it's designed 
> to retain 
> > that memory until the class pool itself is no longer needed.
> >
> >
> >
> > Take this quote from the javassist.ClassPool javadocs:
> >
> > "Memory consumption memo:
> > ClassPool objects hold all the CtClasses that have been 
> created so 
> > that the consistency among modified classes can be guaranteed. 
> > Thus if a large number of CtClasses are processed, the 
> ClassPool 
> > will consume a huge amount of memory. To avoid this, a 
> ClassPool 
> > object should be recreated, for example, every hundred classes 
> > processed. Note that
> > getDefault() is a singleton factory. Otherwise, detach() in 
> > CtClass should be used to avoid huge memory consumption. "
> >
> > This huge memory consumption by the ClassPool is what I was 
> > seeing. In particular it is the ClassPool that is held 
> onto by OgnlRuntime.
> > Inspecting this object in the profiler showed that it has a map 
> > containing about 45,000 classes.  All of the keys into this map 
> > were things like:  "ASTTest_11494aca9af" and 
> "ASTAnd_11494ace4fb" 
> > and the values are instances of javassist.CtNewClass.  
> Each entry 
> > in this map looks like it retains about 1,900 bytes, 
> for a grand 
> > total of about 90 MB of memory used.
> >
> > These numbers came from my staging deployment where I had the 
> > profiler attached, using some refle

Re: How-to update a selection model based on a prior selection

2007-08-28 Thread Marcos Chicote
Worked great!

Thanks Thiago.

On 8/28/07, Thiago H de Paula Figueiredo <[EMAIL PROTECTED]> wrote:
>
> On Tue, 28 Aug 2007 11:24:03 -0300, Marcos Chicote
> <[EMAIL PROTECTED]> wrote:
>
> > @EventListener(targets = "A", events = "onchange")
> >public void onChange(IRequestCycle cycle, BrowserEvent event) {
>
> Even better: you need to submit the form when the user selects a different
> value of A, so you know what value was chosen.
> The submitForm property of @EventListener does the trick:
>
> @EventListener(targets = "A", events = "onchange", submitForm="form")
> public void onChange(IRequestCycle cycle, BrowserEvent event) {
>
> Looking at the Javadocs of the latest snapshot, it looks like you won't
> need to specify submitForm anymore.
>
> http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/annotations/EventListener.html
>
> --
> Thiago H. de Paula Figueiredo
> Desenvolvedor, Instrutor e Consultor de Tecnologia
> Eteg Tecnologia da Informação Ltda.
> http://www.eteg.com.br
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Memory consumption in T4.1.2 - Hard data

2007-08-28 Thread Jesse Kuhnert
Umm yeah.   I have looked in to it as I just said.

The only thing left is for me to look at this youkit snapshot profile
and play from there but I'm not capable of debugging issues that
aren't reported properly.

On 8/28/07, Peter Stavrinides <[EMAIL PROTECTED]> wrote:
> Hi Jessie
>
> I'm gonna try update my version of ognl, if that won't work I will
> downgrade. I have not filed any bugs yet, but I sent a couple of emails
> to the list.  I don't get any exceptions during development, but that is
> because its not running for 3 or 4 days. I strongly suggest you consider
> looking into it, because I use the standard libraries provided by
> Tapestry through Maven.
>
> my configuration is as follows:
>
> JDK 6.01 32bit JVM (I have also tested on a 64 bit with no luck)
> Tomcat 5.5.20
> Debian Linux (2.6.15.28 kernel)
> Tapestry 4.1.2-SNAPSHOT with ognl 2.7
>
> regards,
> Peter
>
> Jesse Kuhnert wrote:
> > I'd downgrade then if I were you.   Extensive profiling with yourkit
> > hasn't shed any new light on whatever problems others are having.
> > The OGNL classes indeed aren't being kept in the javassist pool from
> > what I can tell.
> >
> > I have another yourkit snapshot binary to look at so we'll see what that 
> > says.
> >
> > I don't remember - have you filed any bug reports or reported any
> > problems?  Are you getting ognl exceptions during development as well
> > as production?  Do these errors sound like umpotential errors
> > that should be looked at further?
> >
> > On 8/28/07, Peter Stavrinides <[EMAIL PROTECTED]> wrote:
> >
> >> Hi Jessie
> >>
> >> Any progress on this?  sorry to bug you, but I have to take a
> >> decision soon, I have two production machines that will need to upgrade
> >> or downgrade Tapestry.
> >>
> >> Best wishes,
> >> Peter
> >>
> >> Jon Oakes wrote:
> >>
> >>> Hi Bryan,
> >>>
> >>> I am a relative newbie but I was wondering if  you are running with
> >>> caching enabled or disabled?  It might make sense to keep things
> >>> around when caching is disabled whereas I think it would clearly be a
> >>> bug to keep things around with it disabled.
> >>>
> >>> Jon Oakes
> >>>
> >>>
> >>> Jesse Kuhnert wrote:
> >>>
>  Hmmm...well,  I don't think I like the sound of any of that.  I'm just
>  going to pretend this problem doesn't exist.   (just kidding)
> 
>  I had thought I was doing something special with the ognl compilations
>  that would cause its generated classes to not hang around afterwards
>  in any pools.
> 
>  I'll take a look at things this weekend and am sure a fix will appear
>  in between now and Monday - if there is a reasonable fix to be found.
>  (in 4.1.3 snapshot form)
> 
>  On 8/24/07, Bryan Dotzour <[EMAIL PROTECTED]>  
>  wrote:
> 
> 
> > I and another colleague of mine have been investigating what seems to be
> > a "memory leak" in our Tapestry application for about a month since we
> > upgraded to T4.1.2.  I won't bore you with the saga of the last month,
> > but I would like to present the data I've gathered and look to the list
> > for a proposed solution.  I was reading a recent thread in which Jesse
> > said (08/09/2007):
> >
> >
> >
> > "There is a map that grows as large as the system using it internally to
> > javassist of various cached reflection info - but it doesn't leak in any
> > way."
> >
> > This is precisely what I've found in profiling our application and it
> > *appears* to be this map that is causing our applications to eventually
> > run out of memory.
> >
> > The YourKit profiler shows me that, as time goes on, there is an
> > instance of HiveMindClassPool  that grows and grows as class instances
> > are created.  This class extends from javassist.ClassPool and is the map
> > that Jesse is talking about in his quote above.  And he's right, I
> > wouldn't say that the class pool "leaks" either because it looks like
> > it's designed to retain that memory until the class pool itself is no
> > longer needed.
> >
> >
> >
> > Take this quote from the javassist.ClassPool javadocs:
> >
> > "Memory consumption memo:
> > ClassPool objects hold all the CtClasses that have been created so that
> > the consistency among modified classes can be guaranteed. Thus if a
> > large number of CtClasses are processed, the ClassPool will consume a
> > huge amount of memory. To avoid this, a ClassPool object should be
> > recreated, for example, every hundred classes processed. Note that
> > getDefault() is a singleton factory. Otherwise, detach() in CtClass
> > should be used to avoid huge memory consumption. "
> >
> > This huge memory consumption by the ClassPool is what I was seeing. In
> > particular it is the ClassPool that is held onto by OgnlRuntime.
> > Inspecting this object in the profiler 

Re: Memory consumption in T4.1.2 - Hard data

2007-08-28 Thread Peter Stavrinides

Hi Jessie

I'm gonna try update my version of ognl, if that won't work I will 
downgrade. I have not filed any bugs yet, but I sent a couple of emails 
to the list.  I don't get any exceptions during development, but that is 
because its not running for 3 or 4 days. I strongly suggest you consider 
looking into it, because I use the standard libraries provided by 
Tapestry through Maven.


my configuration is as follows:

JDK 6.01 32bit JVM (I have also tested on a 64 bit with no luck)
Tomcat 5.5.20
Debian Linux (2.6.15.28 kernel)
Tapestry 4.1.2-SNAPSHOT with ognl 2.7

regards,
Peter

Jesse Kuhnert wrote:

I'd downgrade then if I were you.   Extensive profiling with yourkit
hasn't shed any new light on whatever problems others are having.
The OGNL classes indeed aren't being kept in the javassist pool from
what I can tell.

I have another yourkit snapshot binary to look at so we'll see what that says.

I don't remember - have you filed any bug reports or reported any
problems?  Are you getting ognl exceptions during development as well
as production?  Do these errors sound like umpotential errors
that should be looked at further?

On 8/28/07, Peter Stavrinides <[EMAIL PROTECTED]> wrote:
  

Hi Jessie

Any progress on this?  sorry to bug you, but I have to take a
decision soon, I have two production machines that will need to upgrade
or downgrade Tapestry.

Best wishes,
Peter

Jon Oakes wrote:


Hi Bryan,

I am a relative newbie but I was wondering if  you are running with
caching enabled or disabled?  It might make sense to keep things
around when caching is disabled whereas I think it would clearly be a
bug to keep things around with it disabled.

Jon Oakes


Jesse Kuhnert wrote:
  

Hmmm...well,  I don't think I like the sound of any of that.  I'm just
going to pretend this problem doesn't exist.   (just kidding)

I had thought I was doing something special with the ognl compilations
that would cause its generated classes to not hang around afterwards
in any pools.

I'll take a look at things this weekend and am sure a fix will appear
in between now and Monday - if there is a reasonable fix to be found.
(in 4.1.3 snapshot form)

On 8/24/07, Bryan Dotzour <[EMAIL PROTECTED]>  wrote:



I and another colleague of mine have been investigating what seems to be
a "memory leak" in our Tapestry application for about a month since we
upgraded to T4.1.2.  I won't bore you with the saga of the last month,
but I would like to present the data I've gathered and look to the list
for a proposed solution.  I was reading a recent thread in which Jesse
said (08/09/2007):



"There is a map that grows as large as the system using it internally to
javassist of various cached reflection info - but it doesn't leak in any
way."

This is precisely what I've found in profiling our application and it
*appears* to be this map that is causing our applications to eventually
run out of memory.

The YourKit profiler shows me that, as time goes on, there is an
instance of HiveMindClassPool  that grows and grows as class instances
are created.  This class extends from javassist.ClassPool and is the map
that Jesse is talking about in his quote above.  And he's right, I
wouldn't say that the class pool "leaks" either because it looks like
it's designed to retain that memory until the class pool itself is no
longer needed.



Take this quote from the javassist.ClassPool javadocs:

"Memory consumption memo:
ClassPool objects hold all the CtClasses that have been created so that
the consistency among modified classes can be guaranteed. Thus if a
large number of CtClasses are processed, the ClassPool will consume a
huge amount of memory. To avoid this, a ClassPool object should be
recreated, for example, every hundred classes processed. Note that
getDefault() is a singleton factory. Otherwise, detach() in CtClass
should be used to avoid huge memory consumption. "

This huge memory consumption by the ClassPool is what I was seeing. In
particular it is the ClassPool that is held onto by OgnlRuntime.
Inspecting this object in the profiler showed that it has a map
containing about 45,000 classes.  All of the keys into this map were
things like:  "ASTTest_11494aca9af" and "ASTAnd_11494ace4fb" and the
values are instances of javassist.CtNewClass.  Each entry in this map
looks like it retains about 1,900 bytes, for a grand total of about 90
MB of memory used.

These numbers came from my staging deployment where I had the profiler
attached, using some reflection tricks I was able to look at a
production site and found that it had about 240,000 items in that class
pool.. approximately 450 MB of memory.

So I guess the questions in my mind are:  Why are there so many classes
in the pool?  Why does the number only ever go up?  Do those classes
really need to stay in the pool forever?







  

-
To unsubscribe, e-mail: [EM

Re: How-to update a selection model based on a prior selection

2007-08-28 Thread Thiago H de Paula Figueiredo
On Tue, 28 Aug 2007 11:24:03 -0300, Marcos Chicote  
<[EMAIL PROTECTED]> wrote:



@EventListener(targets = "A", events = "onchange")
   public void onChange(IRequestCycle cycle, BrowserEvent event) {


Even better: you need to submit the form when the user selects a different  
value of A, so you know what value was chosen.

The submitForm property of @EventListener does the trick:

@EventListener(targets = "A", events = "onchange", submitForm="form")
public void onChange(IRequestCycle cycle, BrowserEvent event) {

Looking at the Javadocs of the latest snapshot, it looks like you won't  
need to specify submitForm anymore.

http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/annotations/EventListener.html

--
Thiago H. de Paula Figueiredo
Desenvolvedor, Instrutor e Consultor de Tecnologia
Eteg Tecnologia da Informação Ltda.
http://www.eteg.com.br

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How-to update a selection model based on a prior selection

2007-08-28 Thread Thiago H de Paula Figueiredo
On Tue, 28 Aug 2007 11:24:03 -0300, Marcos Chicote  
<[EMAIL PROTECTED]> wrote:



In the test, the EventListener is properly called (when the value of the
PropertySelection is changed), but the selections are not updated. When
called from Test.onChange(), Test.getA() returns 'null' instead of the  
selected

value.


Try to make A persistent:

@Persist
public abstract String  getA();

Your getA() returns null because the request that renders the form is one  
and the EventListener call is another. ;)
Any value stored in Tapestry class properties, unless explicitly made  
persistent, is lost when the request finishes.


--
Thiago H. de Paula Figueiredo
Desenvolvedor, Instrutor e Consultor de Tecnologia
Eteg Tecnologia da Informação Ltda.
http://www.eteg.com.br

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How-to update a selection model based on a prior selection

2007-08-28 Thread Marcos Chicote
Hello,

I'm trying to update a selection model based on a prior selection, using
AJAX
and Tapestry 4.1.1.

I've built a small test case, connecting an EventListener to the onchange
event
of a PropertySelection. You can find it at the end of this mail.

In the test, the EventListener is properly called (when the value of the
PropertySelection is changed), but the selections are not updated. When
called
from Test.onChange(), Test.getA() returns 'null' instead of the selected
value.

Somebody knows what should I write in the EventListener to get the
selected value?.

Thank you very much, best regards.



Test.page:
--

http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";>





Test.html:
--




   
   
   
   




Test.java:
--

package net.nt.web.pages;

import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.annotations.EventListener;
import org.apache.tapestry.event.BrowserEvent;
import org.apache.tapestry.event.PageBeginRenderListener;
import org.apache.tapestry.event.PageEvent;
import org.apache.tapestry.form.IPropertySelectionModel;
import org.apache.tapestry.form.StringPropertySelectionModel;
import org.apache.tapestry.html.BasePage;


public abstract class Prueba extends BasePage
   implements
 PageBeginRenderListener {
   public abstract String  getA();
   public abstract voidsetA(String selected);

   public abstract String  getB();
   public abstract voidsetB(String selected);

   public abstract void setModelB(IPropertySelectionModel modelB);
   public abstract IPropertySelectionModel getModelB();

   public IPropertySelectionModel getModelA() {
   return new StringPropertySelectionModel(new String[] {
"Letters",
   "Numbers", "Colors" });
   }

   @SuppressWarnings("unchecked")
   public void pageBeginRender(PageEvent event) {
   if (getA() == null) {
   //set it's inital value to the first value available
in the drop down.
   System.out.println("Setting A to a default
value...");
   setA("Letters");
   setModelB(new StringPropertySelectionModel(new
String[] { "A", "B",
   "C", "D", "E" }));
   }
   }

   @EventListener(targets = "A", events = "onchange")
   public void onChange(IRequestCycle cycle, BrowserEvent event) {
   System.out.println("changeA()");

   String selectionA = getA();

   if (selectionA.equals("Letters")) {
   setModelB(new StringPropertySelectionModel(new
String[] { "A", "B",
   "C", "D", "E" }));
   } else if (selectionA.equals("Numbers")) {
   setModelB(new StringPropertySelectionModel(new
String[] { "1", "2",
   "3", "4", "5", "6" }));
   } else {
   setModelB(new StringPropertySelectionModel(new
String[] { "Red",
   "Blue", "Green", "Cyan", "Magenta",
"Yellow" }));
   }

   cycle.getResponseBuilder().updateComponent("B");
   }

}


Re: T5: FCKEditor Component

2007-08-28 Thread sun58224

no work when upload image.

Ted Steen wrote:
> 
> only java.
> 
> 2007/8/28, sun58224 <[EMAIL PROTECTED]>:
>> Ted Steen  gmail.com> writes:
>>
>>
>>
>> asp, no java?
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> /ted
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-FCKEditor-Component-tf3489736.html#a12368831
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How do I get a page from a sub-package

2007-08-28 Thread Martino Piccinato
sorry Matt I've missed that "subpackage", yes it should include
subpackage by default. Actually I've never had such a problem
specifying pages by simple class name has always been enough for me.

On 8/28/07, mraible <[EMAIL PROTECTED]> wrote:
>
> I have the following configured:
>
>  value="org.appfuse.webapp.pages"/>
>
> Are you saying I should change it to:
>
>  value="org.appfuse.webapp.pages,org.appfuse.webapp.pages.admin"/>
>
> Are you sure it doesn't scan sub-packages by default? It seems to - if I put
> a class in this package and move the page into a matching sub-directory, it
> works. However, when I get a page from the IRequestCycle, I don't know how
> to traverse into the sub-package (or above the current package for that
> matter).
>
> Thanks,
>
> Matt
>
>
> Martino Piccinato wrote:
> >
> > I think you can use configuration parameter
> >
> > org.apache.tapestry.component-class-packages
> >
> > (from documentation) A comma-seperated list of package names, used
> > when  searching for the component class  . These must appear as 
> >  tags in the application or library specification containing the
> > component
> >
> >
> > For other options you can see
> >
> > http://tapestry.apache.org/tapestry4.1/usersguide/components.html
> >
> > at the section "Referencing Library Components"
> >
> >
> > On 8/28/07, mraible <[EMAIL PROTECTED]> wrote:
> >>
> >> I have a UserForm class in a "pages" package and a UserList class in an
> >> "admin" sub-package. In UserForm, how do I get UserList? The following
> >> doesn't seem to work:
> >>
> >> UserList nextPage = (UserList) cycle.getPage("UserList");
> >>
> >> Results in: java.lang.ClassCastException: $UserList_4
> >>
> >> If I change it to cycle.getPage("admin/UserList"), I get:
> >>
> >> java.lang.ClassCastException: $BasePage_4
> >>
> >> The last option (cycle.getPage("admin.UserList")) seems a bit closer, but
> >> still doesn't work:
> >>
> >> java.lang.NoClassDefFoundError: org/appfuse/webapp/pages/Admin/UserList
> >> (wrong name: org/appfuse/webapp/pages/admin/UserList)
> >>
> >> Thanks,
> >>
> >> Matt
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/How-do-I-get-a-page-from-a-sub-package-tf4339857.html#a12362460
> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/How-do-I-get-a-page-from-a-sub-package-tf4339857.html#a12368479
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5:Tiles?

2007-08-28 Thread Angelo Chen

Hi Josh,

I tried to folow following method, but not working:

my Layout.java like this:

public class Layout {

@Parameter
private Block _sidebarContent;

public Block getSidebarContent() {
return _sidebarContent;
}

public void setSidebarContent(Block sidebarContent) {
this._sidebarContent = sidebarContent;
}

@Parameter
private String _title;
public String getTitle() {
return _title;
}

public void setTitle(String title) {
this._title = title;
}
  
}

in my Somepage.html


i noticed the setter in Layout.java will not be called, why? thanks.

A.C.






or you can add the title parameter to Layout and pass it from Somepage

Layout.java:
@Parameter // if you want to require a title, add (required=true)
private String title; // add getter/setter

Somepage.html

...




Josh Canfield-2 wrote:
> 
> On 8/24/07, Angelo Chen <[EMAIL PROTECTED]> wrote:
>>
>> Hi Josh,
>>
>> This works, now if I have this in the Layout.html:
>>
>> 
>>${title}
>> 
>>
>> Layout.java also has a getTtitle to return 'base page';
>>
>> now how to replace this title with 'somepage' in the somepage.html? I add
>> a
>> getTitle in the Somepage.java, but it still picks up 'base page', any
>> solution to this?
>>
> 
> There is no inheritance relationship between Somepage and Layout.
> Somepage contains a reference to the Layout object. You have options
> with how you are going to update the layout.
> 
> You can inject the Layout object into Somepage and manipulate it by:
> 
> @Component
> private Layout layout; // add getter/setter
> protected void beforeRender() {
>   layout.setTitle(title);
> }
> 
> or you can add the title parameter to Layout and pass it from Somepage
> 
> Layout.java:
> @Parameter // if you want to require a title, add (required=true)
> private String title; // add getter/setter
> 
> Somepage.html
> 
> ...
> 
> 
> Pick the one that makes the most sense for your application
> 
> 
> 
>> A.C.
>> Josh Canfield-2 wrote:
>> >
>> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd ">
>> >
>> > Could it be as silly as a space after the xsd?
>> >
>> > I have run the following successfully
>> >
>> > -
>> >
>> /src/main/resources/com/thedailytube/ui/tapestry/pages/SomePage.html
>> > ---
>> >
>> > > xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>> > 
>> > SomePage Added Sidebar
>> > 
>> > This is the body content
>> > 
>> >
>> > -
>> > /src/main/resources/com/thedailytube/ui/tapestry/components/Layout.html
>> > ---
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/T5%3ATiles--tf4310807.html#a12309092
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> 
> -- 
> --
> TheDailyTube.com. Sign up and get the best new videos on the internet
> delivered fresh to your inbox.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3ATiles--tf4310807.html#a12368634
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How do I get a page from a sub-package

2007-08-28 Thread mraible

I have the following configured:



Are you saying I should change it to:



Are you sure it doesn't scan sub-packages by default? It seems to - if I put
a class in this package and move the page into a matching sub-directory, it
works. However, when I get a page from the IRequestCycle, I don't know how
to traverse into the sub-package (or above the current package for that
matter).

Thanks,

Matt


Martino Piccinato wrote:
> 
> I think you can use configuration parameter
> 
> org.apache.tapestry.component-class-packages
> 
> (from documentation) A comma-seperated list of package names, used
> when  searching for the component class  . These must appear as 
>  tags in the application or library specification containing the
> component
> 
> 
> For other options you can see
> 
> http://tapestry.apache.org/tapestry4.1/usersguide/components.html
> 
> at the section "Referencing Library Components"
> 
> 
> On 8/28/07, mraible <[EMAIL PROTECTED]> wrote:
>>
>> I have a UserForm class in a "pages" package and a UserList class in an
>> "admin" sub-package. In UserForm, how do I get UserList? The following
>> doesn't seem to work:
>>
>> UserList nextPage = (UserList) cycle.getPage("UserList");
>>
>> Results in: java.lang.ClassCastException: $UserList_4
>>
>> If I change it to cycle.getPage("admin/UserList"), I get:
>>
>> java.lang.ClassCastException: $BasePage_4
>>
>> The last option (cycle.getPage("admin.UserList")) seems a bit closer, but
>> still doesn't work:
>>
>> java.lang.NoClassDefFoundError: org/appfuse/webapp/pages/Admin/UserList
>> (wrong name: org/appfuse/webapp/pages/admin/UserList)
>>
>> Thanks,
>>
>> Matt
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-do-I-get-a-page-from-a-sub-package-tf4339857.html#a12362460
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-do-I-get-a-page-from-a-sub-package-tf4339857.html#a12368479
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Memory consumption in T4.1.2 - Hard data

2007-08-28 Thread Jesse Kuhnert
I'd downgrade then if I were you.   Extensive profiling with yourkit
hasn't shed any new light on whatever problems others are having.
The OGNL classes indeed aren't being kept in the javassist pool from
what I can tell.

I have another yourkit snapshot binary to look at so we'll see what that says.

I don't remember - have you filed any bug reports or reported any
problems?  Are you getting ognl exceptions during development as well
as production?  Do these errors sound like umpotential errors
that should be looked at further?

On 8/28/07, Peter Stavrinides <[EMAIL PROTECTED]> wrote:
> Hi Jessie
>
> Any progress on this?  sorry to bug you, but I have to take a
> decision soon, I have two production machines that will need to upgrade
> or downgrade Tapestry.
>
> Best wishes,
> Peter
>
> Jon Oakes wrote:
> > Hi Bryan,
> >
> > I am a relative newbie but I was wondering if  you are running with
> > caching enabled or disabled?  It might make sense to keep things
> > around when caching is disabled whereas I think it would clearly be a
> > bug to keep things around with it disabled.
> >
> > Jon Oakes
> >
> >
> > Jesse Kuhnert wrote:
> >> Hmmm...well,  I don't think I like the sound of any of that.  I'm just
> >> going to pretend this problem doesn't exist.   (just kidding)
> >>
> >> I had thought I was doing something special with the ognl compilations
> >> that would cause its generated classes to not hang around afterwards
> >> in any pools.
> >>
> >> I'll take a look at things this weekend and am sure a fix will appear
> >> in between now and Monday - if there is a reasonable fix to be found.
> >> (in 4.1.3 snapshot form)
> >>
> >> On 8/24/07, Bryan Dotzour <[EMAIL PROTECTED]>  
> >> wrote:
> >>
> >>> I and another colleague of mine have been investigating what seems to be
> >>> a "memory leak" in our Tapestry application for about a month since we
> >>> upgraded to T4.1.2.  I won't bore you with the saga of the last month,
> >>> but I would like to present the data I've gathered and look to the list
> >>> for a proposed solution.  I was reading a recent thread in which Jesse
> >>> said (08/09/2007):
> >>>
> >>>
> >>>
> >>> "There is a map that grows as large as the system using it internally to
> >>> javassist of various cached reflection info - but it doesn't leak in any
> >>> way."
> >>>
> >>> This is precisely what I've found in profiling our application and it
> >>> *appears* to be this map that is causing our applications to eventually
> >>> run out of memory.
> >>>
> >>> The YourKit profiler shows me that, as time goes on, there is an
> >>> instance of HiveMindClassPool  that grows and grows as class instances
> >>> are created.  This class extends from javassist.ClassPool and is the map
> >>> that Jesse is talking about in his quote above.  And he's right, I
> >>> wouldn't say that the class pool "leaks" either because it looks like
> >>> it's designed to retain that memory until the class pool itself is no
> >>> longer needed.
> >>>
> >>>
> >>>
> >>> Take this quote from the javassist.ClassPool javadocs:
> >>>
> >>> "Memory consumption memo:
> >>> ClassPool objects hold all the CtClasses that have been created so that
> >>> the consistency among modified classes can be guaranteed. Thus if a
> >>> large number of CtClasses are processed, the ClassPool will consume a
> >>> huge amount of memory. To avoid this, a ClassPool object should be
> >>> recreated, for example, every hundred classes processed. Note that
> >>> getDefault() is a singleton factory. Otherwise, detach() in CtClass
> >>> should be used to avoid huge memory consumption. "
> >>>
> >>> This huge memory consumption by the ClassPool is what I was seeing. In
> >>> particular it is the ClassPool that is held onto by OgnlRuntime.
> >>> Inspecting this object in the profiler showed that it has a map
> >>> containing about 45,000 classes.  All of the keys into this map were
> >>> things like:  "ASTTest_11494aca9af" and "ASTAnd_11494ace4fb" and the
> >>> values are instances of javassist.CtNewClass.  Each entry in this map
> >>> looks like it retains about 1,900 bytes, for a grand total of about 90
> >>> MB of memory used.
> >>>
> >>> These numbers came from my staging deployment where I had the profiler
> >>> attached, using some reflection tricks I was able to look at a
> >>> production site and found that it had about 240,000 items in that class
> >>> pool.. approximately 450 MB of memory.
> >>>
> >>> So I guess the questions in my mind are:  Why are there so many classes
> >>> in the pool?  Why does the number only ever go up?  Do those classes
> >>> really need to stay in the pool forever?
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED] For
> > additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscrib

Re: [T5]Encoding Problem while submiting form with a Upload component.

2007-08-28 Thread Martin Grotzke
On Tue, 2007-08-28 at 12:22 +0200, Christian Koeberl wrote:
> > I have a form with a 'textfield' and a 'upload' field .
> > The Chinese words I input in textfield will be irrecognizable  when I 
> > submit the form .
> 
> I wondered, why nobody found this bug before. Anyway, I filed the
> bug yesterday and provided a fix.
> 
> https://issues.apache.org/jira/browse/TAPESTRY-1723
> 
> You can easyily apply the fix and generate your own tapestry-upload jar
> or wait until one of the committers applies the patch.
Thanx a lot, we also ran into this issue!

Cheers,
Martin




signature.asc
Description: This is a digitally signed message part


Re: T5:If component

2007-08-28 Thread Nick Westgate

Or, since that's not always convenient for your html:


...

...

...


Cheers,
Nick.


Robin Helgelin wrote:

On 8/28/07, Angelo Chen <[EMAIL PROTECTED]> wrote:

Thanks, this works! i check the doc, seems there is no 'else' in this
component like T4, right?


It works like this:



Not logged in!





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5:If component

2007-08-28 Thread Robin Helgelin
On 8/28/07, Angelo Chen <[EMAIL PROTECTED]> wrote:
>
> Thanks, this works! i check the doc, seems there is no 'else' in this
> component like T4, right?

It works like this:



Not logged in!



-- 
regards,
Robin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5:If component

2007-08-28 Thread Angelo Chen

Thanks, this works! i check the doc, seems there is no 'else' in this
component like T4, right?


Nick Westgate wrote:
> 
> The If component's test parameter is a boolean:
> http://tapestry.apache.org/tapestry5/tapestry-core/component-parameters.html
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3AIf-component-tf4341030.html#a12366131
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5:If component

2007-08-28 Thread Nick Westgate

The If component's test parameter is a boolean:
http://tapestry.apache.org/tapestry5/tapestry-core/component-parameters.html

You need to make your accessor non-private:
public boolean getLoginned() {
 return true;
 }

And the default binding is prop, so no funky OGNL-like stuff:
  
   

Cheers,
Nick.


Angelo Chen wrote:

Hi,
how to use the component IF? I have this in the page class:
   private String getLoginned() {
return "true";
}

then I want to refer to it from the html:
   
  


this will always cause an error that: does not contain a property named
'loginned' 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T5:If component

2007-08-28 Thread Angelo Chen

Hi,
how to use the component IF? I have this in the page class:
   private String getLoginned() {
return "true";
}

then I want to refer to it from the html:
   
  

this will always cause an error that: does not contain a property named
'loginned' 
-- 
View this message in context: 
http://www.nabble.com/T5%3AIf-component-tf4341030.html#a12365775
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re: [T5]Encoding Problem while submiting form with a Upload component.

2007-08-28 Thread Christian Koeberl
> Not everyone is using tapestry-upload and not everyone is using fancy
> file names and tapestry-upload module is the younger in T5 space so...
> anyway you´re is indeed a good catch so propably will be evaluated.

It's not the file name. The problem is: as soon as you add a upload 
component to a form all other text fields (in the same form) are not 
decoded with the request encoding. 
So, you cannot have text fields and an upload in one form (with UTF-8
encoding).

Cheers,
Chris

Re: [T5]Encoding Problem while submiting form with a Upload component.

2007-08-28 Thread Massimo Lusetti
On 8/28/07, Christian Koeberl <[EMAIL PROTECTED]> wrote:

> I wondered, why nobody found this bug before. Anyway, I filed the
> bug yesterday and provided a fix.

Not everyone is using tapestry-upload and not everyone is using fancy
file names and tapestry-upload module is the younger in T5 space so...
anyway you´re is indeed a good catch so propably will be evaluated.

-- 
Massimo
http://meridio.blogspot.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T5]Encoding Problem while submiting form with a Upload component.

2007-08-28 Thread Christian Koeberl
> I have a form with a 'textfield' and a 'upload' field .
> The Chinese words I input in textfield will be irrecognizable  when I 
> submit the form .

I wondered, why nobody found this bug before. Anyway, I filed the
bug yesterday and provided a fix.

https://issues.apache.org/jira/browse/TAPESTRY-1723

You can easyily apply the fix and generate your own tapestry-upload jar
or wait until one of the committers applies the patch.

-- 
Chris

Re: Memory consumption in T4.1.2 - Hard data

2007-08-28 Thread Peter Stavrinides

No Marcus

[EMAIL PROTECTED] wrote:
So changing the page pool parameters didn't help then? 

  

-Original Message-
From: Peter Stavrinides [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 28, 2007 10:34 AM

To: Tapestry users
Subject: Re: Memory consumption in T4.1.2 - Hard data


Andreas, give me a break! I am not trying to trash Tapestry 
if that's what you are thinking. I am not the only one 
experiencing these problems.
Have a look at some of my postings (and others posts) and you 
will see what I am talking about. I have been having these 
problems since upgrading from 4.1.1 I never experienced these 
problems before with uptime of months at a time.


Look at this log, id is an integer with the value 728:

21 Aug 2007 13:01:49,353 - INFO $Portfolio_89 - Setting the 
portfolio with the id: 728
21 Aug 2007 13:01:50,479 - ERROR $Error_118 - Unable to parse 
OGNL expression 'id': Unable to parse OGNL expression 'id': 
Unable to parse OGNL expression 'id': 
Exception [classpath:/org/apache/tapestry/form/TextArea.jwc, 
line 49, column 67]
	at 
org.apache.tapestry.binding.ExpressionBinding.resolveExpressio

n(ExpressionBinding.java:145)
	at 
org.apache.tapestry.binding.ExpressionBinding.getObject(Expres

sionBinding.java:125)

And then take a look at this:

21 Aug 2007 07:56:50,613 - ERROR 
org.apache.tapestry.services.impl.HiveMindExpressionCompiler 
- Error generating OGNL getter for expression exceptions with 
root [EMAIL PROTECTED]:Exception] and body:

{ return (($Exception_119)$2).getExceptions();}
org.apache.hivemind.ApplicationRuntimeException: Unable to 
add method java.lang.Object get(ognl.OgnlContext, 
java.lang.Object) to class $ASTProperty_1146a471a52: [source 
error] no such class: $Exception_119


This happening after 3-4 days of normal operation? Suddenly 
exceptions occur on random objects because OGNL can no longer 
compile them and this is because Tapestry can no longer find 
instances of these classes, it relates to JavaAssist dynamic 
class loading. Also, currently  the server is idle with no 
connections and JConsole shows 18000 classes loaded, 
yesterday there were 7000 classes, this number never goes 
down only up, so you tell me what's going on?


If Jessie can't explain it, then I have to go back a version 
we cant afford for clients to see broken pages, my boss 
doesn't care about the problem, he just wants a solution and 
its my job and reputation is at stake.



Andreas Andreou wrote:


Peter,
though not officially final (I believe), http://news247.gr 
  
(tap-4.1.2) 

has been getting 40 req/day for an uptime of 26 days 
  
with memory 


set to no more than 128MB.


On 8/28/07, Peter Stavrinides <[EMAIL PROTECTED]> wrote:
  
  

Hi Jessie

Any progress on this?  sorry to bug you, but I have to take a 
decision soon, I have two production machines that will need to 
upgrade or downgrade Tapestry.


Best wishes,
Peter

Jon Oakes wrote:



Hi Bryan,

I am a relative newbie but I was wondering if  you are 
  
running with 

caching enabled or disabled?  It might make sense to keep things 
around when caching is disabled whereas I think it would 
  
clearly be 


a bug to keep things around with it disabled.

Jon Oakes


Jesse Kuhnert wrote:
  
  
Hmmm...well,  I don't think I like the sound of any of 


that.  I'm just


going to pretend this problem doesn't exist.   (just kidding)

I had thought I was doing something special with the ognl 
compilations that would cause its generated classes to not hang 
around afterwards in any pools.


I'll take a look at things this weekend and am sure a fix will 
appear in between now and Monday - if there is a 


reasonable fix to be found.


(in 4.1.3 snapshot form)

On 8/24/07, Bryan Dotzour <[EMAIL PROTECTED]> 


[EMAIL PROTECTED]> wrote:


I and another colleague of mine have been investigating 
  
what seems 


to
  
  

be


a "memory leak" in our Tapestry application for about a month 
since we upgraded to T4.1.2.  I won't bore you with the saga of 
the last month, but I would like to present the data 
  
I've gathered 


and look to the
  
  

list


for a proposed solution.  I was reading a recent thread 
  
in which 


Jesse said (08/09/2007):



"There is a map that grows as large as the system using it 
internally
  
  

to


javassist of various cached reflection info - but it 
  
doesn't leak 


in
  
  

any



way."

This is precisely what I've found in profiling our 
  
application and 


it
*appears* to be this map that is causing our applications to
  
  

eventually



run out of memory.

The YourKit profiler shows me that, a

Re: T5: FCKEditor Component

2007-08-28 Thread Ted Steen
only java.

2007/8/28, sun58224 <[EMAIL PROTECTED]>:
> Ted Steen  gmail.com> writes:
>
>
>
> asp, no java?
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
/ted

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Memory consumption in T4.1.2 - Hard data

2007-08-28 Thread Andreas Andreou
On 8/28/07, Peter Stavrinides <[EMAIL PROTECTED]> wrote:
>
>
> Andreas, give me a break! I am not trying to trash Tapestry if that's
> what you are thinking. I am not the only one experiencing these problems.


Hey - i never meant that!

It's obvious from the reports that something's going on + Jesse was on to
it..
I just thought i'd offer a counter-example + throw in an example
of a T4.1.2 public site ( i'm not aware of a lot)


Have a look at some of my postings (and others posts) and you will see
> what I am talking about. I have been having these problems since
> upgrading from 4.1.1 I never experienced these problems before with
> uptime of months at a time.
>
> Look at this log, id is an integer with the value 728:
>
> 21 Aug 2007 13:01:49,353 - INFO $Portfolio_89 - Setting the portfolio with
> the id: 728
> 21 Aug 2007 13:01:50,479 - ERROR $Error_118 - Unable to parse OGNL
> expression 'id': Unable to parse OGNL expression 'id': Unable to parse OGNL
> expression 'id': 
> Exception [classpath:/org/apache/tapestry/form/TextArea.jwc, line 49,
> column 67]
> at org.apache.tapestry.binding.ExpressionBinding.resolveExpression
> (ExpressionBinding.java:145)
> at org.apache.tapestry.binding.ExpressionBinding.getObject(
> ExpressionBinding.java:125)
>
> And then take a look at this:
>
> 21 Aug 2007 07:56:50,613 - ERROR
> org.apache.tapestry.services.impl.HiveMindExpressionCompiler - Error
> generating OGNL getter for expression exceptions with root
> [EMAIL PROTECTED]:Exception] and body:
> { return (($Exception_119)$2).getExceptions();}
> org.apache.hivemind.ApplicationRuntimeException: Unable to add method
> java.lang.Object get(ognl.OgnlContext, java.lang.Object) to class
> $ASTProperty_1146a471a52: [source error] no such class: $Exception_119
>
> This happening after 3-4 days of normal operation? Suddenly exceptions
> occur on random objects because OGNL can no longer compile them and this
> is because Tapestry can no longer find instances of these classes, it
> relates to JavaAssist dynamic class loading. Also, currently  the server
> is idle with no connections and JConsole shows 18000 classes loaded,
> yesterday there were 7000 classes, this number never goes down only up,
> so you tell me what's going on?
>
> If Jessie can't explain it, then I have to go back a version we cant
> afford for clients to see broken pages, my boss doesn't care about the
> problem, he just wants a solution and its my job and reputation is at
> stake.
>
>
> Andreas Andreou wrote:
> > Peter,
> > though not officially final (I believe),
> > http://news247.gr (tap-4.1.2) has been getting 40 req/day
> > for an uptime of 26 days with memory set to no more than 128MB.
> >
> >
> > On 8/28/07, Peter Stavrinides <[EMAIL PROTECTED]> wrote:
> >
> >> Hi Jessie
> >>
> >> Any progress on this?  sorry to bug you, but I have to take a
> >> decision soon, I have two production machines that will need to upgrade
> >> or downgrade Tapestry.
> >>
> >> Best wishes,
> >> Peter
> >>
> >> Jon Oakes wrote:
> >>
> >>> Hi Bryan,
> >>>
> >>> I am a relative newbie but I was wondering if  you are running with
> >>> caching enabled or disabled?  It might make sense to keep things
> >>> around when caching is disabled whereas I think it would clearly be a
> >>> bug to keep things around with it disabled.
> >>>
> >>> Jon Oakes
> >>>
> >>>
> >>> Jesse Kuhnert wrote:
> >>>
>  Hmmm...well,  I don't think I like the sound of any of that.  I'm
> just
>  going to pretend this problem doesn't exist.   (just kidding)
> 
>  I had thought I was doing something special with the ognl
> compilations
>  that would cause its generated classes to not hang around afterwards
>  in any pools.
> 
>  I'll take a look at things this weekend and am sure a fix will appear
>  in between now and Monday - if there is a reasonable fix to be found.
>  (in 4.1.3 snapshot form)
> 
>  On 8/24/07, Bryan Dotzour <[EMAIL PROTECTED]>  
> >> [EMAIL PROTECTED]> wrote:
> >>
> > I and another colleague of mine have been investigating what seems
> to
> >
> >> be
> >>
> > a "memory leak" in our Tapestry application for about a month since
> we
> > upgraded to T4.1.2.  I won't bore you with the saga of the last
> month,
> > but I would like to present the data I've gathered and look to the
> >
> >> list
> >>
> > for a proposed solution.  I was reading a recent thread in which
> Jesse
> > said (08/09/2007):
> >
> >
> >
> > "There is a map that grows as large as the system using it
> internally
> >
> >> to
> >>
> > javassist of various cached reflection info - but it doesn't leak in
> >
> >> any
> >>
> > way."
> >
> > This is precisely what I've found in profiling our application and
> it
> > *appears* to be this map that is causing our applications to
> >
> >> eventually
> >>
> > run out of memory.
> >
> > The YourKit pro

RE: Memory consumption in T4.1.2 - Hard data

2007-08-28 Thread Marcus.Schulte
So changing the page pool parameters didn't help then? 

> -Original Message-
> From: Peter Stavrinides [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, August 28, 2007 10:34 AM
> To: Tapestry users
> Subject: Re: Memory consumption in T4.1.2 - Hard data
> 
> 
> Andreas, give me a break! I am not trying to trash Tapestry 
> if that's what you are thinking. I am not the only one 
> experiencing these problems.
> Have a look at some of my postings (and others posts) and you 
> will see what I am talking about. I have been having these 
> problems since upgrading from 4.1.1 I never experienced these 
> problems before with uptime of months at a time.
> 
> Look at this log, id is an integer with the value 728:
> 
> 21 Aug 2007 13:01:49,353 - INFO $Portfolio_89 - Setting the 
> portfolio with the id: 728
> 21 Aug 2007 13:01:50,479 - ERROR $Error_118 - Unable to parse 
> OGNL expression 'id': Unable to parse OGNL expression 'id': 
> Unable to parse OGNL expression 'id': 
> Exception [classpath:/org/apache/tapestry/form/TextArea.jwc, 
> line 49, column 67]
>   at 
> org.apache.tapestry.binding.ExpressionBinding.resolveExpressio
> n(ExpressionBinding.java:145)
>   at 
> org.apache.tapestry.binding.ExpressionBinding.getObject(Expres
> sionBinding.java:125)
> 
> And then take a look at this:
> 
> 21 Aug 2007 07:56:50,613 - ERROR 
> org.apache.tapestry.services.impl.HiveMindExpressionCompiler 
> - Error generating OGNL getter for expression exceptions with 
> root [EMAIL PROTECTED]:Exception] and body:
> { return (($Exception_119)$2).getExceptions();}
> org.apache.hivemind.ApplicationRuntimeException: Unable to 
> add method java.lang.Object get(ognl.OgnlContext, 
> java.lang.Object) to class $ASTProperty_1146a471a52: [source 
> error] no such class: $Exception_119
> 
> This happening after 3-4 days of normal operation? Suddenly 
> exceptions occur on random objects because OGNL can no longer 
> compile them and this is because Tapestry can no longer find 
> instances of these classes, it relates to JavaAssist dynamic 
> class loading. Also, currently  the server is idle with no 
> connections and JConsole shows 18000 classes loaded, 
> yesterday there were 7000 classes, this number never goes 
> down only up, so you tell me what's going on?
> 
> If Jessie can't explain it, then I have to go back a version 
> we cant afford for clients to see broken pages, my boss 
> doesn't care about the problem, he just wants a solution and 
> its my job and reputation is at stake.
> 
> 
> Andreas Andreou wrote:
> > Peter,
> > though not officially final (I believe), http://news247.gr 
> (tap-4.1.2) 
> > has been getting 40 req/day for an uptime of 26 days 
> with memory 
> > set to no more than 128MB.
> >
> >
> > On 8/28/07, Peter Stavrinides <[EMAIL PROTECTED]> wrote:
> >   
> >> Hi Jessie
> >>
> >> Any progress on this?  sorry to bug you, but I have to take a 
> >> decision soon, I have two production machines that will need to 
> >> upgrade or downgrade Tapestry.
> >>
> >> Best wishes,
> >> Peter
> >>
> >> Jon Oakes wrote:
> >> 
> >>> Hi Bryan,
> >>>
> >>> I am a relative newbie but I was wondering if  you are 
> running with 
> >>> caching enabled or disabled?  It might make sense to keep things 
> >>> around when caching is disabled whereas I think it would 
> clearly be 
> >>> a bug to keep things around with it disabled.
> >>>
> >>> Jon Oakes
> >>>
> >>>
> >>> Jesse Kuhnert wrote:
> >>>   
>  Hmmm...well,  I don't think I like the sound of any of 
> that.  I'm just
>  going to pretend this problem doesn't exist.   (just kidding)
> 
>  I had thought I was doing something special with the ognl 
>  compilations that would cause its generated classes to not hang 
>  around afterwards in any pools.
> 
>  I'll take a look at things this weekend and am sure a fix will 
>  appear in between now and Monday - if there is a 
> reasonable fix to be found.
>  (in 4.1.3 snapshot form)
> 
>  On 8/24/07, Bryan Dotzour <[EMAIL PROTECTED]>   
> >> [EMAIL PROTECTED]> wrote:
> >> 
> > I and another colleague of mine have been investigating 
> what seems 
> > to
> >   
> >> be
> >> 
> > a "memory leak" in our Tapestry application for about a month 
> > since we upgraded to T4.1.2.  I won't bore you with the saga of 
> > the last month, but I would like to present the data 
> I've gathered 
> > and look to the
> >   
> >> list
> >> 
> > for a proposed solution.  I was reading a recent thread 
> in which 
> > Jesse said (08/09/2007):
> >
> >
> >
> > "There is a map that grows as large as the system using it 
> > internally
> >   
> >> to
> >> 
> > javassist of various cached reflection info - but it 
> doesn't leak 
> > in
> >   
> >> any
> >> 
> > way."
> >
> > This is precisely what I've found in profiling ou

Re: Memory consumption in T4.1.2 - Hard data

2007-08-28 Thread Kalle Korhonen
Now that's an OGNL compiler error. Have you tried with OGNL
2.7.1-SNAPSHOT(just use the latest). OGNL
2.7 that comes with Tap 4.1.2 by default is known to have bugs with the
compiled expressions. Please try with the latest OGNL; it might just do the
trick.

Kalle


On 8/28/07, Peter Stavrinides <[EMAIL PROTECTED]> wrote:
>
>
> Andreas, give me a break! I am not trying to trash Tapestry if that's
> what you are thinking. I am not the only one experiencing these problems.
> Have a look at some of my postings (and others posts) and you will see
> what I am talking about. I have been having these problems since
> upgrading from 4.1.1 I never experienced these problems before with
> uptime of months at a time.
>
> Look at this log, id is an integer with the value 728:
>
> 21 Aug 2007 13:01:49,353 - INFO $Portfolio_89 - Setting the portfolio with
> the id: 728
> 21 Aug 2007 13:01:50,479 - ERROR $Error_118 - Unable to parse OGNL
> expression 'id': Unable to parse OGNL expression 'id': Unable to parse OGNL
> expression 'id': 
> Exception [classpath:/org/apache/tapestry/form/TextArea.jwc, line 49,
> column 67]
> at org.apache.tapestry.binding.ExpressionBinding.resolveExpression
> (ExpressionBinding.java:145)
> at org.apache.tapestry.binding.ExpressionBinding.getObject(
> ExpressionBinding.java:125)
>
> And then take a look at this:
>
> 21 Aug 2007 07:56:50,613 - ERROR
> org.apache.tapestry.services.impl.HiveMindExpressionCompiler - Error
> generating OGNL getter for expression exceptions with root
> [EMAIL PROTECTED]:Exception] and body:
> { return (($Exception_119)$2).getExceptions();}
> org.apache.hivemind.ApplicationRuntimeException: Unable to add method
> java.lang.Object get(ognl.OgnlContext, java.lang.Object) to class
> $ASTProperty_1146a471a52: [source error] no such class: $Exception_119
>
> This happening after 3-4 days of normal operation? Suddenly exceptions
> occur on random objects because OGNL can no longer compile them and this
> is because Tapestry can no longer find instances of these classes, it
> relates to JavaAssist dynamic class loading. Also, currently  the server
> is idle with no connections and JConsole shows 18000 classes loaded,
> yesterday there were 7000 classes, this number never goes down only up,
> so you tell me what's going on?
>
> If Jessie can't explain it, then I have to go back a version we cant
> afford for clients to see broken pages, my boss doesn't care about the
> problem, he just wants a solution and its my job and reputation is at
> stake.
>
>
> Andreas Andreou wrote:
> > Peter,
> > though not officially final (I believe),
> > http://news247.gr (tap-4.1.2) has been getting 40 req/day
> > for an uptime of 26 days with memory set to no more than 128MB.
> >
> >
> > On 8/28/07, Peter Stavrinides <[EMAIL PROTECTED]> wrote:
> >
> >> Hi Jessie
> >>
> >> Any progress on this?  sorry to bug you, but I have to take a
> >> decision soon, I have two production machines that will need to upgrade
> >> or downgrade Tapestry.
> >>
> >> Best wishes,
> >> Peter
> >>
> >> Jon Oakes wrote:
> >>
> >>> Hi Bryan,
> >>>
> >>> I am a relative newbie but I was wondering if  you are running with
> >>> caching enabled or disabled?  It might make sense to keep things
> >>> around when caching is disabled whereas I think it would clearly be a
> >>> bug to keep things around with it disabled.
> >>>
> >>> Jon Oakes
> >>>
> >>>
> >>> Jesse Kuhnert wrote:
> >>>
>  Hmmm...well,  I don't think I like the sound of any of that.  I'm
> just
>  going to pretend this problem doesn't exist.   (just kidding)
> 
>  I had thought I was doing something special with the ognl
> compilations
>  that would cause its generated classes to not hang around afterwards
>  in any pools.
> 
>  I'll take a look at things this weekend and am sure a fix will appear
>  in between now and Monday - if there is a reasonable fix to be found.
>  (in 4.1.3 snapshot form)
> 
>  On 8/24/07, Bryan Dotzour <[EMAIL PROTECTED]>  
> >> [EMAIL PROTECTED]> wrote:
> >>
> > I and another colleague of mine have been investigating what seems
> to
> >
> >> be
> >>
> > a "memory leak" in our Tapestry application for about a month since
> we
> > upgraded to T4.1.2.  I won't bore you with the saga of the last
> month,
> > but I would like to present the data I've gathered and look to the
> >
> >> list
> >>
> > for a proposed solution.  I was reading a recent thread in which
> Jesse
> > said (08/09/2007):
> >
> >
> >
> > "There is a map that grows as large as the system using it
> internally
> >
> >> to
> >>
> > javassist of various cached reflection info - but it doesn't leak in
> >
> >> any
> >>
> > way."
> >
> > This is precisely what I've found in profiling our application and
> it
> > *appears* to be this map that is causing our applications to
> >
> >> eventually
> >>
> > run out

Re: T5: FCKEditor Component

2007-08-28 Thread sun58224
Ted Steen  gmail.com> writes:



asp, no java?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Memory consumption in T4.1.2 - Hard data

2007-08-28 Thread Peter Stavrinides


Andreas, give me a break! I am not trying to trash Tapestry if that's 
what you are thinking. I am not the only one experiencing these problems.
Have a look at some of my postings (and others posts) and you will see 
what I am talking about. I have been having these problems since 
upgrading from 4.1.1 I never experienced these problems before with 
uptime of months at a time.


Look at this log, id is an integer with the value 728:

21 Aug 2007 13:01:49,353 - INFO $Portfolio_89 - Setting the portfolio with the 
id: 728
21 Aug 2007 13:01:50,479 - ERROR $Error_118 - Unable to parse OGNL expression 
'id': Unable to parse OGNL expression 'id': Unable to parse OGNL expression 
'id': 
Exception [classpath:/org/apache/tapestry/form/TextArea.jwc, line 49, column 67]
at 
org.apache.tapestry.binding.ExpressionBinding.resolveExpression(ExpressionBinding.java:145)
at 
org.apache.tapestry.binding.ExpressionBinding.getObject(ExpressionBinding.java:125)

And then take a look at this:

21 Aug 2007 07:56:50,613 - ERROR 
org.apache.tapestry.services.impl.HiveMindExpressionCompiler - Error generating 
OGNL getter for expression exceptions with root [EMAIL PROTECTED]:Exception] 
and body:
{ return (($Exception_119)$2).getExceptions();}
org.apache.hivemind.ApplicationRuntimeException: Unable to add method 
java.lang.Object get(ognl.OgnlContext, java.lang.Object) to class 
$ASTProperty_1146a471a52: [source error] no such class: $Exception_119

This happening after 3-4 days of normal operation? Suddenly exceptions 
occur on random objects because OGNL can no longer compile them and this 
is because Tapestry can no longer find instances of these classes, it 
relates to JavaAssist dynamic class loading. Also, currently  the server 
is idle with no connections and JConsole shows 18000 classes loaded, 
yesterday there were 7000 classes, this number never goes down only up, 
so you tell me what's going on?


If Jessie can't explain it, then I have to go back a version we cant 
afford for clients to see broken pages, my boss doesn't care about the 
problem, he just wants a solution and its my job and reputation is at 
stake.



Andreas Andreou wrote:

Peter,
though not officially final (I believe),
http://news247.gr (tap-4.1.2) has been getting 40 req/day
for an uptime of 26 days with memory set to no more than 128MB.


On 8/28/07, Peter Stavrinides <[EMAIL PROTECTED]> wrote:
  

Hi Jessie

Any progress on this?  sorry to bug you, but I have to take a
decision soon, I have two production machines that will need to upgrade
or downgrade Tapestry.

Best wishes,
Peter

Jon Oakes wrote:


Hi Bryan,

I am a relative newbie but I was wondering if  you are running with
caching enabled or disabled?  It might make sense to keep things
around when caching is disabled whereas I think it would clearly be a
bug to keep things around with it disabled.

Jon Oakes


Jesse Kuhnert wrote:
  

Hmmm...well,  I don't think I like the sound of any of that.  I'm just
going to pretend this problem doesn't exist.   (just kidding)

I had thought I was doing something special with the ognl compilations
that would cause its generated classes to not hang around afterwards
in any pools.

I'll take a look at things this weekend and am sure a fix will appear
in between now and Monday - if there is a reasonable fix to be found.
(in 4.1.3 snapshot form)

On 8/24/07, Bryan Dotzour <[EMAIL PROTECTED]> 

[EMAIL PROTECTED]> wrote:


I and another colleague of mine have been investigating what seems to
  

be


a "memory leak" in our Tapestry application for about a month since we
upgraded to T4.1.2.  I won't bore you with the saga of the last month,
but I would like to present the data I've gathered and look to the
  

list


for a proposed solution.  I was reading a recent thread in which Jesse
said (08/09/2007):



"There is a map that grows as large as the system using it internally
  

to


javassist of various cached reflection info - but it doesn't leak in
  

any


way."

This is precisely what I've found in profiling our application and it
*appears* to be this map that is causing our applications to
  

eventually


run out of memory.

The YourKit profiler shows me that, as time goes on, there is an
instance of HiveMindClassPool  that grows and grows as class instances
are created.  This class extends from javassist.ClassPool and is the
  

map


that Jesse is talking about in his quote above.  And he's right, I
wouldn't say that the class pool "leaks" either because it looks like
it's designed to retain that memory until the class pool itself is no
longer needed.



Take this quote from the javassist.ClassPool javadocs:

"Memory consumption memo:
ClassPool objects hold all the CtClasses that have been created so
  

that


the consistency among modified classes can be guaranteed. Thus if a
large number of CtClasses are proc

Re: [T5] Restricting Page Access

2007-08-28 Thread Robin Helgelin
On 8/28/07, Erik Vullings <[EMAIL PROTECTED]> wrote:
> To clarify my understanding - how does it deal with protecting
> links/functions. For example, assume I'm a regular, non-admin user and
> access the application. Since I'm not an admin, I don't see the link to the
> "Clear database" function, but somehow, I can guess it's link. How does the
> framework protect me from invoking that link anyways? Do you have equivalent
> functions as ifLoggedIn and ifRole in the java class files?

Yes, just use the @Secured("ROLE_ADMIN") annotation on the page class
and the framework takes care of the rest.

-- 
regards,
Robin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How do I get a page from a sub-package

2007-08-28 Thread Martino Piccinato
I think you can use configuration parameter

org.apache.tapestry.component-class-packages

(from documentation) A comma-seperated list of package names, used
when  searching for the component class  . These must appear as 
 tags in the application or library specification containing the
component


For other options you can see

http://tapestry.apache.org/tapestry4.1/usersguide/components.html

at the section "Referencing Library Components"


On 8/28/07, mraible <[EMAIL PROTECTED]> wrote:
>
> I have a UserForm class in a "pages" package and a UserList class in an
> "admin" sub-package. In UserForm, how do I get UserList? The following
> doesn't seem to work:
>
> UserList nextPage = (UserList) cycle.getPage("UserList");
>
> Results in: java.lang.ClassCastException: $UserList_4
>
> If I change it to cycle.getPage("admin/UserList"), I get:
>
> java.lang.ClassCastException: $BasePage_4
>
> The last option (cycle.getPage("admin.UserList")) seems a bit closer, but
> still doesn't work:
>
> java.lang.NoClassDefFoundError: org/appfuse/webapp/pages/Admin/UserList
> (wrong name: org/appfuse/webapp/pages/admin/UserList)
>
> Thanks,
>
> Matt
>
> --
> View this message in context: 
> http://www.nabble.com/How-do-I-get-a-page-from-a-sub-package-tf4339857.html#a12362460
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tapestry 4 to 5 page service

2007-08-28 Thread Nick Westgate
@Inject
private ComponentResources resources;
...
String url = resources.createPageLink("pageName", false, context).toURI();

Cheers,
Nick.


Peter Stavrinides wrote:
> Hi all,
> 
> I am currently upgrading a Tapestry 4 app to Tapestry 5, I am still 
> adjusting to the differences between the two frameworks. In Tapestry 4 I 
> could retrieve a page link using the page service IEngineService like this:
> 
> final ILink pageLink = pageService.getLink(false, pageName);
> 
> I gather ILink no longer exists in T5 but there is PageLink instead, so 
> what infrastructure or service can  be used to retrieve the PageLink 
> using only the page name.
> 
> Thanks,
> Peter
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tapestry 4 to 5 page service

2007-08-28 Thread Peter Stavrinides

Hi all,

I am currently upgrading a Tapestry 4 app to Tapestry 5, I am still 
adjusting to the differences between the two frameworks. In Tapestry 4 I 
could retrieve a page link using the page service IEngineService like this:


final ILink pageLink = pageService.getLink(false, pageName);

I gather ILink no longer exists in T5 but there is PageLink instead, so 
what infrastructure or service can  be used to retrieve the PageLink 
using only the page name.


Thanks,
Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T5] Restricting Page Access

2007-08-28 Thread Erik Vullings
That's really cool and very useful!

To clarify my understanding - how does it deal with protecting
links/functions. For example, assume I'm a regular, non-admin user and
access the application. Since I'm not an admin, I don't see the link to the
"Clear database" function, but somehow, I can guess it's link. How does the
framework protect me from invoking that link anyways? Do you have equivalent
functions as ifLoggedIn and ifRole in the java class files?

Cheers
Erik

On 8/27/07, Robin Helgelin <[EMAIL PROTECTED]> wrote:
>
> On 8/27/07, Erik Vullings <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > Just wondering - when dealing with page authorizations, does this model
> > expand to component authorizations, i.e. you may visit the page, but not
> > certain components (redirect to another component), or you can see a
> > component, but with less privileges (e.g. view but not edit). In other
> > words, how would you deal with CRUD (create, read, update, delete)
> > role-based authorization on a component level?
>
> I'd say it's up to the component. I've just added two new components
> in tapestry5-acegi, called IfLoggedIn and IfRole, which can be used in
> components such as:
>
> 
> You are logged in, welcome!
> 
> You are even logged as admin, cool!
> 
> Sorry, you don't have admin credentials.
> 
> 
> Logout
> 
> Not logged in, please  t:page="LoginPage">do.
> 
> 
>
> --
> regards,
> Robin
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Memory consumption in T4.1.2 - Hard data

2007-08-28 Thread Andreas Andreou
Peter,
though not officially final (I believe),
http://news247.gr (tap-4.1.2) has been getting 40 req/day
for an uptime of 26 days with memory set to no more than 128MB.


On 8/28/07, Peter Stavrinides <[EMAIL PROTECTED]> wrote:
>
> Hi Jessie
>
> Any progress on this?  sorry to bug you, but I have to take a
> decision soon, I have two production machines that will need to upgrade
> or downgrade Tapestry.
>
> Best wishes,
> Peter
>
> Jon Oakes wrote:
> > Hi Bryan,
> >
> > I am a relative newbie but I was wondering if  you are running with
> > caching enabled or disabled?  It might make sense to keep things
> > around when caching is disabled whereas I think it would clearly be a
> > bug to keep things around with it disabled.
> >
> > Jon Oakes
> >
> >
> > Jesse Kuhnert wrote:
> >> Hmmm...well,  I don't think I like the sound of any of that.  I'm just
> >> going to pretend this problem doesn't exist.   (just kidding)
> >>
> >> I had thought I was doing something special with the ognl compilations
> >> that would cause its generated classes to not hang around afterwards
> >> in any pools.
> >>
> >> I'll take a look at things this weekend and am sure a fix will appear
> >> in between now and Monday - if there is a reasonable fix to be found.
> >> (in 4.1.3 snapshot form)
> >>
> >> On 8/24/07, Bryan Dotzour <[EMAIL PROTECTED]>  [EMAIL PROTECTED]> wrote:
> >>
> >>> I and another colleague of mine have been investigating what seems to
> be
> >>> a "memory leak" in our Tapestry application for about a month since we
> >>> upgraded to T4.1.2.  I won't bore you with the saga of the last month,
> >>> but I would like to present the data I've gathered and look to the
> list
> >>> for a proposed solution.  I was reading a recent thread in which Jesse
> >>> said (08/09/2007):
> >>>
> >>>
> >>>
> >>> "There is a map that grows as large as the system using it internally
> to
> >>> javassist of various cached reflection info - but it doesn't leak in
> any
> >>> way."
> >>>
> >>> This is precisely what I've found in profiling our application and it
> >>> *appears* to be this map that is causing our applications to
> eventually
> >>> run out of memory.
> >>>
> >>> The YourKit profiler shows me that, as time goes on, there is an
> >>> instance of HiveMindClassPool  that grows and grows as class instances
> >>> are created.  This class extends from javassist.ClassPool and is the
> map
> >>> that Jesse is talking about in his quote above.  And he's right, I
> >>> wouldn't say that the class pool "leaks" either because it looks like
> >>> it's designed to retain that memory until the class pool itself is no
> >>> longer needed.
> >>>
> >>>
> >>>
> >>> Take this quote from the javassist.ClassPool javadocs:
> >>>
> >>> "Memory consumption memo:
> >>> ClassPool objects hold all the CtClasses that have been created so
> that
> >>> the consistency among modified classes can be guaranteed. Thus if a
> >>> large number of CtClasses are processed, the ClassPool will consume a
> >>> huge amount of memory. To avoid this, a ClassPool object should be
> >>> recreated, for example, every hundred classes processed. Note that
> >>> getDefault() is a singleton factory. Otherwise, detach() in CtClass
> >>> should be used to avoid huge memory consumption. "
> >>>
> >>> This huge memory consumption by the ClassPool is what I was seeing. In
> >>> particular it is the ClassPool that is held onto by OgnlRuntime.
> >>> Inspecting this object in the profiler showed that it has a map
> >>> containing about 45,000 classes.  All of the keys into this map were
> >>> things like:  "ASTTest_11494aca9af" and "ASTAnd_11494ace4fb" and the
> >>> values are instances of javassist.CtNewClass.  Each entry in this map
> >>> looks like it retains about 1,900 bytes, for a grand total of about 90
> >>> MB of memory used.
> >>>
> >>> These numbers came from my staging deployment where I had the profiler
> >>> attached, using some reflection tricks I was able to look at a
> >>> production site and found that it had about 240,000 items in that
> class
> >>> pool.. approximately 450 MB of memory.
> >>>
> >>> So I guess the questions in my mind are:  Why are there so many
> classes
> >>> in the pool?  Why does the number only ever go up?  Do those classes
> >>> really need to stay in the pool forever?
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED] For
> > additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / JEE Consulting