Re: Strange performance issue Tomcat/Jetty

2008-06-23 Thread Moritz Gmelin

Hi again,

I could nail this problem down to the hibernate level.

Executing hibernate queries takes 2-5 times longer when an application  
is hosted on tomcat than when it is hosted on jetty5.1.10.


Does anyone have an explanation on that? Is this a pure hibernate  
problem or rather in tapestry-hibernate integration?


M.


Am 20.06.2008 um 15:00 schrieb Moritz Gmelin:


Hi,

I have a 5.0.13 application running that handles some grids with  
about 150 entries fetched from a database.
Now on one page, this grid is basically the only component of the  
page. On another page, there are some beans around that grid and the  
grid itself is in a block that is only displayed under certain  
circumstances.


Now if this application is run with tomcat 6.0.14, the page where  
the grid is one of many components is way slower to render that the  
page where the grid is the only component (~3sec vs. 1sec.)
Running the application with jetty 5.5.11 does not show this effect.  
The pages are both rendered instantly. With Jetty 6.1.11 again I can  
see that the grid contained in the more complex page takes as long  
as with Tomcat.


This difference in render times also happens when the grid is shown  
as an inPlace grid.


Does anyone see a reason why rendering a component takes so much  
longer with Tomcat or Jetty 6 than with Jetty 5 ? Is there anything  
I can do to make tomcat faster?


Thanks

Moritz

-
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: Security of t:formdata

2008-06-23 Thread Ivan Dubrov

Howard Lewis Ship wrote:

Although you could use this technique (severe hacking of t:formdata)
to control what ComponentAction was instantiated at what point in the
form submission, the security effects of this are minimal; Tapestry
includes only a finite set of ComponentAction classes and each has a
very specific job; the worst that you could do would be to redirect
certain property updates to certain other fields, and doing even that
would require deep understanding of Tapestry and of the specific
application.
  
Could it be used for DOS attacks? For example, by forcing server to 
instantiate something heavy.


Anyway, I think, security by obscurity not very good approach to 
secure code.



There's an outstanding issue concerning this; the best security is not
to encrypt or checksum the data, but not to send it to the client at
all.  Instead, store the bytestream on the server, and send a token to
the client.  This will mean smaller rendered pages, smaller requests,
and (probably) better throughput along with improved security.
However, managing these server-side bytestreams (knowing how long to
retain them, when to discard them, and which ones are useable with
with sessions) is a challenge, especially in a cluster.
  
In my opinion, signing is better, because it allows you to stay 
stateless in that case, which is good for scalability. The secret key 
could be generated during framework initialization, for example, so 
formdata will be valid until application is restarted (which is 
acceptable for most cases).




--
WBR,
Ivan S. Dubrov


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



Re: [T5] how to add dojo in tapestry5?

2008-06-23 Thread Vladimir Solomenchuk

Hi,

You have two ways to do this:
1. simply include into your page/components dojo javascript libraries
2. write your own PageRenderSupport (see public void
contributeMarkupRenderer(...) in TapestyModule)




Tan [EMAIL PROTECTED] wrote:
 
 hi all,
 hi i know tapestry5 come with scriptaculous and prototype. but i wan
 to
 use something like dojo AccordionContainer in tml.
 may i know any way to do it? thank youl.
 
 Regards,
 [EMAIL PROTECTED]
 
 

-- 
View this message in context: 
http://www.nabble.com/-T5--how-to-add-dojo-in-tapestry5--tp18044089p18064520.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



grid component exclude/inlcude has no effect (t5.0.10)

2008-06-23 Thread Udo Abel
Hi

I have a grid component like this:

t:grid source=addrList row=addrRow reorder=kurzname, adressnr, 
ort, strasse
/t:grid

The reorder parameter works, but neither include nor exclude seem to do 
anything, as in:

t:grid source=addrList row=addrRow include=kurzname, adressnr, 
ort, strasse
/t:grid

which should have the same output as reorder but omit any further columns.
  
