Re: [5.3] JSONArray Error while submitting forms

2011-12-06 Thread Gunnar Eketrapp
if (raw != null && *!raw.isEmpty() &&*
new *JSONArray(raw)*.getString(1).equals

This seems to have solved the problem.

I made this fix in *Form.java, Submit.java* and *LinkSubmit.java*. Built
and installed my own 5.3.1 in my local maven repo.

Rebuilt my project and now I can login and run the app again.

It has been been very quiet in this thread ...

Can anyone (that understands web development) give a comment ... please ...

Thanks in advance,
Gunnar Eketrapp



2011/12/6 Gunnar Eketrapp 

> A possible solution would be to make a code around in the method
> isFormCancelled() in Form.java.
>
> /Gunnar
>
>
>
>
>
>   if (raw != null &&
> new *JSONArray(raw)*
> .getString(1).equals(InternalConstants.CANCEL_NAME))
> {
> return true;
> }
> 
>
>
>   if (raw != null && *!raw.isEmpty() &&*
> new *JSONArray(raw)*
> .getString(1).equals(InternalConstants.CANCEL_NAME))
> {
> return true;
> }
>
>
>
> 2011/12/6 Seamus 
>
>> Anyone have a solution to this. I have a form which I dont believe is
>> making
>> use of any ajax (unless tapestry is and I dont know about it I am using
>> the
>> current T5.3 release) and I get this error. When inspecting my page in
>> chrome and looking at the resources I see prototype 1.7 and scriptaculous
>> 1.9.
>>
>> I dont see any other versions loaded for me to try and remove.
>>
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/5-3-JSONArray-Error-while-submitting-forms-tp5011831p5052214.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
>>
>>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 070-991 86 42]
> Allévägen 2A, 132 42 Saltsjö-Boo
>



-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: Tapestry 5.3 and tapestry5-cayenne

2011-12-06 Thread Robert Zeigler
P.S. - unfortunately, I never finished the tutorial referenced below, and it 
cuts out before you get a chance to really see the benefit of the integration 
module.

Robert

On Dec 6, 2011, at 12/610:01 PM , Seamus Minogue wrote:

> So I dont get it. I have used Tapestry/Cayenne in several projects and 
> integration is basically nothing. Just a filter and making sure you drop the 
> xml files into src/main/resources if I remember correctly. I was looking at 
> the project page for tapestry5-cayenne 
> (http://code.google.com/p/tapestry5-cayenne/ & 
> http://t5cayenne.saiwai-solutions.com/tutorial/) and its just not very clear 
> to me exactly what this project buys me. 
> 
> Anyone used this that can point me at what using this gets me?
> 
> -Seamus
> 
> 
> - Original Message -
> From: Hugi Thordarson 
> To: Tapestry users 
> Cc: 
> Sent: Monday, December 5, 2011 7:55 AM
> Subject: Re: Tapestry 5.3 and tapestry5-cayenne
> 
> Hi Dragan.
> Thank you, this will definitely be useful for us.
> 
> Cheers,
> - hugi
> 
> PS: I'm impressed with the helpfulness of the community!
> 
> 
> On 5.12.2011, at 10:41, Dragan Sahpaski wrote:
> 
>> Hi,
>> I haven't used  tapestry5-cayenne, but I'd like to point you to another
>> project that uses Cayenne with tapestry, if you like to browse it and see
>> how cayenne is used in this project.
>> 
>> https://github.com/bobharner/Tapestry-finder
>> 
>> Hope it helps.
>> 
>> Cheers,
>> Dragan Sahpaski
>> 
>> 
>> 
>> On Mon, Dec 5, 2011 at 11:31 AM, Hugi Thordarson  wrote:
>> 
>>> Hi all!
>>> 
>>> First time Tapestry user here, just started coding this weekend and liking
>>> it so far.
>>> 
>>> Now, for my first question: I'm using Cayenne (3.0.2) so I just downloaded
>>> the tapestry5-cayenne extension (0.5-snapshot) and installed it. Now, when
>>> I start my application, I get the following exception:
>>> 
>>> --
>>> 
>>> 2011-12-05 10:29:57.846::WARN:  Failed startup of context
>>> org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@7817bcd4
>>> {/tap,/Users/hugi/Documents/workspace/tap/src/main/webapp}
>>> java.lang.RuntimeException: Exception loading module(s) from manifest
>>> jar:file:/Users/hugi/.m2/repository/com/googlecode/tapestry5-cayenne/tapestry5-cayenne-server/0.5-SNAPSHOT/tapestry5-cayenne-server-0.5-SNAPSHOT.jar!/META-INF/MANIFEST.MF:
>>> Failure loading Tapestry IoC module class
>>> com.googlecode.tapestry5cayenne.services.TapestryCayenneModule: Error
>>> invoking service binder method
>>> com.googlecode.tapestry5cayenne.services.TapestryCayenneCoreModule.bind(ServiceBinder)
>>> (at TapestryCayenneCoreModule.java:93):
>>> org/apache/tapestry5/PrimaryKeyEncoder
>>>at
>>> org.apache.tapestry5.ioc.IOCUtilities.addModulesInManifest(IOCUtilities.java:123)
>>>at
>>> org.apache.tapestry5.ioc.IOCUtilities.addDefaultModules(IOCUtilities.java:77)
>>>at
>>> org.apache.tapestry5.internal.TapestryAppInitializer.(TapestryAppInitializer.java:124)
>>> 
>>> [ … ]
>>> 
>>> Caused by: java.lang.RuntimeException: Failure loading Tapestry IoC module
>>> class com.googlecode.tapestry5cayenne.services.TapestryCayenneModule: Error
>>> invoking service binder method
>>> com.googlecode.tapestry5cayenne.services.TapestryCayenneCoreModule.bind(ServiceBinder)
>>> (at TapestryCayenneCoreModule.java:93):
>>> org/apache/tapestry5/PrimaryKeyEncoder
>>>at
>>> org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:162)
>>>at
>>> org.apache.tapestry5.ioc.IOCUtilities.addModulesInList(IOCUtilities.java:137)
>>>at
>>> org.apache.tapestry5.ioc.IOCUtilities.addModulesInManifest(IOCUtilities.java:107)
>>> 
>>> --
>>> 
>>> Any ideas what might be happening?
>>> 
>>> Cheers,
>>> - hugi
>>> -
>>> 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
> 


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



Re: Tapestry 5.3 and tapestry5-cayenne

2011-12-06 Thread Robert Zeigler
tapesty5-cayenne provides features on par with tapestry-jpa and 
tapestry-hibernate.

The really short list, for those in a hurry:

1) You get a ValueEncoder for your cayenne objects for free.
2) You get smarter handling of cayenne objects when creating BeanModels 
(automatic handling of entity relationships; automatic exclusion of various 
"undesirable" super-class properties)
3) Additional goodies that go a long way (in my experience, at least) to 
speeding up the implementation (esp. the prototyping) of Tapestry + Cayenne 
applications.


The long list for the select few who care:

1) No filter configuration required*
2) ValueEncoder implementation provided for you.
3) DI-based access to the ObjectContext (you can @Inject ObjectContextProvider 
into services; you can @Inject ObjectContext directly into pages and components)
4) DataType analyzer (and corresponding components) for handling relationships 
in beaneditor and grid, as well as automatic determination of whether the 
"String" property is a "text" or "longtext" based on the DbEntity metadata. 
5) Cayenne-oriented BeanModelSource that automatically excludes properties from 
the superclass that you typically don't want showing up in grids and 
beaneditors by default. 
6) Some additional annotations so tapestry/cayenne can be smarter about how to 
handle, eg, relationship (for instance, you can @Label a method on a Cayenne 
object, and also @DefaultOrder entities; then when tapestry5-cayenne builds a 
select list of objects for you, you get the label you want for the objects, in 
the order you want them)
7) EntityPersistence (ala tapestry-hibernate): persist only the entity id into 
the session when using @Persist in pages and components
8) @CommitAfter (also modeled on the corresponding annotation for 
tapestry-hibernate/tapestry-jpa)
9) CayenneConstraintGenerator - examines the metadata from the cayenne model 
and uses it to determine validation constraints for entities. Eg: it can tell 
that a property is required based on the database nullability of the property. 
It also picks up on char and varchar limits and uses those to add "maxlength" 
constraints to properties.
10) two additional binding types; "ent" (for object entity) and "ejbql" for 
ejbql queries. These are intended primarily for rapid prototyping of 
applications. When used in conjunction with @Label and @DefaultOrder, you can 
achieve some very nice behavior very quickly. For instance:

User.java:

@DefaultOrder({User.LAST_NAME_PROPERTY, User.FIRST_NAME_PROPERTY})
public class User extends _User {}



Or, if you prefer:


.java:

@Component(parameters={"source=ent:user"})
private Grid userTable;

Voila. That's it. You now have a grid of user objects, sorted by default by 
lastName, firstName.  The underlying GridDataSource is doing things like 
performing a count query + only pulling out the current page of data from the 
db for you. It also supports multiple grid orderings (at the query level), so 
your grid can be sorted on multiple columns.

I've used tapestry5 + cayenne + tapestry5 cayenne to build a page that let's me 
select the type of object I'm interested in, the display a grid of that object 
type dynamically, including "edit" and "add new" links. Click on edit, get an 
ajax window with an editor for that entry in the row.  Keep in mind... it's 
/one/ page with /one/ grid. And it's /one/ page with /one/ beaneditform. 

The amount of application code required to support that is fairly miniscule 
(although the amount of code in Tapestry5, Cayenne, and tapestry5-cayenne that 
makes that sort of thing possible is substantial!)

Cheers,

Robert

* Version 3.1 of cayenne changed the naming setup of cayenne configuration 
files. Accordingly, you will usually need to contribute one symbol in 
contributeApplicationDefaults for cayenne to be "happy".


On Dec 6, 2011, at 12/610:01 PM , Seamus Minogue wrote:

> So I dont get it. I have used Tapestry/Cayenne in several projects and 
> integration is basically nothing. Just a filter and making sure you drop the 
> xml files into src/main/resources if I remember correctly. I was looking at 
> the project page for tapestry5-cayenne 
> (http://code.google.com/p/tapestry5-cayenne/ & 
> http://t5cayenne.saiwai-solutions.com/tutorial/) and its just not very clear 
> to me exactly what this project buys me. 
> 
> Anyone used this that can point me at what using this gets me?
> 
> -Seamus
> 
> 
> - Original Message -
> From: Hugi Thordarson 
> To: Tapestry users 
> Cc: 
> Sent: Monday, December 5, 2011 7:55 AM
> Subject: Re: Tapestry 5.3 and tapestry5-cayenne
> 
> Hi Dragan.
> Thank you, this will definitely be useful for us.
> 
> Cheers,
> - hugi
> 
> PS: I'm impressed with the helpfulness of the community!
> 
> 
> On 5.12.2011, at 10:41, Dragan Sahpaski wrote:
> 
>> Hi,
>> I haven't used  tapestry5-cayenne, but I'd like to point you to another
>> project that uses Cayenne with tapestry, if you like to browse it and see
>> how cayenn

Re: Template parsing vulnerable to whims of default charset

2011-12-06 Thread Robert Coie
On Tue, Dec 06, 2011 at 04:49:42PM -0800, Kalle Korhonen wrote:
> What's your JVM's file.encoding set to? (e.g. -Dfile.encoding=UTF-8).
> The default for most JVMs is *not* UTF-8. Tapestry assumes UTF-8
> throughout.
 
I believe it's US-ASCII, as checked by Charset.defaultCharset(),
although I have seen some other reports indicating that that may not be
reliable due to caching. It's not "my" JVM in the sense that I can't
change the settings - it's at the mercy of Google App Engine.

On Tue, Dec 6, 2011 at 4:58 PM, Thiago H. de Paula Figueiredo
 wrote:
> I configure my IDE to edit all files as UTF-8 to avoid problems and
> have
> consistency at the same time.

So do I. The file is UTF-8, and when the application is run under the
local appengine simulator, the Charset.defaultCharset() check mentioned
above indicates UTF-8.

I just think it would be preferable if Tapestry could eliminate all
behavior reliant on the JVM's default charset.

Thank you both for taking the time to reply.

-- 
Robert Coie
Implementor, Apropos K.K.

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



Re: Tapestry 5.3 and tapestry5-cayenne

2011-12-06 Thread Seamus Minogue
So I dont get it. I have used Tapestry/Cayenne in several projects and 
integration is basically nothing. Just a filter and making sure you drop the 
xml files into src/main/resources if I remember correctly. I was looking at the 
project page for tapestry5-cayenne (http://code.google.com/p/tapestry5-cayenne/ 
& http://t5cayenne.saiwai-solutions.com/tutorial/) and its just not very clear 
to me exactly what this project buys me. 

Anyone used this that can point me at what using this gets me?

-Seamus


- Original Message -
From: Hugi Thordarson 
To: Tapestry users 
Cc: 
Sent: Monday, December 5, 2011 7:55 AM
Subject: Re: Tapestry 5.3 and tapestry5-cayenne

Hi Dragan.
Thank you, this will definitely be useful for us.

Cheers,
- hugi

PS: I'm impressed with the helpfulness of the community!


On 5.12.2011, at 10:41, Dragan Sahpaski wrote:

> Hi,
> I haven't used  tapestry5-cayenne, but I'd like to point you to another
> project that uses Cayenne with tapestry, if you like to browse it and see
> how cayenne is used in this project.
> 
> https://github.com/bobharner/Tapestry-finder
> 
> Hope it helps.
> 
> Cheers,
> Dragan Sahpaski
> 
> 
> 
> On Mon, Dec 5, 2011 at 11:31 AM, Hugi Thordarson  wrote:
> 
>> Hi all!
>> 
>> First time Tapestry user here, just started coding this weekend and liking
>> it so far.
>> 
>> Now, for my first question: I'm using Cayenne (3.0.2) so I just downloaded
>> the tapestry5-cayenne extension (0.5-snapshot) and installed it. Now, when
>> I start my application, I get the following exception:
>> 
>> --
>> 
>> 2011-12-05 10:29:57.846::WARN:  Failed startup of context
>> org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@7817bcd4
>> {/tap,/Users/hugi/Documents/workspace/tap/src/main/webapp}
>> java.lang.RuntimeException: Exception loading module(s) from manifest
>> jar:file:/Users/hugi/.m2/repository/com/googlecode/tapestry5-cayenne/tapestry5-cayenne-server/0.5-SNAPSHOT/tapestry5-cayenne-server-0.5-SNAPSHOT.jar!/META-INF/MANIFEST.MF:
>> Failure loading Tapestry IoC module class
>> com.googlecode.tapestry5cayenne.services.TapestryCayenneModule: Error
>> invoking service binder method
>> com.googlecode.tapestry5cayenne.services.TapestryCayenneCoreModule.bind(ServiceBinder)
>> (at TapestryCayenneCoreModule.java:93):
>> org/apache/tapestry5/PrimaryKeyEncoder
>>       at
>> org.apache.tapestry5.ioc.IOCUtilities.addModulesInManifest(IOCUtilities.java:123)
>>       at
>> org.apache.tapestry5.ioc.IOCUtilities.addDefaultModules(IOCUtilities.java:77)
>>       at
>> org.apache.tapestry5.internal.TapestryAppInitializer.(TapestryAppInitializer.java:124)
>> 
>> [ … ]
>> 
>> Caused by: java.lang.RuntimeException: Failure loading Tapestry IoC module
>> class com.googlecode.tapestry5cayenne.services.TapestryCayenneModule: Error
>> invoking service binder method
>> com.googlecode.tapestry5cayenne.services.TapestryCayenneCoreModule.bind(ServiceBinder)
>> (at TapestryCayenneCoreModule.java:93):
>> org/apache/tapestry5/PrimaryKeyEncoder
>>       at
>> org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:162)
>>       at
>> org.apache.tapestry5.ioc.IOCUtilities.addModulesInList(IOCUtilities.java:137)
>>       at
>> org.apache.tapestry5.ioc.IOCUtilities.addModulesInManifest(IOCUtilities.java:107)
>> 
>> --
>> 
>> Any ideas what might be happening?
>> 
>> Cheers,
>> - hugi
>> -
>> 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: smarter css

2011-12-06 Thread Chris Collins
Makes sense.  Working in Java for too long has made me soft.  I need to read 
some c code to repent for my sins ;-}

