Re: Securing files on the classpath/webapp context (was: Re: Running Tapestry 5.0.18 on Google App Engine)

2009-08-27 Thread Michael Gerzabek
I must say I was a little bit shocked when I heard about this security 
hole and found an easy way within httpd (mod_rewrite) to circumvene this 
problem at first.


Thinking about how it should be I would prefer the 'blacklist 
everything'-approach. This way a dev never has to worry about what's 
opened up by deploying a third party jar.


Of course extra documentation is needed then to pre-answer mailing list 
questions like 'my packaged images don't show up' ...


Michael

Ulrich Stärk schrieb:
I really like to hear what the other devs (apart from Thiago) are 
thinking about this, whether there are objections against what I 
proposed or if you think there are better solutions. This really needs 
fixing ASAP.


Cheers,

Uli

On 26.08.2009 13:41 schrieb Ulrich Stärk:
> I think that's way too complicated. Keep it simple:
>
> a) blacklist everything and let the user contribute filenames, file
> extensions or paths to some whitelisting service (already having some
> reasonable defaults like .css, .js, .png, ...) which AssetSource 
queries

> before returning an Asset
> b) restrict the AssetSource to only return assets referenced in a
> component/page using @Path, @IncludeJavaScriptLibrary,
> @IncludeStylesheet and the context: and asset: binding prefixes
>
> Uli
>
> On 26.08.2009 13:19 schrieb Thiago H. de Paula Figueiredo:
>> Em Wed, 26 Aug 2009 04:12:29 -0300, Onno Scheffers 
>> escreveu:
>>
>>> @Thiago
>>> How about allowing absolutely nothing from the classpath/WEB-INF
>>> initially?
>>> Directory listing should also be disabled.
>>
>> I agree. My suggestion to TAP-815 was:
>>
>> "I would suggest to have a chain of command, each object in it
>> receiving the requested URL and responding true (ok), false (file is
>> forbidden) or null (this object doesn't handle this URL, ask the same
>> thing to the next object. This chain of command terminator would be a
>> very restrictive one."
>>
>

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




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



Re: T5.1: Get block by (page and block) names?

2009-08-27 Thread ThirstyCrow



Thiago H. de Paula Figueiredo wrote:
> 
> t:context="[property1, property2]"
> 

This is just what I want. Thanks again, Thiago.
-- 
View this message in context: 
http://www.nabble.com/T5.1%3A-Get-block-by-%28page-and-block%29-names--tp25151389p25183100.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: Running Tapestry 5.0.18 on Google App Engine

2009-08-27 Thread Robert Zeigler

Ah, right... blackbird was introduced in 5.1.
I could probably check for the symbol in the module and provide it if  
it doesn't otherwise exist.


Robert

On Aug 27, 2009, at 8/2712:44 AM , Alex Kotchnev wrote:


@Robert,
  thanks for releasing the 1.0.0 version. I added it, it seems to  
work OK,
with a minor issue. I'm using 5.0.18, and when I try to access a  
resource

that shouldn't be accessible, I get the following exception:


  - org.apache.tapestry5.ioc.internal.OperationExceptionSymbol
  'tapestry.blackbird.path' is not defined.
  trace
 - Realizing service RegexAuthorizer
 - Invoking
  
com.saiwaisolutions.tapestry.services.RegexAuthorizer(Collection) (at

 RegexAuthorizer.java:29) via
  
com 
.saiwaisolutions 
.tapestry.services.AssetProtectionModule.bind(ServiceBinder)

 (at AssetProtectionModule.java:19)
 - Collecting unordered configuration for service RegexAuthorizer
 - Invoking method
  
com 
.saiwaisolutions 
.tapestry 
.services 
.AssetProtectionModule.contributeRegexAuthorizer(Configuration,

 String, String, String) (at AssetProtectionModule.java:49).
 - Determining injection value for parameter #3 (java.lang.String)
 -


  It seems like 5.1 defines this symbol out of the box, while 5.0.18
  doesn't. Adding the symbol addresses the issue


NICE WORK !

Cheers,

Alex K


On Wed, Aug 26, 2009 at 1:55 PM, Robert Zeigler   
wrote:



Try version 1.0.0, just released today. ;)
See my comment on issue 815 for the maven url, artifact id, etc.

In any event, there's a framework solution in place already... it's  
just
that it's a blacklist-based solution instead of a whitelist-based  
solution.
Although whitelist-based security tends to be more secure,  
blacklisting has
its merits.  For a webapp, for example, there's often a lot more  
that you
want accessible than otherwise (all of  
your .png, .jpg, .jpeg, .gif, .js,
.css files, for example).  The solution I wrote allows for pattern- 
based

whitelisting, but that can be dangerous: it's awfully easy to write a
pattern that isn't as secure as you think it is.  Anyway, just food  
for
thought... you can contribute to the framework as is and have it  
immediately
block access to dangerous resources for you.  In fact, you could  
write a
standalone module that does nothing other than contribute your  
blacklist
preferences (eg: *.xml, *.class, etc.), then just add that module  
as a

dependency for any new project. *shrug*