I'm currently using t5.0.10 (due to tomcat startup problems with t5.0.13).

Is that a known problem or am I doing something wrong?

Thanks,
Udo.
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

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



programmatic component rendering

2008-06-23 Thread Udo Abel
Hi,

we're planning a highly dynamic web app, where it is necessary to display 
certain components depending of the application state. E.g., in an address 
detail view there should be a paragraph which contains different details for a 
customer and a supplier. Or if the balance of an account is greater than a 
certain amnout, another component should be redered on the current page (or 
within the current component, respectively).
Since there are many such situations and combinations, we can't build static 
tml files for all of them.

So, is it possible to render an arbitrary component based on a programmatic 
choice from within the rendering of a component?

Thanks,
Udo.
-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/[EMAIL PROTECTED]

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



Re: programmatic component rendering

2008-06-23 Thread Kristian Marinkovic
hi udo, 

there are different approaches to it... :) ... 

you can configure the view using blocks ...

i do it by defining some Blocks that are then composed using 
certain rules through my pimped BeanEditor component. 

eg. a new Dealer has at least one employee. Therefore when a new 
Dealer is created i get the input fields to create a new employee as 
well. when i edit a Dealer i only get a select option where i can select 
the main employee. which block is displayed is controlled by a service
that has some rules contributed. so all i have to do is to define the 
rules
( fine granular: uses the beantype, propertytype, the current page, and a 
state) and pass in my bean to my pimped BeanEditor component. The
contributed rules have a reference to the current bean and therefore can
excute some logic and control the displayed block respectively.

i hope this helps :)

g,
kris




Udo Abel [EMAIL PROTECTED] 
23.06.2008 10:26
Bitte antworten an
Tapestry users users@tapestry.apache.org


An
users@tapestry.apache.org
Kopie

Thema
programmatic component rendering







Hi,

we're planning a highly dynamic web app, where it is necessary to display 
certain components depending of the application state. E.g., in an address 
detail view there should be a paragraph which contains different details 
for a customer and a supplier. Or if the balance of an account is 
greater than a certain amnout, another component should be redered on the 
current page (or within the current component, respectively).
Since there are many such situations and combinations, we can't build 
static tml files for all of them.

So, is it possible to render an arbitrary component based on a 
programmatic choice from within the rendering of a component?

Thanks,
Udo.
-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/[EMAIL PROTECTED]

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




t5: t5.0.13 and DocumentHeadBuilder

2008-06-23 Thread Angelo Chen

Hi,

I'm upgrading to 5.0.13, i use this internal
service:DocumentHeadBuilder.addScript, it's not in the 5.0.13 any more, what
are the equivalents? Thanks,

Angelo
-- 
View this message in context: 
http://www.nabble.com/t5%3A-t5.0.13-and-DocumentHeadBuilder-tp18065869p18065869.html
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: Strange performance issue Tomcat/Jetty

2008-06-23 Thread Massimo Lusetti
On Mon, Jun 23, 2008 at 8:13 AM, Moritz Gmelin [EMAIL PROTECTED] wrote:

 Hi again,

 I could nail this problem down to the hibernate level.

 Executing hibernate queries takes 2-5 times longer when an application is
 hosted on tomcat than when it is hosted on jetty5.1.10.

 Does anyone have an explanation on that? Is this a pure hibernate problem or
 rather in tapestry-hibernate integration?

I must say i've never used tomcat in production, always jetty, but
this sound strange anyway. Could you provide more infos, did you use a
profiler or something else?


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

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



Re: t5: t5.0.13 and DocumentHeadBuilder

2008-06-23 Thread Kristian Marinkovic
i think the RenderSupport service is what you are looking for.

g,
kris




Angelo Chen [EMAIL PROTECTED] 
23.06.2008 11:44
Bitte antworten an
Tapestry users users@tapestry.apache.org


An
users@tapestry.apache.org
Kopie

Thema
t5: t5.0.13 and DocumentHeadBuilder








Hi,