Thanks Bob.

C
On Dec 6, 2011, at 6:41 PM, Bob Harner wrote:

> Rather than having separate IE-only style sheets, a technique I prefer
> is to use IE conditional comments to add an additional div around the
> body in my layout.tml, like this:
> 
> 
> 
> 
> 
> 
> 
> Once that's done, then it becomes trivially easy to add all sorts of
> IE-specific CSS rules in your app's main (or only) style sheet file:
> 
> DIV.menu {
>/* CSS rules for most browsers go here */
> }
> DIV.ie-old DIV.menu {
>/* some IE-specific rules go here */
> }
> 
> Hope this helps...
> 
> On Tue, Dec 6, 2011 at 12:10 PM, Chris Collins  wrote:
>> Thanks Peter, makes total sense.  I am so happy that css3 helped standardize 
>> cross browser support :-}
>> 
>> So I probably would want to detect a non HTML5 browser such as earlier IE's 
>> with something that would throw in to the css another technique such as 
>> using a gradient filled image file (in this example)?  I don't think I would 
>> want to throw in the technique of last resort because in the gradient image 
>> case it would compete with the html5 technique right? For the conditional 
>> method there is a technique proposed in:
>> 
>> http://tapestry.apache.org/css.html
>> 
>> Of course I am actually not literally talking about gradient fills I am 
>> talking about the general new vs old vs cross browser css challenge.
>> 
>> This client side commenting conditional logic seems to be only for IE.  
>> Would that be correct? I am guessing from a browser laggard perspective the 
>> only older browsers people would care about would be IE in general?
>> 
>> Sorry for all the novice questions, by day I normally do non ui data 
>> crunching like engineering :-}
>> 
>> Best
>> 
>> C
>> 
>> 
>> 
>> 
>> On Dec 5, 2011, at 11:23 PM, Peter Stavrinides wrote:
>> 
>>> Hi Chris,
>>> 
>>> 
 So when it comes to css3 is it really so ugly?
>>> If you really want an answer to that, unfortunately yes... and no its not 
>>> just gradients.
>>> 
>>> 
 So say I was trying to add browser specific css to my layout component 
 what would people suggest as the best strategy?
>>> Browser detection is pretty awful, as its a moving target and not perfectly 
>>> accurate, but granted in some cases a necessary evil... avoid it if you 
>>> can. Its not uncommon to simply specify all the styles for the various 
>>> browsers because those that are not understood will simply be ignored... be 
>>> sure though that they are not understood or you might encounter a nasty 
>>> surprise or two. In your example there should be no need for detection.
>>> 
>>> 
>>> Cheers,
>>> Peter
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> - Original Message -
>>> 
>>> From: "Chris Collins" 
>>> To: "Tapestry users" 
>>> Sent: Tuesday, 6 December, 2011 7:48:57 AM
>>> Subject: smarter css
>>> 
>>> So when it comes to css3 is it really so ugly? Ok perhaps its just things 
>>> like gradients:
>>> 
>>> http://ie.microsoft.com/testdrive/graphics/cssgradientbackgroundmaker/default.html
>>> 
>>> So in the microsoft example above for getting a gradient background you 
>>> have to use different css properties per browser. So say I was trying to 
>>> add browser specific css to my layout component what would people suggest 
>>> as the best strategy?
>>> 
>>> Random thoughts:
>>> 
>>> - You can't tml-ify css, if you could then you could condition parts of it 
>>> by browser right?
>>> - Would you create a series of browser specific css assets then build 
>>> inject them directly into the layout page?
>>> 
>>> Clearly I don't have a clue :-}
>>> 
>>> again sorry for dumb questions.
>>> 
>>> -
>>> 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
> 


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



Re: Template parsing vulnerable to whims of default charset

2011-12-06 Thread Kalle Korhonen
On Tue, Dec 6, 2011 at 4:58 PM, Thiago H. de Paula Figueiredo
 wrote:
> On Tue, 06 Dec 2011 22:49:42 -0200, Kalle Korhonen
>  wrote:
>> What's your JVM's file.encoding set to? (e.g. -Dfile.encoding=UTF-8).
>> The default for most JVMs is *not* UTF-8. Tapestry assumes UTF-8
>> throughout.
> I configure my IDE to edit all files as UTF-8 to avoid problems and have
> consistency at the same time.

Yeah, that can be an issue as well, although not in Robert's case
based on what he said. I do the same.

Kalle

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



Re: smarter css

2011-12-06 Thread Bob Harner
Rather than having separate IE-only style sheets, a technique I prefer
is to use IE conditional comments to add an additional div around the
body in my layout.tml, like this:







Once that's done, then it becomes trivially easy to add all sorts of
IE-specific CSS rules in your app's main (or only) style sheet file:

DIV.menu {
/* CSS rules for most browsers go here */
}
DIV.ie-old DIV.menu {
/* some IE-specific rules go here */
}

Hope this helps...