Robert


On Aug 26, 2009, at 8/261:21 AM , Alex Kotchnev wrote:

Christian,
you seem to indicate that there's an easy fix for this on the  
mailing
list; however, the last discussion there is from around 2007; the  
module
that Robert is referring to is out of date (e.g. referring to old  
package

names, etc). Any other tips on addressing this ?

I'm completely taken aback by such a gaping security hole in the
framework. Considering that this issue has been known since 2007,  
I'm
completely blown away that the framework doesn't provide a  
solution in T5

(not in T5.1).

Cheers,

Alex K

On Tue, Aug 25, 2009 at 8:44 AM, Christian Riedel
wrote:

FYI you should (all) be aware of TAP-815*! Your assets** are  
readable for

everybody!
It is certainly not as critical as in some pages named in this  
thread***

but in general it could cause some bad reputation for T5.

Apart from that I just can say: nice work! ;)


*jira ticket:
https://issues.apache.org/jira/browse/TAP5-815

**example asset
http://ping-service.appspot.com/assets/META-INF/persistence.xml

***


http://www.nabble.com/-REQUEST--Live-T5-web-sites%2C-quotes%2C-marketting-ts23050433s302.html#a23054798

easy workaround:


http://www.nabble.com/-T5--Security-of-files-in-the-classpath-ts11816097s302.html#a11816097


regards
christian


Dmitry Gusev schrieb:

FYI



Here is the running t5 app: http://ping-service.appspot.com/

It uses T5.0.18 + Spring 3.0.0M4/JPA + Google
Datastore/Mail/Cron/URLFetch/Google Accounts Security

Works pretty well.

I had to implement some hacks to develope with t5 on local dev  
server

(t5
error page refuse to work properly there by default, but works  
ok in

appengine cloud), here is the solution:



http://dmitrygusev.blogspot.com/2009/08/turn-java-security-manager-off-in.html





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





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





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



Re: t5: archetype create for 5.1.0.5

2009-08-27 Thread John Owen Atala

The problem is Your First Application on Tutorial1 is still using the wrong
one.

http://tapestry.apache.org/tapestry5.1/tutorial1/first.html


Ulrich Stärk wrote:
> 
> http://tapestry.apache.org/tapestry5.1/quickstart/
> 
> Am 13.05.2009 10:31 schrieb Angelo Chen:
>> Hi,
>> This creates a project for 5.0.18:
>> mvn archetype:create -DarchetypeGroupId=org.apache.tapestry
>> -DarchetypeArtifactId=quickstart -DgroupId=org.example -DartifactId=myapp
>> -DpackageName=org.example.myapp -DarchetypeVersion=5.0.18
>> 
>> and this does not create a project for 5.1.0.5:
>> 
>> mvn archetype:create -DarchetypeGroupId=org.apache.tapestry
>> -DarchetypeArtifactId=quickstart -DgroupId=org.example -DartifactId=myapp
>> -DpackageName=org.example.myapp -DarchetypeVersion=5.1.0.5
>> 
>> instead, it gives error:
>> [ERROR] BUILD ERROR
>> [INFO]
>> 
>> [INFO] Error creating from archetype
>> 
>> Embedded error: The META-INF/maven/archetype.xml descriptor cannot be
>> found.
>> why?
>> 
>> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/t5%3A-archetype-create-for-5.1.0.5-tp23517591p25182698.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T5.1: Get block by (page and block) names?

2009-08-27 Thread Thiago H. de Paula Figueiredo
Em Thu, 27 Aug 2009 21:41:27 -0300, ThirstyCrow <5451vs5...@gmail.com>  
escreveu:



But how to express "a list of strings" in the template?


Two ways, and they work for other types besides String:

t:context="[property1, property2]"

or

t:context="context"

public List getContext() {
List list = new ArrayList();
list.add(property1);
list.add(property2);
return list;
}

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: T5.1: Get block by (page and block) names?

2009-08-27 Thread ThirstyCrow



Thiago H. de Paula Figueiredo wrote:
> 
> Em Thu, 27 Aug 2009 02:35:55 -0300, ThirstyCrow <5451vs5...@gmail.com>  
> escreveu:
> 
>> it works. However, the solution is still a little ugly. As you see, I  
>> have to manually split the parameter to get the page and block names. I  
>> tried the  two-parameter method: Object onAction(String page, String  
>> block), but
>> tapestry failed to call it.
> 
> Your context should be a List of strings, the page as the first element,  
> the block as the second. Thus, your onAction(String page, String block)  
> will be invoked.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 

But how to express "a list of strings" in the template? The only way I know
is to join the strings with "/"s between them:
Home
The template above generates the following link:
   
http://localhost:8080/T5/index.globallayout.actionlink_0/Index$002fcontent
which cause the trouble. The "$002f" is indeed decoded back to "/", but it
seems the decoding happens later than the choice of event handler. Is this a
bug? Anyway, is there other ways to assign a list of strings to the context
attribute?

-- 
View this message in context: 
http://www.nabble.com/T5.1%3A-Get-block-by-%28page-and-block%29-names--tp25151389p25182304.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: Problems with FormFragment and Zone update