I'm upgrading to 5.0.13, i use this internal
service:DocumentHeadBuilder.addScript, it's not in the 5.0.13 any more, 
what
are the equivalents? Thanks,

Angelo
-- 
View this message in context: 
http://www.nabble.com/t5%3A-t5.0.13-and-DocumentHeadBuilder-tp18065869p18065869.html

Sent from the Tapestry - User mailing list archive at Nabble.com.


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




[T4.1.5] RadioGroup EventListener doesn't work

2008-06-23 Thread Jerome Da Costa
Hi,
When trying to you the onChange method on a RadioGroup component, we
encountered the following error client side :

[Exception... 'Error: bad srcObj for srcFunc: onChange' when calling
method: [nsIDOMEventListener::handleEvent]  nsresult: 0x8057001c
(NS_ERROR_XPC_JS_THREW_JS_OBJECT)  location: unknown  data: no]

We thought we did something wrong so we started back from the Ajax
example on the tapestry website
(http://tapestry.apache.org/tapestry4.1/components/form/radiogroup.html).
Still doesn't work.

Do you have an idea ?
How to made the example work, is there something missing ?

Best regards,
Jérome.











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



[ANN] JumpStart 3.8: for Tapestry 5.0.13

2008-06-23 Thread Geoff Callender

Hi all,

JumpStart 3.8 is now available.  It's for Tapestry 5.0.13.  New in  
this release:


	* @ProtectedPage annotation - uses an annotation instead of a super  
class to protect pages against users who aren't logged in.
	* Provides a script that creates a fresh, working project with your  
application name and package names.

* Fixes a bug that prevented use of the Create User page.
* Clearer separation between the examples and the application.

You'll find it at:

http://files.doublenegative.com.au/jumpstart

As always, comments and suggestions are encouraged.  Be helpful or  
brutal - I don't care which - because it all helps to make this stuff  
more useful.


Cheers,

Geoff

Re: Merge T4-Application with a T5-Page

2008-06-23 Thread Tommyboy66

I solved little problems with a temporary solution in the meantime. I created
another application with T5 and switch beetween pages with hard-coded URLs.
The problem is that it is not possible to pass parameters beetween the
applications. For example i wrote a page with a grid component in T5 and in
the grid there are links for showing details of the selected row. But the
target (detailsPage) is a T4-Page who want to have parameters like the id or
the sessionid. Is it possible to send parameters to a T4 page in some way?
Has anybody a link or instructions for the URL-encoding in T4? Is it
possible to send all needed parameters from T4 to T5 to build an encoded URL
to return to the T4-application? Is there maybe an easier way to implement
this?

The main target of this is to transform an old T4-Application to a
T5-Application for a sequential exchange of all pages.
-- 
View this message in context: 
http://www.nabble.com/Merge-T4-Application-with-a-T5-Page-tp18000169p18070475.html
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: Security of t:formdata

2008-06-23 Thread Martijn Brinkers (List)
Using ClientPersistentFieldStorage (t:state:client parameter) you can
'inject' arbitary serialiable objects so it would be easy to 'inject' a
huge byte array that consumes all memory. Securing this with an HMAC
would not be that hard because it only requires changes to
Base64ObjectInputStream. I think it would be even better if the
'packer/unpacker' would be a service so anyone wishing to create a new
version can override it.

 Anyway, I think, security by obscurity not very good approach to 
 secure code.

Cannot agree more.


Martijn Brinkers

On Mon, 2008-06-23 at 14:32 +0700, Ivan Dubrov wrote:
 Howard Lewis Ship wrote:
  Although you could use this technique (severe hacking of t:formdata)
  to control what ComponentAction was instantiated at what point in the
  form submission, the security effects of this are minimal; Tapestry
  includes only a finite set of ComponentAction classes and each has a
  very specific job; the worst that you could do would be to redirect
  certain property updates to certain other fields, and doing even that
  would require deep understanding of Tapestry and of the specific
  application.

 Could it be used for DOS attacks? For example, by forcing server to 
 instantiate something heavy.
 
 Anyway, I think, security by obscurity not very good approach to 
 secure code.
 
  There's an outstanding issue concerning this; the best security is not
  to encrypt or checksum the data, but not to send it to the client at
  all.  Instead, store the bytestream on the server, and send a token to
  the client.  This will mean smaller rendered pages, smaller requests,
  and (probably) better throughput along with improved security.
  However, managing these server-side bytestreams (knowing how long to
  retain them, when to discard them, and which ones are useable with
  with sessions) is a challenge, especially in a cluster.

 In my opinion, signing is better, because it allows you to stay 
 stateless in that case, which is good for scalability. The secret key 
 could be generated during framework initialization, for example, so 
 formdata will be valid until application is restarted (which is 
 acceptable for most cases).
 
 
 


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



Re: [T5] how to add dojo in tapestry5?

2008-06-23 Thread Tan [EMAIL PROTECTED]
thank you.  I will try it out first.

On Mon, Jun 23, 2008 at 4:13 PM, Vladimir Solomenchuk [EMAIL PROTECTED]
wrote:


 Hi,

 You have two ways to do this:
 1. simply include into your page/components dojo javascript libraries
 2. write your own PageRenderSupport (see public void
 contributeMarkupRenderer(...) in TapestyModule)




 Tan [EMAIL PROTECTED] wrote:
 
  hi all,
  hi i know tapestry5 come with scriptaculous and prototype. but i wan
  to
  use something like dojo AccordionContainer in tml.
  may i know any way to do it? thank youl.
 
  Regards,
  [EMAIL PROTECTED]
 
 

 --
 View this message in context:
 http://www.nabble.com/-T5--how-to-add-dojo-in-tapestry5--tp18044089p18064520.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.


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




5.0.13 IE javascript error

2008-06-23 Thread Joachim Van der Auwera

Hi,

after upgrade of my application to tapestry 5.0.13 I get a unknown 
runtime error on loading the page in IE.


This is reported at line 2403 of prototype.js on the line
else element.innerHTML = content.stripScripts()

Does anybody have any idea how this problem can be remedied?

Kind regards,
Joachim

--
Joachim Van der Auwera
PROGS bvba, progs.be


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



Re: T5 onActivate

2008-06-23 Thread Geoff Callender
Before 5.0.13, if onActivate() appeared in a subclass and its parent,  
Tapestry used to jump in and call both.  From 5.0.13 it seems to  
follow the normal Java convention, ie. only the subclass method is  
called, so it is up to the subclass to call the parent if that's what  
you want.  I ran a quick test a couple of days ago and I'm pretty sure  
that's what I observed.


The result for me is that I've ditched my ProtectedPage superclass and  
opted for a @ProtectedPage annotation instead in much the same way as http://wiki.apache.org/tapestry/Tapestry5HowToControlAccess 
 .  It's a pretty sweet solution.


Cheers,

Geoff
http://files.doublenegative.com.au/jumpstart

On 23/06/2008, at 10:54 AM, Thiago H. de Paula Figueiredo wrote:

Em Sun, 22 Jun 2008 04:09:30 -0300, Geoff Callender [EMAIL PROTECTED] 
 escreveu:


Furthermore, since T5.0.13, the parent class's onActivate() is no  
longer called if it's been overridden in the child class (see https://issues.apache.org/jira/browse/TAPESTRY-2311 
 ).  Now you must ensure the child class's onActivate() calls  