On Tue, Dec 6, 2011 at 12:10 PM, Chris Collins  wrote:
> Thanks Peter, makes total sense.  I am so happy that css3 helped standardize 
> cross browser support :-}
>
> So I probably would want to detect a non HTML5 browser such as earlier IE's 
> with something that would throw in to the css another technique such as using 
> a gradient filled image file (in this example)?  I don't think I would want 
> to throw in the technique of last resort because in the gradient image case 
> it would compete with the html5 technique right? For the conditional method 
> there is a technique proposed in:
>
> http://tapestry.apache.org/css.html
>
> Of course I am actually not literally talking about gradient fills I am 
> talking about the general new vs old vs cross browser css challenge.
>
> This client side commenting conditional logic seems to be only for IE.  Would 
> that be correct? I am guessing from a browser laggard perspective the only 
> older browsers people would care about would be IE in general?
>
> Sorry for all the novice questions, by day I normally do non ui data 
> crunching like engineering :-}
>
> Best
>
> C
>
>
>
>
> On Dec 5, 2011, at 11:23 PM, Peter Stavrinides wrote:
>
>> Hi Chris,
>>
>>
>>> So when it comes to css3 is it really so ugly?
>> If you really want an answer to that, unfortunately yes... and no its not 
>> just gradients.
>>
>>
>>> So say I was trying to add browser specific css to my layout component what 
>>> would people suggest as the best strategy?
>> Browser detection is pretty awful, as its a moving target and not perfectly 
>> accurate, but granted in some cases a necessary evil... avoid it if you can. 
>> Its not uncommon to simply specify all the styles for the various browsers 
>> because those that are not understood will simply be ignored... be sure 
>> though that they are not understood or you might encounter a nasty surprise 
>> or two. In your example there should be no need for detection.
>>
>>
>> Cheers,
>> Peter
>>
>>
>>
>>
>>
>>
>>
>> - Original Message -
>>
>> From: "Chris Collins" 
>> To: "Tapestry users" 
>> Sent: Tuesday, 6 December, 2011 7:48:57 AM
>> Subject: smarter css
>>
>> So when it comes to css3 is it really so ugly? Ok perhaps its just things 
>> like gradients:
>>
>> http://ie.microsoft.com/testdrive/graphics/cssgradientbackgroundmaker/default.html
>>
>> So in the microsoft example above for getting a gradient background you have 
>> to use different css properties per browser. So say I was trying to add 
>> browser specific css to my layout component what would people suggest as the 
>> best strategy?
>>
>> Random thoughts:
>>
>> - You can't tml-ify css, if you could then you could condition parts of it 
>> by browser right?
>> - Would you create a series of browser specific css assets then build inject 
>> them directly into the layout page?
>>
>> Clearly I don't have a clue :-}
>>
>> again sorry for dumb questions.
>>
>> -
>> 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.3: unable to change color of beaneditor border

2011-12-06 Thread Bob Harner
My general rule is to use "!important" only as a last resort. In
theory, the "!important" part shouldn't be needed here.

As the documentation (http://tapestry.apache.org/css.html) says,
Tapestry takes pains to list its own default.css stylesheet first in
the HTML output, so that its CSS rules can be easily replaced by your
own. Any CSS rules in your custom style sheets that redefine the exact
same CSS selectors should override the ones provided by Tapestry,
unless you use *less* specificity in your selectors than Tapestry
does.

The cascading order rules (especially the rules about calculating
specificity) are described well in the bottom half of
http://www.w3.org/TR/CSS2/cascade.html

With all that said, however, I have seen many cases where even after
doing everything "right" you still can't seem to override the CSS
rules without using !important. I assume browser bugs are to blame for
those case.

On Mon, Dec 5, 2011 at 5:56 PM, George Ludwig  wrote:
> Perfect, thanks for the link!
>
> On Sun, Dec 4, 2011 at 5:37 PM, Taha Hafeez Siddiqi <
> tawus.tapes...@gmail.com> wrote:
>
>> Hi
>>
>> You can google "CSS Overriding"
>>
>> http://www.google.co.in/search?q=css+overriding
>>
>> regards
>> Taha
>>
>>
>> On Dec 5, 2011, at 6:32 AM, George Ludwig wrote:
>>
>> > Thanks, that did the trick!
>> >
>> > I'm not an expert on CSS...I'm curious by what mechanism were  those
>> > attributes protected?
>> >
>> > On Sun, Dec 4, 2011 at 4:48 PM, Dusko Jovanovski 
>> wrote:
>> >
>> >> Try replacing your entry in your layout.css with this snippet:
>> >>
>> >> DIV.t-beaneditor {
>> >>  border: 2px outset blue !important;
>> >> }
>> >>
>> >> On Mon, Dec 5, 2011 at 12:53 AM, George Ludwig > >>> wrote:
>> >>
>> >>> I'm want to change the border color of all the beaneditors to blue, so
>> I
>> >>> added this to my layout.css:
>> >>>
>> >>> DIV.t-beaneditor {
>> >>>   background: none repeat scroll 0 0 #CC;
>> >>>   border: 2px outset blue;
>> >>>   display: block;
>> >>>   font-family: "Trebuchet MS",Arial,sans-serif;
>> >>>   padding: 2px;
>> >>> }
>> >>>
>> >>> However, it remains brown. When I inspect the page using FireBug, I see
>> >>> this from default.css line 159:
>> >>> DIV.t-beaneditor {
>> >>>   background: none repeat scroll 0 0 #CC;
>> >>>   border: 2px outset brown;
>> >>>   display: block;
>> >>>   font-family: "Trebuchet MS",Arial,sans-serif;
>> >>>   padding: 2px;
>> >>> }
>> >>>
>> >>> Just after that is my entry from layout.css, however all the entries
>> are
>> >>> lined out.
>> >>>
>> >>> Is there something obvious that I'm missing?
>> >>>
>> >>> -George
>> >>>
>> >>
>>
>>

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



Re: Anyone knows some Tapestry based open source platforms? Like CMS? Forum or Community site?

2011-12-06 Thread Xybrek

On 12/7/2011 4:14 AM, Thiago H. de Paula Figueiredo wrote:

On Tue, 06 Dec 2011 16:07:37 -0200, Lenny Primak
 wrote:


I second that question. I would like to get a CMS going with my
current Tapestry project.
Is there anything that just plugs in and easily integrates?


I don't know if there's something ready to use out there, but I've done
something like that for a personal project (www.cristilenesalomao.com.br
and pronutricionsita.com.br use it) and the CMS implementation was just
a form using FCKEditor, some entity classes, some tables and some
Tapestry pages. :) I've also implemented a forum. Again, some entity
classes, some tables and some Tapestry pages. :)



Hello Thiago,

Cool. thanks for sharing. Is your project open source?

Cheers

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



Re: Template parsing vulnerable to whims of default charset

2011-12-06 Thread Kalle Korhonen
What's your JVM's file.encoding set to? (e.g. -Dfile.encoding=UTF-8).
The default for most JVMs is *not* UTF-8. Tapestry assumes UTF-8
throughout.

Kalle


2011/12/6 Robert Coie :
> Greetings all and apologies for unfamiliarity with issue reporting
> conventions here. I am attempting to deploy a Tapestry 5.3 application
> to Google App Engine and have run into some problems with character
> encoding. These are masked when running locally, as the default
> character set is UTF-8. However, when the application is deployed to the
> live runtime environment, the default character encoding is US-ASCII.
> This causes characters outside of that range (for example, Japanese text
> in .tml files) to be rendered as '???'.
>
> I traced the template file parsing to
> org.apache.tapestry5.internal.services.XMLTokenStream's openStream
> method. This contains:
>
> InputStreamReader rawReader = new InputStreamReader(rawStream);
> ...and...
> PrintWriter writer = new PrintWriter(bos);
>
> Both of these implicitly utilize the default charset. I'm not sure what
> the proper method would be to get at IoC symbols like the
> 'tapestry.charset' property within an internal class like
> XMLTokenStream, so I just tried a hardcoding hack to see if I had
> properly isolated the problem:
>
> InputStreamReader rawReader = new InputStreamReader(rawStream, "UTF-8");
> ...
> PrintWriter writer = new PrintWriter( new OutputStreamWriter(bos,
> "UTF-8") );
>
> This worked. What is the next step in trying to get this addressed in
> the main code base?
>
> --
> Robert Coie
> Implementor, Apropos K.K.
>
> -
> 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



Template parsing vulnerable to whims of default charset

2011-12-06 Thread Robert Coie
Greetings all and apologies for unfamiliarity with issue reporting
conventions here. I am attempting to deploy a Tapestry 5.3 application
to Google App Engine and have run into some problems with character
encoding. These are masked when running locally, as the default
character set is UTF-8. However, when the application is deployed to the
live runtime environment, the default character encoding is US-ASCII.
This causes characters outside of that range (for example, Japanese text
in .tml files) to be rendered as '???'.