2009-08-27 Thread Thiago H. de Paula Figueiredo

Em Thu, 27 Aug 2009 15:11:20 -0300, Stefan  escreveu:


Thanks Thiago,


You're welcome!


Do you have still any idea?


Unfortunately, no. Remote debugging is quite hard . . . :P

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



[Tapestry Central] Return to Independent Consulting

2009-08-27 Thread Howard
I'd like to announce to the Tapestry community that I've returned to
independent consulting. As an independent consultant, I'll have more
opportunities to pursue training, mentoring, and project work that did
not fit with Formos' overall goals.
Formos continues to be committed to Tapestry, and to maintaining the
Tapestry360 web site. I'd like to thank Matt Tunnel, President of
Formos, for the opportunities he's provided: a "dream job" that let me
focus on completing Tapestry 5.0 and 5.1, with a scope of features far
beyond what I had originally envisioned when I started Tapestry 5 over
four years ago.
Now is a new chapter; I'm starting to search for my next dream job,
while actively seeking out new Tapestry training, mentoring and support
projects, as well as working with my existing clients. In addition, I'm
using my improved freedom to pursue other important technologies beyond
Tapestry, such as Clojure, Cappuccino, and CouchDB. I expect to be able
to offer the same kind of compelling training and project work in these
technologies as I currently provide for Tapestry.
I'm also taking this time to pursue one of the opportunities I could
not take on while at Formos: a Tapestry 5 book. I'm currently
contacting a number of different publishers to find the best home for a
new book specifically about Tapestry 5.
I'd also like to thank the Tapestry community for all the enthusiasm
and dedication that you've given to Tapestry. I'm looking forward to
helping you create even more insanely great applications!

--
Posted By Howard to Tapestry Central at 8/27/2009 10:56:00 AM

Re: Problems with FormFragment and Zone update

2009-08-27 Thread Stefan

Thanks Thiago,

but unfortunately no improvement.



 Anyway, you need to add zone="addEditFormZone" to 

I have changed that.


My event handler returns  "qTypeZone.getBody()"

Do you have still any idea?



Am 27.08.2009 um 19:00 schrieb Thiago H. de Paula Figueiredo:

Em Thu, 27 Aug 2009 13:44:25 -0300, Stefan   
escreveu:



Sorry, it gives me the same error:

No object of type org.apache.tapestry5.services.FormSupport is
available from the Environment. ...
And here is what i have changed:




... same as in first post





Are your returning the addEditFormZone in your event handler method?  
Anyway, you need to add zone="addEditFormZone" to 


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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






smime.p7s
Description: S/MIME cryptographic signature


Re: how to enable default js and css stack?

2009-08-27 Thread Alfonso Quiroga
Thanks! I think a nice way is using IncludeJavascript annotation, now
is working fine

On Thu, Aug 27, 2009 at 1:34 PM, Howard Lewis Ship wrote:
> Inject @Environmental RenderSupport
>
> Invoking any of its JavaScript related functions will automatically
> trigger the inclusion of the client infrastructure (all that JS and
> CSS).
>
> Using @InlcudeJavaScriptLibrary does the same (under the covers, its a
> call to the RenderSupport.addScriptLink(). ).
>
>
> On Thu, Aug 27, 2009 at 1:24 AM, Inge Solvoll wrote:
>> Check the tapestry sources, I fond this now in Autocompleter mixin:
>>
>> @IncludeJavaScriptLibrary({"${tapestry.scriptaculous}/controls.js",
>> "autocomplete.js"})
>>
>> On Thu, Aug 27, 2009 at 9:39 AM, Alfonso Quiroga 
>> wrote:
>>
>>> I have a little problem, if I use some t5component that needs the full
>>> js stack (declared in ClientInfrastructure), it writes in  the
>>> libs, and no problem.
>>> But if I have a plain page with no t5 components, so none of that
>>> js-libs are (prototype, etc)
>>> My problem is that I created a component that NEEDS prototype, etc..
>>> but that libs are not referenced!! So I MUST put a t5component in my
>>> page (like EventLink) that internally uses the default js stack.
>>>
>>> So... how can I explain to T5 that my new component needs the default
>>> js stack? Thanks in advance!
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>>
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

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



T5.1: Nested/indrect message: values

2009-08-27 Thread Michael Gentry
Hi everyone,

I'm trying to use the message catalog to look up values in a loop.  I
have a List of enums and bind the loop's source to contentAreas and
the value to contentArea.  I'm then trying to extract a value from the
message catalog with:

${message:${contentArea}-name}