super.onActivate(), or else the security is lost.  The approach is  
looking pretty flimsy.


I don't think so. Why would overriden methods in Tapestry page class  
behave differently from any other class around? I'm sorry, I just  
couldn't follow the reasoning yet.


Thiago

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





Re: 5.0.13 IE javascript error

2008-06-23 Thread Sven Homburg
please read
http://tapestry.apache.org/news.html#Tapestry%205.0.13

2008/6/23 Joachim Van der Auwera [EMAIL PROTECTED]:

 Hi,

 after upgrade of my application to tapestry 5.0.13 I get a unknown runtime
 error on loading the page in IE.

 This is reported at line 2403 of prototype.js on the line
 else element.innerHTML = content.stripScripts()

 Does anybody have any idea how this problem can be remedied?

 Kind regards,
 Joachim

 --
 Joachim Van der Auwera
 PROGS bvba, progs.be


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




-- 
with regards
Sven Homburg
http://tapestry5-components.googlecode.com
http://chenillekit.googlecode.com


T5: Passing values to JavaScript function

2008-06-23 Thread SergeEby

Hi,

Passing a dynamic values from the Java page to a JavaScript function
embedded in the .tml file works fine.
However, I need to pass that values to an external (basic) JavaScript
function. 

The external javacript files is attached to the page using the
IncludeJavaScriptLibrary annotation:

@IncludeJavaScriptLibrary(context:scripts/simple.js)
public class Start
{

...

public String getDynamicValue() {
   // Apply logic here to calculate value
   return value;
 }

}

How do I pass ${prop:dynamicValue} ?

Thanks,


/Serge
-- 
View this message in context: 
http://www.nabble.com/T5%3A-Passing-values-to-JavaScript-function-tp18071973p18071973.html
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: Passing values to JavaScript function

2008-06-23 Thread Sven Homburg
look for this small sample:
http://pastebin.com/f3c9f5056

2008/6/23 SergeEby [EMAIL PROTECTED]:


 Hi,

 Passing a dynamic values from the Java page to a JavaScript function
 embedded in the .tml file works fine.
 However, I need to pass that values to an external (basic) JavaScript
 function.

 The external javacript files is attached to the page using the
 IncludeJavaScriptLibrary annotation:

 @IncludeJavaScriptLibrary(context:scripts/simple.js)
 public class Start
 {

 ...

public String getDynamicValue() {
   // Apply logic here to calculate value
   return value;
 }

 }

 How do I pass ${prop:dynamicValue} ?

 Thanks,


 /Serge
 --
 View this message in context:
 http://www.nabble.com/T5%3A-Passing-values-to-JavaScript-function-tp18071973p18071973.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.


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




-- 
with regards
Sven Homburg
http://tapestry5-components.googlecode.com
http://chenillekit.googlecode.com


Re: T5: Parent before child clarification

2008-06-23 Thread Howard Lewis Ship
So the sub-class setupRender() overrides the base-class setupRender()?

The method setupRender() is still invoked at the appropriate time. The
difference is that it is not invoked twice, as it was before 5.0.13.

In coding terms, what happens is that Tapestry provides an
implementation of the method void setupRender(MarkupWriter writer,
Event event) in the base class that invokes the base class'
setupRender() method.

The sub class also gets an implementation of void
setupRender(MarkupWriter writer, Event event) ... the first thing it
does is invoke the super implementation.

In 5.0.11 and earlier, the subclass implementation of setupRender(...)
would invoke the subclass' override of setupRender().  Thus, the base
class would invoke it once, then the subclass would invoke it again.

In 5.0.13 this was changed so that the subclass implementation of
setupRender(...) would *NOT* invoke the setupRender() method; because
setupRender() overrides a base class method; the base class is
responsible for invoking it.  This is what that documentation is
referring to when it mentions the timing of the method invocation.

Thus if you want the base classes' implementation to be invoked, the
method override must call super.setupRender().

Hope this is a bit clearer.

Then end result is that overriding render phase methods should now fit
better, conceptually, with how method overrides work in ordinary Java,
which is a good thing.


On Fri, Jun 20, 2008 at 5:55 PM, Bill Holloway [EMAIL PROTECTED] wrote:
 The JIRA on this states that the overridden method will be invoked
 only by the parent class, not the subclass.  So I have a page that
 inherits from a base page class.  Both have setupRender() on them.  I
 have no code in the parent class that actually invokes setupRender,
 but I hope it will be invoked.  Will it?

 --
 Bill @ PeoplePad

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





-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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