I traced the template file parsing to
org.apache.tapestry5.internal.services.XMLTokenStream's openStream
method. This contains:

InputStreamReader rawReader = new InputStreamReader(rawStream);
...and...
PrintWriter writer = new PrintWriter(bos);

Both of these implicitly utilize the default charset. I'm not sure what
the proper method would be to get at IoC symbols like the
'tapestry.charset' property within an internal class like
XMLTokenStream, so I just tried a hardcoding hack to see if I had
properly isolated the problem:

InputStreamReader rawReader = new InputStreamReader(rawStream, "UTF-8");
...
PrintWriter writer = new PrintWriter( new OutputStreamWriter(bos,
"UTF-8") );

This worked. What is the next step in trying to get this addressed in
the main code base?

-- 
Robert Coie
Implementor, Apropos K.K.

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



Re: community page at tapestry.apache.org

2011-12-06 Thread Chris Collins
I agree that finder would probably be what I am wishing for.

I don't personally have anything to recommend I just was noticing 
inconsistencies within the website (for instance tapestry-testify on 
http://tapestry.apache.org/unit-testing-pages-or-components.html but not on the 
community page).  Also I have seen a lot of fleeting comments on the mailing 
list that seem to get lost where either someone is announcing a module/plugin 
or make reference to it as something a user could look at to solve an issue or 
to see how something is done.  Equally some of the stuff on the community 
website seems to be really old and crusty.

As for what is ready to be mentioned there yet or not, there could be a section 
for "brewing" I guess tapestry-finder will support that?  

I look forward to tapestry-finder.

Cheers

C
On Dec 5, 2011, at 2:14 PM, Chris Collins wrote:

> I have a couple of questions about the community page:
> 
> http://tapestry.apache.org/community.html
> 
> - Who is responsible for putting a comment about a contribution on this page? 
>   I know its not exhaustive as it says it at the top of the page :-}   Is it 
> the author of the contrib or can anyone elect to have something listed there? 
>  For instance there is the tapestry-finder project.
> 
> - What is the chance that we can track the versions of tapestry these are 
> known to support?  Many of these don't support 5.3 (yet), then there are some 
> that seem to be completely abandoned.
> 
> Best
> 
> C
> 
> 
> 
> -
> 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: community page at tapestry.apache.org

2011-12-06 Thread Bob Harner
Anyone who has access to do so is allowed to update the page. Anyone
with an Apache Individual Contributor License Agreement on file can
gain access upon request. Alternatively, if you want something added,
just mention it in this mailing list.

I think Tapestry-finder isn't quite ready to be mentioned there yet.
With Dragan now helping, maybe soon...

Tapestry-finder includes the ability to track the Tapestry versions
that a component or module can support. It would be great to use it in
place of the several static lists of modules and components that we
have now.

On Mon, Dec 5, 2011 at 5:14 PM, Chris Collins  wrote:
> I have a couple of questions about the community page:
>
> http://tapestry.apache.org/community.html
>
> - Who is responsible for putting a comment about a contribution on this page? 
>   I know its not exhaustive as it says it at the top of the page :-}   Is it 
> the author of the contrib or can anyone elect to have something listed there? 
>  For instance there is the tapestry-finder project.
>
> - What is the chance that we can track the versions of tapestry these are 
> known to support?  Many of these don't support 5.3 (yet), then there are some 
> that seem to be completely abandoned.
>
> Best
>
> C
>
>
>
> -
> 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: Anyone knows some Tapestry based open source platforms? Like CMS? Forum or Community site?

2011-12-06 Thread Thiago H. de Paula Figueiredo
On Tue, 06 Dec 2011 18:24:40 -0200, Lenny Primak   
wrote:



Is this open source?  I'd like to take a look.


Parts of it are. You can find them in  
http://www.arsmachina.com.br/project, source code in  
http://ars-machina.svn.sourceforge.net/viewvc/ars-machina/. Warning:  
outdated documentation, code written against Tapestry 5.1 (I'll upgrade  
then when I have the time for it. I'm itching to use 5.3, but I couldn't  
yet).


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: Anyone knows some Tapestry based open source platforms? Like CMS? Forum or Community site?

2011-12-06 Thread Chris Collins
There are a lot of CMS systems out there that are open source.  Peoples 
definition of CMS is extremely broad.  Some would consider a simple entity 
representing a document backed by a db as a CMS, others may say that is not.  
For comparison take a look at something like:

http://jackrabbit.apache.org/

This doesn't have a tapestry integration as far as I know but it does have some 
clean api's to access it such as webdav.

C
On Dec 6, 2011, at 12:24 PM, Lenny Primak wrote:

> Is this open source?  I'd like to take a look.
> Thanks!
> 
> On Dec 6, 2011, at 3:14 PM, Thiago H. de Paula Figueiredo wrote:
> 
>> On Tue, 06 Dec 2011 16:07:37 -0200, Lenny Primak  
>> wrote:
>> 
>>> I second that question.  I would like to get a CMS going with my current 
>>> Tapestry project.
>>> Is there anything that just plugs in and easily integrates?
>> 
>> I don't know if there's something ready to use out there, but I've done 
>> something like that for a personal project (www.cristilenesalomao.com.br and 
>> pronutricionsita.com.br use it) and the CMS implementation was just a form 
>> using FCKEditor, some entity classes, some tables and some Tapestry pages. 
>> :) I've also implemented a forum. Again, some entity classes, some tables 
>> and some Tapestry pages. :)
>> 
>> -- 
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and 
>> instructor
>> Owner, Ars Machina Tecnologia da Informação Ltda.
>> http://www.arsmachina.com.br
>> 
>> -
>> 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: Anyone knows some Tapestry based open source platforms? Like CMS? Forum or Community site?

2011-12-06 Thread Lenny Primak
Is this open source?  I'd like to take a look.
Thanks!

On Dec 6, 2011, at 3:14 PM, Thiago H. de Paula Figueiredo wrote:

> On Tue, 06 Dec 2011 16:07:37 -0200, Lenny Primak  
> wrote:
> 
>> I second that question.  I would like to get a CMS going with my current 
>> Tapestry project.
>> Is there anything that just plugs in and easily integrates?
> 
> I don't know if there's something ready to use out there, but I've done 
> something like that for a personal project (www.cristilenesalomao.com.br and 
> pronutricionsita.com.br use it) and the CMS implementation was just a form 
> using FCKEditor, some entity classes, some tables and some Tapestry pages. :) 
> I've also implemented a forum. Again, some entity classes, some tables and 
> some Tapestry pages. :)
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and 
> instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
> 
> -
> 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: Anyone knows some Tapestry based open source platforms? Like CMS? Forum or Community site?

2011-12-06 Thread Thiago H. de Paula Figueiredo
On Tue, 06 Dec 2011 16:07:37 -0200, Lenny Primak   
wrote:


I second that question.  I would like to get a CMS going with my current  
Tapestry project.

Is there anything that just plugs in and easily integrates?


I don't know if there's something ready to use out there, but I've done  
something like that for a personal project (www.cristilenesalomao.com.br  
and pronutricionsita.com.br use it) and the CMS implementation was just a  
form using FCKEditor, some entity classes, some tables and some Tapestry  
pages. :) I've also implemented a forum. Again, some entity classes, some  
tables and some Tapestry pages. :)


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



[t5.1] ajaxFormLoop disabled once page reloaded and returning a PDFStreamResponse