I was hoping ${contentArea} would get replaced by the value of my enum
(let's say FOO) and get substituted so that it then did a
${message:FOO-name}, but instead I get this error:

[[missing key: ${contentArea.name]]-name}

I also tried: ${message:${contentArea}}

My .properties file looked something like this:

FOO = Some Value
FOO-name = Some Value

Can this be done?

Thanks,

mrg

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



Chenillekit which jira

2009-08-27 Thread Sebastian HennebrŸüder

Hello,

the chenillekit website names the google issue tracking 
http://www.chenillekit.org/issue-tracking.html


whereas Tapestry360 has a tracker as well. Which one should be used?

--
Best Regards / Viele Grüße

Sebastian Hennebrueder

-
http://www.laliluna.de
Laliluna.de, Berliner Strasse 22, 61118 Bad Vilbel, Germany

* Java Software Development, Support
* Training for Hibernate, EJB3 and Spring
* Tutorials for JSP, JavaServer Faces, Struts, Hibernate and EJB




smime.p7s
Description: S/MIME Cryptographic Signature


Re: T5Eclipse patch

2009-08-27 Thread akira

I think the project home is here:

http://tapestry.formos.com/wiki/display/t5eclipse/Home

On Aug 27, 2009, at 11:32 PM, users-digest-h...@tapestry.apache.org  
wrote:



From: Erik Putrycz 
Date: August 27, 2009 4:38:52 AM JST
To: users@tapestry.apache.org
Subject: T5Eclipse patch



Is someone still in charge of T5Eclipse? I fixed a small annoying  
bug that
causes bunch of NPEs but I have no clue what is the good place to  
submit

patches.

Erik.




Re: Problems with FormFragment and Zone update

2009-08-27 Thread Thiago H. de Paula Figueiredo

Em Thu, 27 Aug 2009 13:44:25 -0300, Stefan  escreveu:


Sorry, it gives me the same error:

No object of type org.apache.tapestry5.services.FormSupport is
available from the Environment. ...
And here is what i have changed:




... same as in first post





Are your returning the addEditFormZone in your event handler method?  
Anyway, you need to add zone="addEditFormZone" to 


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: Problems with FormFragment and Zone update

2009-08-27 Thread Stefan

Sorry, it gives me the same error:

No object of type org.apache.tapestry5.services.FormSupport is  
available from the Environment. ...


And here is what i have changed:




... same as in first post






Am 27.08.2009 um 18:26 schrieb Thiago H. de Paula Figueiredo:

Em Thu, 27 Aug 2009 13:03:46 -0300, Stefan   
escreveu:



I tried the workaround and surrounded the whole form with a zone,
but it does not work.


How does it not work? You didn't describe the error, so we cannot  
help you here.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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






smime.p7s
Description: S/MIME cryptographic signature


Re: how to enable default js and css stack?

2009-08-27 Thread Howard Lewis Ship
Inject @Environmental RenderSupport

Invoking any of its JavaScript related functions will automatically
trigger the inclusion of the client infrastructure (all that JS and
CSS).

Using @InlcudeJavaScriptLibrary does the same (under the covers, its a
call to the RenderSupport.addScriptLink(). ).


On Thu, Aug 27, 2009 at 1:24 AM, Inge Solvoll wrote:
> Check the tapestry sources, I fond this now in Autocompleter mixin:
>
> @IncludeJavaScriptLibrary({"${tapestry.scriptaculous}/controls.js",
> "autocomplete.js"})
>
> On Thu, Aug 27, 2009 at 9:39 AM, Alfonso Quiroga 
> wrote:
>
>> I have a little problem, if I use some t5component that needs the full
>> js stack (declared in ClientInfrastructure), it writes in  the
>> libs, and no problem.
>> But if I have a plain page with no t5 components, so none of that
>> js-libs are (prototype, etc)
>> My problem is that I created a component that NEEDS prototype, etc..
>> but that libs are not referenced!! So I MUST put a t5component in my
>> page (like EventLink) that internally uses the default js stack.
>>
>> So... how can I explain to T5 that my new component needs the default
>> js stack? Thanks in advance!
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

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



Re: Problems with FormFragment and Zone update

2009-08-27 Thread Thiago H. de Paula Figueiredo

Em Thu, 27 Aug 2009 13:03:46 -0300, Stefan  escreveu:


I tried the workaround and surrounded the whole form with a zone,
but it does not work.


How does it not work? You didn't describe the error, so we cannot help you  
here.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: t5: Dynamic Forms & Grids

2009-08-27 Thread Thiago H. de Paula Figueiredo

Em Thu, 27 Aug 2009 13:06:14 -0300, Sparqle  escreveu:


Hi Thiago,


Hi!


Based on your post, I am thinking that this type of behavior is not
supported by T5.


I would say that it is supported, but out-of-the-box you would be way  
better supported if not using this modeling you're using.



I am wondering whether the "if" component, and the
"AjaxFormLoop" could combine to simulate this same functionality.


Take a look at how BeanEditor works. Maybe it could help you.


For the
Grids though, I am not sure whether I can achieve this result without
predefined classes.


You can work with Grid without predefined classes. Internally, Grid uses a  
BeanModel (that can be passed as a parameter) to get the properties of the  
object and their values. Take a look at BeanModel and PropertyConduit.



This has to be a common requirement for many sites. I know some of the
largest sites on the Internet use this type of a system.


Could you give use some examples?

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: t5: Dynamic Forms & Grids

2009-08-27 Thread Sparqle

Hi Thiago,

Thanks for reviewing my long post and responding. I understand your concerns
about the database schema not being ideal, but creating separate Java
classes for each one of the "itemtypes" is not acceptable as we are planning
to create a site where end-users can define their own categories and
attributes and the associated UI controls. There could be hundreds of
thousands of these categories and millions of attributes.

Based on your post, I am thinking that this type of behavior is not
supported by T5. I am wondering whether the "if" component, and the
"AjaxFormLoop" could combine to simulate this same functionality. For the
Grids though, I am not sure whether I can achieve this result without
predefined classes.

This has to be a common requirement for many sites. I know some of the
largest sites on the Internet use this type of a system. I would appreciate
if you can point me to any other alternatives without "predefined" classes
for "Book", "DVD" etc in T5.



Thiago H. de Paula Figueiredo wrote:
> 
> Em Wed, 26 Aug 2009 21:14:01 -0300, sparqle 
> escreveu:
> 
>> Hi,
> 
> Hi!
> 
>> I would like to understand how to create dynamic forms and grids in T5.
> 
> T5 is all about static structure, dynamic behaviour.
> 
>> Now I would like to store all of item types (book, car, tv etc.) in 1  
>> database
>> table called "itemtypes", and all the attributes in one database table
>> called "attributes". Both these tables are linked by a many-to-many
>> relationship. I will create another table called "items", where the
>> individual items are stored ("Gone with the wind", "Lord of the Rings"
>> etc.). I will create another table called "itemAttributeValues" where the
>> values for the attributes for each item will be stored ("Gone with the  
>> wind" - 900 pages, "Margaret Mitchell", 1937).
> 
> I'm sorry to be so sincere, but this kind of database approach is  
> absolutely awful. Something awful enough to appear in TheDailyWTF.com (if  
> it wasn't featured there already). Tapestry 5 has BeanEditForm,  
> BeanEditor, Grid and BeanDisplay, all them time-savers when writing a form  
> or grid or object view, but they only work if you provide them  
> decently-modelled entity classes (a Book class with title and author  
> properties, a DVD class with title and director properties).
> 
>> Can anybody help me here?? I assume this must be a common requirement in
>> many systems!!
> 
> This is already implemented in Tapestry 5, as long as you have  
> decently-modelled classes.
> Take a look at the documentation of the components cited above and the  
> BeanEditor or BeanEditForm examples in  
> http://jumpstart.doublenegative.com.au:8080/jumpstart/.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/t5-Dynamic-Forms-Grids-tp3520407p3527617.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: Problems with FormFragment and Zone update

2009-08-27 Thread Stefan

Thank for the fast reply.

I think i understand the problem.
If i replace the nested form fragment with an static text, it works.
But it does not with the form fragment.
I tried the workaround and surrounded the whole form with a zone,
but it does not work.




Am 27.08.2009 um 17:43 schrieb Thiago H. de Paula Figueiredo:

Em Thu, 27 Aug 2009 12:06:16 -0300, Stefan   
escreveu:



Hi,


Hi!


Render queue error in BeginRender ... :
No object of type org.apache.tapestry5.services.FormSupport is
available from the Environment.


Tapestry requires a Form to be rendering to render a field. While  
rendering your zone, there wasn't a Form inside. A workaround is to  
surround the whole Form with a Zone.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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






smime.p7s
Description: S/MIME cryptographic signature


Re: Problems with FormFragment and Zone update

2009-08-27 Thread Thiago H. de Paula Figueiredo

Em Thu, 27 Aug 2009 12:06:16 -0300, Stefan  escreveu:


Hi,


Hi!


Render queue error in BeginRender ... :
No object of type org.apache.tapestry5.services.FormSupport is
available from the Environment.


Tapestry requires a Form to be rendering to render a field. While  
rendering your zone, there wasn't a Form inside. A workaround is to  
surround the whole Form with a Zone.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: T5Eclipse patch

2009-08-27 Thread Juan Miguel Salamanca
Hi Erik

T5Eclipse is hosted in tapestry.formos.com. If you get an account I will
give you access to the project so that you can make SVN changes.

I have been very busy recently and have not managed to fix some issues that
prevent continuous integration to work. By the way, I am using Tycho which
is an experimental library to build PDE projects via maven. Hopefully I will
be able to put some hours soon and make it work.

Regards,

Juan

On Wed, Aug 26, 2009 at 8:38 PM, Erik Putrycz  wrote:

>
> Is someone still in charge of T5Eclipse? I fixed a small annoying bug that
> causes bunch of NPEs but I have no clue what is the good place to submit
> patches.
>
> Erik.
>
> -
> Apption Software
> --
> View this message in context:
> http://www.nabble.com/T5Eclipse-patch-tp25155484p25155484.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Expansions, projections and arrays

2009-08-27 Thread Sebastian Hennebrueder

Kalle Korhonen schrieb:

Sebastian, I appreciate the try. But I needed an avg of a field and
considering that I don't know how to write it in plain sql either
without the avg being used in the result, I think it cannot be done
with Criteria either.

Kalle


In that case, there is no other way.


On Thu, Aug 27, 2009 at 1:38 AM, Sebastian
Hennebrueder wrote:

I am just hitting for the bonus.

You don't need projections for ordering just order on a field. if the
ordering takes place in a relation, then create an alias and use it in the
order condition.


Best Regards / Viele Grüße

Sebastian Hennebrueder
-
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de



Kalle Korhonen schrieb:

I'm using tapestry-hibernate and I have a case where I'm forced to use
Projections (or aggregate functions in hql but same end result) so my
query is returning an object array. Now, I'm rendering a list of that
information to the user, but since using ${obj[0]} expansion is not
supported, I'm forced to write a getter for each synthetic property
(so I can refer to them with ${objProp1}, ${objProp2} etc.) I'm
displaying in my grid. It's not too bad, but is there a better way to
do this? (could do it with ognl, but I would like to avoid adding a
new dependency just for this).

Kalle

PS. Bonus points if you tell me how to make Hibernate return objects
with Criteria api if I only need projections for ordering the result
set.

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





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




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






--
Best Regards / Viele Grüße

Sebastian Hennebrueder
-
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de



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



Testify and Tapestry 5.0.18

2009-08-27 Thread Szemere Szemere
Excuse my ignorance, does Testify work with Tapestry 5.0.18? The current
version of Testify seems to require Tapestry 5.1.05.  Is there a version
that works with 5.0.18>

Szemere


Problems with FormFragment and Zone update

2009-08-27 Thread Stefan

Hi,

i have some trouble with a zone update.
A nested formFragment (within a zone) should be switched in/visible  
dependend on a -selection


Below i have included a snippet from the source:



 :

		Updatet:actionlink>





 :







The problem is that there will be an exception (below) thrown and i  
have no idea whats going wrong here.

What should i do to get this working?

Thanks in advance,
Stefan



Render queue error in BeginRender ... :
No object of type org.apache.tapestry5.services.FormSupport is  
available from the Environment.

Available types are
org.apache.tapestry5.RenderSupport,
org.apache.tapestry5.ValidationDecorator,
org.apache.tapestry5.internal.services.DocumentLinker,
org.apache.tapestry5.services.ClientBehaviorSupport,
org.apache.tapestry5.services.Heartbeat.

smime.p7s
Description: S/MIME cryptographic signature


Re: Expansions, projections and arrays

2009-08-27 Thread Kalle Korhonen
Sebastian, I appreciate the try. But I needed an avg of a field and
considering that I don't know how to write it in plain sql either
without the avg being used in the result, I think it cannot be done
with Criteria either.

Kalle


On Thu, Aug 27, 2009 at 1:38 AM, Sebastian
Hennebrueder wrote:
> I am just hitting for the bonus.
>
> You don't need projections for ordering just order on a field. if the
> ordering takes place in a relation, then create an alias and use it in the
> order condition.
>
>
> Best Regards / Viele Grüße
>
> Sebastian Hennebrueder
> -
> Software Developer and Trainer for Hibernate / Java Persistence
> http://www.laliluna.de
>
>
>
> Kalle Korhonen schrieb:
>>
>> I'm using tapestry-hibernate and I have a case where I'm forced to use
>> Projections (or aggregate functions in hql but same end result) so my
>> query is returning an object array. Now, I'm rendering a list of that
>> information to the user, but since using ${obj[0]} expansion is not
>> supported, I'm forced to write a getter for each synthetic property
>> (so I can refer to them with ${objProp1}, ${objProp2} etc.) I'm
>> displaying in my grid. It's not too bad, but is there a better way to
>> do this? (could do it with ognl, but I would like to avoid adding a
>> new dependency just for this).
>>
>> Kalle
>>
>> PS. Bonus points if you tell me how to make Hibernate return objects
>> with Criteria api if I only need projections for ordering the result
>> set.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

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



Re: How to inject component of the layout component into the page

2009-08-27 Thread Thiago H. de Paula Figueiredo
Em Thu, 27 Aug 2009 05:39:51 -0300, Sebastian HennebrŸüder  
 escreveu:



Hello,


Hi!


my page uses a layout component.
The layout has my self made t:messages component to display messages.
I need this component injected into the page as I want to return it as
zone update.
Tapestry keeps telling me, that the messages component is not included
in the page template.


Give a t:id to your layout component and then @InjectComponent it in your  
page.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: T5.1: Get block by (page and block) names?

2009-08-27 Thread Thiago H. de Paula Figueiredo
Em Thu, 27 Aug 2009 02:35:55 -0300, ThirstyCrow <5451vs5...@gmail.com>  
escreveu:


it works. However, the solution is still a little ugly. As you see, I  
have to manually split the parameter to get the page and block names. I  
tried the  two-parameter method: Object onAction(String page, String  
block), but

tapestry failed to call it.


Your context should be a List of strings, the page as the first element,  
the block as the second. Thus, your onAction(String page, String block)  
will be invoked.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: t5: Dynamic Forms & Grids

2009-08-27 Thread Thiago H. de Paula Figueiredo

Em Wed, 26 Aug 2009 21:14:01 -0300, sparqle  escreveu:


Hi,


Hi!


I would like to understand how to create dynamic forms and grids in T5.


T5 is all about static structure, dynamic behaviour.

Now I would like to store all of item types (book, car, tv etc.) in 1  
database

table called "itemtypes", and all the attributes in one database table
called "attributes". Both these tables are linked by a many-to-many
relationship. I will create another table called "items", where the
individual items are stored ("Gone with the wind", "Lord of the Rings"
etc.). I will create another table called "itemAttributeValues" where the
values for the attributes for each item will be stored ("Gone with the  
wind" - 900 pages, "Margaret Mitchell", 1937).


I'm sorry to be so sincere, but this kind of database approach is  
absolutely awful. Something awful enough to appear in TheDailyWTF.com (if  
it wasn't featured there already). Tapestry 5 has BeanEditForm,  
BeanEditor, Grid and BeanDisplay, all them time-savers when writing a form  
or grid or object view, but they only work if you provide them  
decently-modelled entity classes (a Book class with title and author  
properties, a DVD class with title and director properties).



Can anybody help me here?? I assume this must be a common requirement in
many systems!!


This is already implemented in Tapestry 5, as long as you have  
decently-modelled classes.
Take a look at the documentation of the components cited above and the  
BeanEditor or BeanEditForm examples in  
http://jumpstart.doublenegative.com.au:8080/jumpstart/.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: Testify and Injecting Services from IOC Registry

2009-08-27 Thread Paul Field
"Mark W. Shead"  wrote on 26/08/2009 15:58:05:
> I am using the Selenium testing so I'm subclassing from 
> AbstractIntegrationTestSuite in  tapestry-test.

Ahhh The key thing about the TapestryTest superclasses in Testify is 
that they orchestrate the annotation processing and test scope quite 
carefully. You can't use them in conjunction with the 
AbstractIntegrationTestSuite from tapestry-test (as you need to subclass 
both).

So, you'll need to write a custom superclass for your tests that extends 
AbstractIntegrationTestSuite and then make sure all your test classes 
extend it. Something like this:


public abstract class MyAbstractIntegrationTest extends 
AbstractIntegrationTestSuite {
protected static final TapestryTester tester = new TapestryTester(
"com.myapp.tapestry5", "app", PageTester.DEFAULT_CONTEXT_PATH);
 
@BeforeClass(alwaysRun=true)
public final void processInjectAnnotation() {
tester.injectInto(this);
}

 
@BeforeMethod(alwaysRun=true)
public final void setUp() throws Exception {
  // Put any other general setup here such as: 
Mockito.initMocks(this)
doSetUp();
tester.collectForComponentsFrom(this);
}


/**
 * Override this instead of {...@link #setUp()}
 */
protected void doSetUp() throws Exception {
// Do nothing by default
}


@AfterMethod
public final void tearDown() throws Exception {
tester.endTest();
}
}

Let me know how that goes and I can add it to Testify as another 
integration.

Paul


---

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and delete this e-mail. Any unauthorized copying, 
disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional 
EU corporate and regulatory disclosures.

Re: actionliks and XHR response problem

2009-08-27 Thread Janko Muzykant

i did a few more investigations and there is one thing i can't understand.
this is how problematic requests look like:

Host:   localhost:8080
User-Agent: Mozilla/5.0 (X11; U; Linux i686; pl; rv:1.9.1.1) Gecko/20090715
Firefox/3.5.1
Accept: text/javascript, text/html, application/xml, text/xml, */*
Accept-Language: pl,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
X-Requested-With: XMLHttpRequest
X-Prototype-Version: 1.6.1_rc2
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: http://localhost:8080/my-webapp/identity
Content-Length: 0
Cookie: blackbird={"pos": 1, "size": 0, "load": null};
JSESSIONID=1k1mtrom1uxhy

and following is the answer:

X-Tapestry-ErrorMessage: A component event handler method returned the value
Block[reportBlock within Identity, at
classpath:org/myapp/tapestry/pages/Identity.tml, line 172]. Return type
org.apache.tapestry5.internal.structure.BlockImpl can not be handled.
Configured return types are java.lang.Class, java.lang.String, java.net.URL,
org.apache.tapestry5.Link, org.apache.tapestry5.StreamResponse,
org.apache.tapestry5.runtime.Component.
Content-Type: text/html; charset=utf-8
Content-Encoding: gzip
Transfer-Encoding: chunked
Server: Jetty(6.1.12rc1)


the question is, how it is possible that T5.1.0.5 rejects Block as response
to ajax request? 'X-Requested-With" header confirms that it was XHR for
sure.

cheers,
m.



Janko Muzykant wrote:
> 
> hi guys,
> 
> this is quite strange, but i noticed that actionlinks "sometimes" return
> unexpected results. i have a page containing lot of actionlinks
> changing/updating certain elements via ajax request/response. from java
> side it's nothing more than just returning a block or MultiZoneUpdate as a
> result of action. sounds simple. surprisingly it's enough to wait a few
> minutes, click the same (working correctly so far) action link to get an
> error saying that Tapestry was not expecting a Block in result but a
> String rather.
> 
> to be sure, I changed the way how I return a block, detecting first if i'm
> really answering to ajax request:
> 
>   return request.isXHR() ? myBlock : null;
> 
> and guess what. i started receiving whole the page (instead of blocks) in
> ajax responses! that obviously resulted in blackbird message "reply is
> null".
> 
> again, problem is not simply reproducible but i noticed it's enough to
> wait a few minutes to observe this strange behavior. it's also enough to
> click the link again to get a correct response. for sure it has nothing to
> do with my session expiration (set to 30 minutes) and I have no other
> "timeouting" mechanisms.
> 
> could you please give me a hint what may be wrong here?
> 
> thanks,
> m.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/actionliks-and-XHR-response-problem-tp25148353p25167521.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: How to inject component of the layout component into the page

2009-08-27 Thread Kristian Marinkovic
have you tried returning the zone from a getter method 
within the layout component. this way any page that uses
this layout should be able to return the desired zone. i 
think this could work with a block as well.

g,
kris





Sebastian HennebrŸüder  
27.08.2009 10:39
Bitte antworten an
"Tapestry users" 


An
Tapestry users 
Kopie

Thema
How to inject component of the layout component into the page






Hello,

my page uses a layout component.
The layout has my self made t:messages component to display messages.

I need this component injected into the page as I want to return it as 
zone update.

Tapestry keeps telling me, that the messages component is not included 
in the page template.

How to solve this?

-- 
Best Regards / Viele Grüße

Sebastian Hennebrueder

-
http://www.laliluna.de
Laliluna.de, Berliner Strasse 22, 61118 Bad Vilbel, Germany

* Java Software Development, Support
* Training for Hibernate, EJB3 and Spring
* Tutorials for JSP, JavaServer Faces, Struts, Hibernate and EJB





How to inject component of the layout component into the page

2009-08-27 Thread Sebastian HennebrŸüder

Hello,

my page uses a layout component.
The layout has my self made t:messages component to display messages.

I need this component injected into the page as I want to return it as 
zone update.


Tapestry keeps telling me, that the messages component is not included 
in the page template.


How to solve this?

--
Best Regards / Viele Grüße

Sebastian Hennebrueder

-
http://www.laliluna.de
Laliluna.de, Berliner Strasse 22, 61118 Bad Vilbel, Germany

* Java Software Development, Support
* Training for Hibernate, EJB3 and Spring
* Tutorials for JSP, JavaServer Faces, Struts, Hibernate and EJB




smime.p7s
Description: S/MIME Cryptographic Signature


Re: Expansions, projections and arrays

2009-08-27 Thread Sebastian Hennebrueder

I am just hitting for the bonus.

You don't need projections for ordering just order on a field. if the 
ordering takes place in a relation, then create an alias and use it in 
the order condition.



Best Regards / Viele Grüße

Sebastian Hennebrueder
-
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de



Kalle Korhonen schrieb:

I'm using tapestry-hibernate and I have a case where I'm forced to use
Projections (or aggregate functions in hql but same end result) so my
query is returning an object array. Now, I'm rendering a list of that
information to the user, but since using ${obj[0]} expansion is not
supported, I'm forced to write a getter for each synthetic property
(so I can refer to them with ${objProp1}, ${objProp2} etc.) I'm
displaying in my grid. It's not too bad, but is there a better way to
do this? (could do it with ognl, but I would like to avoid adding a
new dependency just for this).

Kalle

PS. Bonus points if you tell me how to make Hibernate return objects
with Criteria api if I only need projections for ordering the result
set.

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






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



Re: how to enable default js and css stack?

2009-08-27 Thread Inge Solvoll
Check the tapestry sources, I fond this now in Autocompleter mixin:

@IncludeJavaScriptLibrary({"${tapestry.scriptaculous}/controls.js",
"autocomplete.js"})

On Thu, Aug 27, 2009 at 9:39 AM, Alfonso Quiroga wrote:

> I have a little problem, if I use some t5component that needs the full
> js stack (declared in ClientInfrastructure), it writes in  the
> libs, and no problem.
> But if I have a plain page with no t5 components, so none of that
> js-libs are (prototype, etc)
> My problem is that I created a component that NEEDS prototype, etc..
> but that libs are not referenced!! So I MUST put a t5component in my
> page (like EventLink) that internally uses the default js stack.
>
> So... how can I explain to T5 that my new component needs the default
> js stack? Thanks in advance!
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


how to enable default js and css stack?

2009-08-27 Thread Alfonso Quiroga
I have a little problem, if I use some t5component that needs the full
js stack (declared in ClientInfrastructure), it writes in  the
libs, and no problem.
But if I have a plain page with no t5 components, so none of that
js-libs are (prototype, etc)
My problem is that I created a component that NEEDS prototype, etc..
but that libs are not referenced!! So I MUST put a t5component in my
page (like EventLink) that internally uses the default js stack.

So... how can I explain to T5 that my new component needs the default
js stack? Thanks in advance!

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