2011-12-06 Thread Jérémie Charlet
Hello everyone,

I am facing an issue while using ajaxFormLoop:

On my page, I fill a form that includes among others a list of phoneNumbers
to be set in an ajaxFormLoop. Once I submit the form, it generates a PDF
(containing data from my form) and makes the user download it in his web
browser. The user is not redirected to another page, the page is simply
reloaded so that the user can fill once again the form and generate a new
PDF.

Problem is that once the page is reloaded (and my PDF file asked to be
download), I cannot use the ajaxFormLoop anymore: if I click on addRow,
nothing happens on the GUI. However if I reload manually the page, the
ajaxFormLoop works back again and displays moreothers as many rows as I
clicked previously on the addRow button. It seems that once I click on
addRow, requests are indeed done server side, but the javaScript doesn't
work anymore and and does not refresh the GUI and show the added rows.

The problem might occur because in the function handling the submit event,
I return a PDFStreamResponse instead of the tapestry page but I don't see
how to solve it.. Return the PDFStreamResponse and somehow reload
immediately after the page, but how? Is there a better way to make the user
download the generated PDF?


the ajaxFormLoop from the tml


 

 

 

${sharedcatalog:phoneNumber}
 

 


 

${sharedcatalog:deletephoneNumber}
 


 


 


 
${sharedcatalog:addphoneNumber}

 


 


the submit event handled in the java class

@OnEvent(component = "myForm", value = EventConstants.SUBMIT)
 public Object generatePDF() {

InputStream pdfStream = null;
 try {
pdfStream = pdfGeneratorService.generateMandatePDF();
} catch (PDFGeneratorServiceException e) {
 e.printStackTrace();
}

// return the PDF as a PDFStreamResponse
 return new PDFStreamResponse(pdfStream, "Addresses_" +
System.currentTimeMillis() + ".pdf");
}


Thanks in advance for the help :),
Jérémie


Re: Anyone knows some Tapestry based open source platforms? Like CMS? Forum or Community site?

2011-12-06 Thread Lenny Primak
I second that question.  I would like to get a CMS going with my current 
Tapestry project.
Is there anything that just plugs in and easily integrates?

On Dec 6, 2011, at 1:05 PM, Xybrek wrote:

> Hi, anyone knows some Tapestry based platforms?
> 
> With PHP, there's a bunch of CMS (Joomla etc.) Forum (PhpBB) and other 
> community site which are open source, like Boonex Dolphin.
> 
> Is there any (open source)
> 
> - CMS
> - Forum
> - Community site made with Tapestry
> 
> Thanks,
> Xybrek
> 
> 
> -
> 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



Anyone knows some Tapestry based open source platforms? Like CMS? Forum or Community site?

2011-12-06 Thread Xybrek

Hi, anyone knows some Tapestry based platforms?

With PHP, there's a bunch of CMS (Joomla etc.) Forum (PhpBB) and other 
community site which are open source, like Boonex Dolphin.


Is there any (open source)

- CMS
- Forum
- Community site made with Tapestry

Thanks,
Xybrek


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



Re: tapestry-hibernate 5.3 and spock

2011-12-06 Thread Tony Nelson
Hate to do this but I'm really stuck here.

Anyone have any idea what I can try next here?

On Dec 5, 2011, at 2:40 PM, Tony Nelson wrote:

> I'm trying to test my application with spock and have run into an issue.  I 
> have put a sample app on github at:
> 
> https://github.com/hhubris/broken
> 
> If you clone the app, and run mvn clean test, everything works just fine.
> 
> In AppModule:24-28 I have the following commented out:
> 
>/*
>public static void 
> contributeHibernateEntityPackageManager(Configuration configuration) {
>configuration.add("com.starpoint.helpdesk.domain");
>}
>*/
> 
> 
> This simply adds a configuration option to the hibernate module.  Uncomment 
> this and rerun the test.  The result is:
> 
> [-- snip --]
> Results :
> 
> Tests in error: 
>  com.starpoint.domain.UserTest: Contribution 
> com.starpoint.services.AppModule.contributeHibernateEntityPackageManager(Configuration)
>  (at AppModule.java:25) is for service 'HibernateEntityPackageManager', which 
> does not exist.
> 
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
> [-- snip --]
> 
> To fix this, I added HibernateCoreModule to the list of SubModules used in 
> the spock test. You can uncomment line 11 of UserTest and comment out line 
> 12.  The new result is:
> 
> [-- snip --]
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.385 sec <<< 
> FAILURE!
> 
> Results :
> 
> Tests in error: 
>  com.starpoint.domain.UserTest: Exception constructing service 
> 'RegistryStartup': Error invoking service contribution method 
> org.apache.tapestry5.hibernate.HibernateCoreModule.contributeRegistryStartup(OrderedConfiguration,
>  boolean, HibernateSessionSource): Exception constructing service 
> 'FactoryDefaults': Error invoking service contribution method 
> org.apache.tapestry5.services.TapestryModule.contributeFactoryDefaults(MappedConfiguration):
>  Exception constructing service 'TypeCoercer': Error invoking service 
> contribution method 
> org.apache.tapestry5.services.TapestryModule.contributeTypeCoercer(Configuration,
>  TypeCoercer, ThreadLocale, AssetSource, ComponentClassCache, 
> DynamicTemplateParser): Error building service proxy for service 
> 'ThreadLocale' (at 
> org.apache.tapestry5.ioc.internal.services.ThreadLocaleImpl() (at 
> ThreadLocaleImpl.java:24) via 
> org.apache.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder) (at 
> TapestryIOCModule.java:49)): Exception constructing service 
> 'ServiceLifecycleSource': Error invoking service contribution method 
> org.spockframework.tapestry.ExtensionModule.contributeServiceLifecycleSource(MappedConfiguration):
>  Exception constructing service 'ServiceOverride': Error invoking service 
> contribution method 
> org.apache.tapestry5.services.TapestryModule.productionModeOverrides(MappedConfiguration,
>  boolean): Exception constructing service 'TypeCoercer': Construction of 
> service 'TypeCoercer' has failed due to recursion: the service depends on 
> itself in some way. Please check 
> org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl(Collection) (at 
> TypeCoercerImpl.java:129) via 
> org.apache.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder) (at 
> TapestryIOCModule.java:49) for references to another service that is itself 
> dependent on service 'TypeCoercer'.
> 
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
> [-- snip --]
> 
> I'm not sure what to try next.
> 
> I asked on the spock list and they suggested I ask here.  Anyone have any 
> success testing tapestry-hibernate apps with spock?
> 
> Thanks in advance
> Tony Nelson
> 
> 
> 
> 


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



Re: smarter css

2011-12-06 Thread Chris Collins
Thanks Peter, makes total sense.  I am so happy that css3 helped standardize 
cross browser support :-}

So I probably would want to detect a non HTML5 browser such as earlier IE's 
with something that would throw in to the css another technique such as using a 
gradient filled image file (in this example)?  I don't think I would want to 
throw in the technique of last resort because in the gradient image case it 
would compete with the html5 technique right? For the conditional method there 
is a technique proposed in:

http://tapestry.apache.org/css.html

Of course I am actually not literally talking about gradient fills I am talking 
about the general new vs old vs cross browser css challenge.

This client side commenting conditional logic seems to be only for IE.  Would 
that be correct? I am guessing from a browser laggard perspective the only 
older browsers people would care about would be IE in general?

Sorry for all the novice questions, by day I normally do non ui data crunching 
like engineering :-}

Best

C




On Dec 5, 2011, at 11:23 PM, Peter Stavrinides wrote:

> Hi Chris, 
> 
> 
>> So when it comes to css3 is it really so ugly? 
> If you really want an answer to that, unfortunately yes... and no its not 
> just gradients. 
> 
> 
>> So say I was trying to add browser specific css to my layout component what 
>> would people suggest as the best strategy? 
> Browser detection is pretty awful, as its a moving target and not perfectly 
> accurate, but granted in some cases a necessary evil... avoid it if you can. 
> Its not uncommon to simply specify all the styles for the various browsers 
> because those that are not understood will simply be ignored... be sure 
> though that they are not understood or you might encounter a nasty surprise 
> or two. In your example there should be no need for detection. 
> 
> 
> Cheers, 
> Peter 
> 
> 
> 
> 
> 
> 
> 
> - Original Message -
> 
> From: "Chris Collins"  
> To: "Tapestry users"  
> Sent: Tuesday, 6 December, 2011 7:48:57 AM 
> Subject: smarter css 
> 
> So when it comes to css3 is it really so ugly? Ok perhaps its just things 
> like gradients: 
> 
> http://ie.microsoft.com/testdrive/graphics/cssgradientbackgroundmaker/default.html
>  
> 
> So in the microsoft example above for getting a gradient background you have 
> to use different css properties per browser. So say I was trying to add 
> browser specific css to my layout component what would people suggest as the 
> best strategy? 
> 
> Random thoughts: 
> 
> - You can't tml-ify css, if you could then you could condition parts of it by 
> browser right? 
> - Would you create a series of browser specific css assets then build inject 
> them directly into the layout page? 
> 
> Clearly I don't have a clue :-} 
> 
> again sorry for dumb questions. 
> 
> - 
> 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: Building large projects, based around the same framework

2011-12-06 Thread Thiago H. de Paula Figueiredo
On Tue, 06 Dec 2011 08:28:02 -0200, Hugi Thordarson   
wrote:



Good morning everyone.


Hi!

* About ~500 websites running in our CMS, each site a single web  
application.
* In addition to the CMS, generic extensions that can be added  
(Shopping, Event scheduling etc).

* Most sites include some custom components and logic.

All in all, a pretty typical setup for a CMS/Web Development shop.

So… Should I just declare the tapestry application package in the parent  
project (the CMS itself) and then create components/pages/additional  
services in that same package in my application project? Or do I have a  
better way of modualrizing the systems? Should I do something like this  
(http://tapestry.apache.org/component-libraries.html) for all the  
applications and extensions?


The core application (CMS) would be a normal webapp and libraries for the  
extensions and customizations. The key part here is using Tapestry-IoC.  
You can easily override, decorate or advice the core services and add more  
components, pages, mixins, dispatchers, request filters, etc in the  
libraries for the customizations. I've done this in a personal project,  
I've been working on large projects that use this approach and it works  
very well.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Tapestry 5.3, Testify 1.0.4 and locating components/pages

2011-12-06 Thread yamk
We are trying to use tapestry testify to test tapestry pages in our project.
Because it seems that testify 1.0.3 doesnt work with tapestry 5.3, we
downloaded 1.0.4 snapshot version.

Unfortunately, testify has problems with locating components and pages files
(both .java and .tml). We tried various project layouts, including standard
maven layout and the one from
http://tapestry.formos.com/nightly/tapestry-testify/project-layout.html.

Components are found only with additional line in DemoModule:

public static void
contributeComponentClassResolver(Configuration
configuration) {
configuration.add(new LibraryMapping("demo",
DemoModule.class.getPackage().getName()));
   configuration.add(new LibraryMapping("prefix", "pa.cka.ge"));
}
}

and using prefix in every test page. But components contain links to other
pages that cannot be found.

How do make main sources and resources visible for tests? Has anyone
succesfully combined tapestry 5.3 and testify 1.0.4 (or older version)?

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-5-3-Testify-1-0-4-and-locating-components-pages-tp5051591p5051591.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: [5.3] JSONArray Error while submitting forms

2011-12-06 Thread Gunnar Eketrapp
A possible solution would be to make a code around in the method
isFormCancelled() in Form.java.

/Gunnar





  if (raw != null &&
new *JSONArray(raw)*
.getString(1).equals(InternalConstants.CANCEL_NAME))
{
return true;
}



  if (raw != null && *!raw.isEmpty() &&*
new *JSONArray(raw)*
.getString(1).equals(InternalConstants.CANCEL_NAME))
{
return true;
}



2011/12/6 Seamus 

> Anyone have a solution to this. I have a form which I dont believe is
> making
> use of any ajax (unless tapestry is and I dont know about it I am using the
> current T5.3 release) and I get this error. When inspecting my page in
> chrome and looking at the resources I see prototype 1.7 and scriptaculous
> 1.9.
>
> I dont see any other versions loaded for me to try and remove.
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/5-3-JSONArray-Error-while-submitting-forms-tp5011831p5052214.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
>
>


-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: security

2011-12-06 Thread csckid
Instead of downloading from tynamo.. Can't we directly use Apache Shiro?

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/security-tp5045892p5052282.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: [5.3] JSONArray Error while submitting forms

2011-12-06 Thread Seamus
Anyone have a solution to this. I have a form which I dont believe is making
use of any ajax (unless tapestry is and I dont know about it I am using the
current T5.3 release) and I get this error. When inspecting my page in
chrome and looking at the resources I see prototype 1.7 and scriptaculous
1.9. 

I dont see any other versions loaded for me to try and remove.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/5-3-JSONArray-Error-while-submitting-forms-tp5011831p5052214.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: Wanted: New title for the Tapestry book

2011-12-06 Thread Massimo Lusetti
On Tue, Dec 6, 2011 at 12:49 PM, Bob Harner  wrote:

> Love it, Hugo. That's the best title by far.
>
> Bob Harner
> On Dec 5, 2011 3:32 PM, "Hugi Thordarson"  wrote:
>
>> +1 for the unicorns.
>>
>> "Tapestry 5: Farting rainbows"
>>
>> - hugi

I must admit it taken me a google-and to understand it...

Cheers
-- 
Massimo

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



Re: Show your Tapestry support!

2011-12-06 Thread Alexander Rosemann

On 06.12.2011 00:22, Manuel Sugawara wrote:

On Mon, Dec 5, 2011 at 9:16 AM, Howard Lewis Ship  wrote:


Actually, I'm not entirely satisfied with the result ... thanks to
everyone who'se posted SO FAR, but I'd like to see more, and less
familiar, names up on the JavaLobby announcements page.



Oh, well, I tried, really I did, but come on, the register form is sooo
long, and they require mi phone number and address WTF?, what for?. Jesus,
sorry guys, you have my full support but I can't stand registering.

Regards,
Manuel.



Agree, it is a pain in the behind. But giving 10 mins for registration 
and writing a brief comment is the least one can give back imo.


-Alex

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



Re: Show your Tapestry support!

2011-12-06 Thread David Canteros
I agree that registration form is bugging , but if it is a good place to
contribute with the framework (wich is so useful and is free!) we should do
the effort and place our comments, is my oppinion.
Regards!

--
David Germán Canteros


2011/12/5 Bob Harner 

> I hope you all don't put in your real info in such forms. Fake data
> works just as well.
>
> On Mon, Dec 5, 2011 at 8:01 PM, Lenny Primak 
> wrote:
> > Somehow I doubt that all that 'valuable' registration information didn't
> > go into the grubby hands of the marketers.
> >
> > On Dec 5, 2011, at 7:58 PM, Taha Hafeez Siddiqi wrote:
> >
> >> Hi Lenny
> >>
> >> I am registered there for last two years and have never received any
> mail, so that is not a problem.
> >>
> >> Yes, I agree, the "Registration" concept is too primitive.
> >
> >
> > -
> > 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.3 upgrade

2011-12-06 Thread angelochen
that's what I do now, but seems not working, the code was quoted above.


Thiago H de Paula Figueiredo wrote
> 
> On Tue, 06 Dec 2011 04:18:55 -0200, angelochen  
>  wrote:
> 
>> AliasContribution is gone from 5.3, so i change baseURLservice to  
>> following, seems not working, not got called, Am I missing something  
>> here? THanks.
> 
> Use service overriding instead. It exists in Tapestry-IoC at least since  
> 5.1.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
> 
> -
> To unsubscribe, e-mail: users-unsubscribe@.apache
> For additional commands, e-mail: users-help@.apache
> 


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5-3-upgrade-tp5051120p5051974.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: Exception Report must not contain a form

2011-12-06 Thread Stephan Windmüller
On 06.12.2011 13:09, Muhammad Gelbana wrote:

> What version of tapestry is that ?
> Would you kindly state tapestry's version in the subject ? :)

I'm sorry. The Tapestry version here is 5.2.6.

Regards
 Stephan



signature.asc
Description: OpenPGP digital signature


Re: Exception Report must not contain a form

2011-12-06 Thread Muhammad Gelbana
What version of tapestry is that ?
Would you kindly state tapestry's version in the subject ? :)

Thanks.

On Tue, Dec 6, 2011 at 1:20 AM, Alejandro Scandroli <
alejandroscandr...@gmail.com> wrote:

> I have seen this "Form components may not be placed inside other Form
> components."  error way too many times.
> The problem is that your ExceptionReport page has a form that is
> trying to add a new FormSupport to the environment but there is one
> already there.
> The FormSupport that is already on the environment is from the form
> that failed and threw exception.
>
> If you can't avoid having a form in your ExceptionReport page you can
> try adding a fail safe to revert back to Tapestry's default
> ExceptionReport when there is an exception in the exception page.
>
> I've just filed JIRA issue
> (http://jira.codehaus.org/browse/TYNAMO-107) to fix this in Tynamo's
> tapestry-exceptionpage.
> The patch is just around the corner.
>
> Cheers.
> Alejandro.
>
>
>
> On Mon, Dec 5, 2011 at 10:23 AM, Stephan Windmüller
>  wrote:
> > On 30.11.2011 15:55, I wrote:
> >
> >> However, now the ExceptionReport page itself throws an exception when
> >> the orginal exception occurs on a page which already has a form:
> >
> > Does anybody have an idea why this is happening or how I can fix it?
> >
> > Regards
> >  Stephan
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
*Regards,*
*Muhammad Gelbana
Java Developer*


Re: t5.3 upgrade

2011-12-06 Thread Thiago H. de Paula Figueiredo
On Tue, 06 Dec 2011 04:18:55 -0200, angelochen  
 wrote:


AliasContribution is gone from 5.3, so i change baseURLservice to  
following, seems not working, not got called, Am I missing something  
here? THanks.


Use service overriding instead. It exists in Tapestry-IoC at least since  
5.1.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: Exception Report must not contain a form

2011-12-06 Thread Stephan Windmüller
On 06.12.2011 00:20, Alejandro Scandroli wrote:

> I have seen this "Form components may not be placed inside other Form
> components."  error way too many times.
> The problem is that your ExceptionReport page has a form that is
> trying to add a new FormSupport to the environment but there is one
> already there.
> The FormSupport that is already on the environment is from the form
> that failed and threw exception.

Thanks for the tip, I solved it for now with this code in the
ExceptionReport page:

| void setupRender() {
|   if (environment.peek(FormSupport.class) != null) {
| environment.pop(FormSupport.class);
|   }
| }

- Stephan



signature.asc
Description: OpenPGP digital signature


Re: Wanted: New title for the Tapestry book

2011-12-06 Thread Bob Harner
Love it, Hugo. That's the best title by far.

Bob Harner
On Dec 5, 2011 3:32 PM, "Hugi Thordarson"  wrote:

> +1 for the unicorns.
>
> "Tapestry 5: Farting rainbows"
>
> - hugi
>
>
>
> On 5.12.2011, at 20:28, Daniel Jue wrote:
>
> > How about naming it after a famous tapestry?
> > I Googled 'famous tapestry' and found this one, and it even has a
> UNICORN!
> >
> > http://en.wikipedia.org/wiki/The_Lady_and_the_Unicorn
> >
> > On Mon, Dec 5, 2011 at 11:18 AM, Borut Bolcina 
> wrote:
> >> That is funny, with a grain of salt.
> >>
> >>
> >> Sent from my iPad
> >>
> >> On 5. dec. 2011, at 13:22, Koka Kiknadze <226...@gmail.com> wrote:
> >>
> >>> Is there any timetable? I think it's the most awaited manual on java
> web
> >>> development - so you could just name it accordingly :)
> >>>
> >>> Tapetry 5 Guide:  The Most Awaited Manual For Java Web Development
> >>
> >> -
> >> 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: Using the same page for edit/new (Solution)

2011-12-06 Thread Muhammad Gelbana
How about persisting a variable (on the client side using client-persisting
strategy) and inject your page in other pages then when navigating from
these pages set this variable to whatever suits you. So you can specify
the behavior of your page in a salable way I suppose and you solve the
multiple-tabs thing just in case the client is viewing your page from
different browsers\tabs.

Please tell me if i'm not clear.

On Tue, Dec 6, 2011 at 4:09 AM, Serge Eby  wrote:

> Could you expand on this a little more?
> I am not using tapestry-hibernate and my current solution feels a bit
> awkward.
>
> /Serge
>
> --
> View this message in context:
> http://tapestry-users.832.n2.nabble.com/Using-the-same-page-for-edit-new-Solution-tp6865849p7065396.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
>
>


-- 
*Regards,*
*Muhammad Gelbana
Java Developer*


Building large projects, based around the same framework

2011-12-06 Thread Hugi Thordarson
Good morning everyone.

I'd like to seek a little advice from the community.

I've just spent a couple of days using Tapestry, and as a longtime 
WebObjects-user I'm feeling right at home with the Tapestry+Cayenne combination.
I recently started working at a web development shop where most of the websites 
are run on an inhouse developed CMS which is very nice on the client side, but 
starting to show its age on the backend (J2EE/JSP). Tapestry looks like a great 
potential way for our future.

Anyone care to give a quick comment on how to design a Tapestry-based structure 
for this use case?

* About ~500 websites running in our CMS, each site a single web application.
* In addition to the CMS, generic extensions that can be added (Shopping, Event 
scheduling etc).
* Most sites include some custom components and logic.

All in all, a pretty typical setup for a CMS/Web Development shop.

So… Should I just declare the tapestry application package in the parent 
project (the CMS itself) and then create components/pages/additional services 
in that same package in my application project? Or do I have a better way of 
modualrizing the systems? Should I do something like this 
(http://tapestry.apache.org/component-libraries.html) for all the applications 
and extensions?

Sorry if this is a FAQ—I'm still plowing through the documentation and mailing 
list archives to gain some familiarity with the framework.

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



date field as 3 drop down fields

2011-12-06 Thread captain_rhino
I am looking to implement a date field as 3 separate drop downs lists of day,
month and year in T5.   Has anyone already developed a component that does
this?

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/date-field-as-3-drop-down-fields-tp5051531p5051531.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