context-dependent validator

2013-10-03 Thread Ilya Obshadko
Hello, Is that possible to create a custom validator that is context-dependent? That is, I want validation logic (including client-side JS) to depend on actual component data. I have checked http://wiki.apache.org/tapestry/Tapestry5HowToAddValidators, it's pretty clear how to do that, but I don't

Re: 5.4 List inside form is failing Could not find a coercion from type java.lang.String

2013-10-03 Thread George Christman
Worked like a charm, Thanks Thiago. On Thu, Oct 3, 2013 at 10:43 AM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Thu, 03 Oct 2013 11:22:58 -0300, George Christman < > gchrist...@cardaddy.com> wrote: > > Hello, I'm creating a loop with a list of dates for presentation inside a

Re: [ANN] Tapestry 5.4 alternative datepicker

2013-10-03 Thread Barry Books
Unfortunately modernizer does not really support that. From the docs Modernizr cannot detect that date inputs create a datepicker, It is possible to detect if a browser support type="date" but that does not mean it has a datepicker. I suspect I'm going to add an option to give it a try. On Thu,

Re: [ANN] Tapestry 5.4 alternative datepicker

2013-10-03 Thread Geoff Callender
Sounds good, Barry. You mentioned earlier that you were "planing on using modernizr to detect if type="date" is supported. " so that browsers with good HTML5 date support (eg. iOS Safari, Chrome) are left alone. How did that go? On 3 October 2013 12:08, Barry Books wrote: > I've uploaded the i

Re: [ANN] Tapestry 5.4 alternative datepicker

2013-10-03 Thread Barry Books
I changed the translators so multiple attributes can be passed to the client. The constructor is now *public* DateTranslator(String name, String format, String messageKey, String... attributes) { and the render does *public* *void* render(Field field, String message, MarkupWriter writer, FormS

Re: [5.4.22] Need example of custom javascript

2013-10-03 Thread Geoff Callender
A word of warning for those of us building WARs in "Collapsed EAR" format (http://openejb.apache.org/collapsed-ear.html): * The place that T5.4 uses for javascript modules and assets, WEB-INF/classes/META-INF/ , is also used by your EJB layer for persistence.xml and, for OpenEJB, ejb-jar/xml.

Tapestry transforms a class in the base package !

2013-10-03 Thread Muhammad Gelbana
I'm running my web project with jetty while including my module classed using the jvm parameter -Dtapestry.modules=my.package.module1,my.package.module2,my.package.module3 In one of those modules, I have a class in the base package, typically: *com.skycomm.ipkaizen.portal.admin.base.ProbeCommand

Re: [ANN] Tapestry 5.4 alternative datepicker

2013-10-03 Thread Barry Books
It will work fine On Thursday, October 3, 2013, Lenny Primak wrote: > My primary use case would be beaneditor. I don't think translator will > work In this case. Correct me if I'm wrong. > > > > > On Oct 3, 2013, at 12:33 PM, Barry Books > > wrote: > > > > You can configure it with data- attribut

Disable data-error-block

2013-10-03 Thread George Christman
Hello, is there a way to disable the data-error-block messages on validation without the use of css while still allowing the field to highlight red during field errors?

Re: [ANN] Tapestry 5.4 alternative datepicker

2013-10-03 Thread Lenny Primak
My primary use case would be beaneditor. I don't think translator will work In this case. Correct me if I'm wrong. > On Oct 3, 2013, at 12:33 PM, Barry Books wrote: > > You can configure it with data- attributes. If you want defaults you could > do this in the translator. Currently the Java

Re: [5.4.22] RequireJs custom path contribution - perhaps on Stacks or JavaScriptSupport

2013-10-03 Thread Bård Magnus Kvalheim
Thanks Lenny, JIRA created https://issues.apache.org/jira/browse/TAP5-2196 Please vote guys :) On Thu, Oct 3, 2013 at 8:02 PM, Lenny Primak wrote: > +1. I can see lots of things needing this. JIRA please ill vote for it. > > > On Oct 3, 2013, at 1:33 AM, Bård Magnus Kvalheim > wrote: > > > >

Re: [ANN] Tapestry 5.4 alternative datepicker

2013-10-03 Thread Barry Books
You can configure it with data- attributes. If you want defaults you could do this in the translator. Currently the JavaScript includes are hard coded but I'm thinking about using a configuration to support different JavaScript components. It seems like that would solve your problem also On Thur

Re: [5.4.22] RequireJs custom path contribution - perhaps on Stacks or JavaScriptSupport

2013-10-03 Thread Lenny Primak
+1. I can see lots of things needing this. JIRA please ill vote for it. > On Oct 3, 2013, at 1:33 AM, Bård Magnus Kvalheim wrote: > > Hi folks. > > As part of 5.4 migration process we have some components that make use of > JQueryFileUpload, https://github.com/blueimp/jQuery-File-Upload . > >

Re: [ANN] Tapestry 5.4 alternative datepicker

2013-10-03 Thread Lenny Primak
Very good. Since I didn't look at it yet, I know the datepicker supports myriad of options. Is there a way to configure it? Perhaps a symbol? Also since you are including jquery UI, there should also be configuration to override it so i can use the requireJS method to load it from CDN. > On

Re: Should the JQuery UI library be include with 5.4

2013-10-03 Thread Lenny Primak
I remember seeing requireJS handling this case correctly somewhere in its documentation. I don't see any other good way resolving this in T5.4 as of now. > On Oct 3, 2013, at 12:17 AM, Magnus Kvalheim wrote: > > define(["t5/core/dom", "t5/core/events", "jquery", "// > code.jquery.com/ui/1.10.3

Re: Uses of @Advice and @Match annotations

2013-10-03 Thread Thiago H de Paula Figueiredo
On Thu, 03 Oct 2013 12:58:42 -0300, Alessio Gambi wrote: And I want to advice only AmazonServiceUpdater and OSServiceUpdater. I solved this by defining a Marker annotation @CloudServiceUpdater, place it on the two services, and finally, use the combination @Advise @CloudServiceUpdater

Re: rich clients and future of tapestry

2013-10-03 Thread Boris Horvat
Hi, I would just like to add something (maybe not my place but still) These type of question to me personally seem wrong to ask and here is why. If I where to ask you what is better hammer or a screwdriver I am sure that you would respond by stating "it depends on the problem". Well so does here

Re: Uses of @Advice and @Match annotations

2013-10-03 Thread Alessio Gambi
> And I want to advice only AmazonServiceUpdater and OSServiceUpdater. I solved this by defining a Marker annotation @CloudServiceUpdater, place it on the two services, and finally, use the combination @Advise @CloudServiceUpdater which seems to work just fine. I prefer this solution instead o

Re: Uses of @Advice and @Match annotations

2013-10-03 Thread Alessio Gambi
On the bright side, using only id works as expected... That brings to my next question: how can a limited number of services implementing the same interface can be advised ? I have now that "ServiceUpdater is matched by 4 services: AmazonServiceUpdater, DoodleServiceUpdater, OSServiceUpdater,

Re: Uses of @Advice and @Match annotations

2013-10-03 Thread Alessio Gambi
> Could you please file a JIRA? Here we go: TAP5-2195 On Oct 2, 2013, at 8:37 PM, Thiago H de Paula Figueiredo wrote: > On Wed, 02 Oct 2013 11:49:54 -0300, Alessio Gambi > wrote: > >> From the documentation (see >> http://tapestry.apache.org/service-advisors.html), it seems to be legal

Re: 5.4 List inside form is failing Could not find a coercion from type java.lang.String

2013-10-03 Thread Thiago H de Paula Figueiredo
On Thu, 03 Oct 2013 11:22:58 -0300, George Christman wrote: Hello, I'm creating a loop with a list of dates for presentation inside a form. When I submit the form, it fails with the following exception. Hi! org.apache.tapestry5.ioc.util.UnknownValueException *Could not find a coercion fr

Re: 5.4 List inside form is failing Could not find a coercion from type java.lang.String

2013-10-03 Thread George Christman
I ended up using SimpleDateFormat to return a list of Strings and that appeared to resolve the issue. Is there any kind of work around for the original issue? On Thu, Oct 3, 2013 at 10:23 AM, George Christman wrote: > I'd also like to add, if I remove the loop from the form, I no longer get > th

Re: [ANN] Tapestry 5.4 alternative datepicker

2013-10-03 Thread Barry Books
I've done exactly this in 5.3 and will have this version shortly On Thursday, October 3, 2013, Thiago H de Paula Figueiredo wrote: > On Wed, 02 Oct 2013 23:53:06 -0300, Lenny Primak > wrote: > > Excellent. Any plans to make beaneditor use this or does this already >> work? >> > > Oops, I forgo

Re: 5.4 List inside form is failing Could not find a coercion from type java.lang.String

2013-10-03 Thread George Christman
I'd also like to add, if I remove the loop from the form, I no longer get that exception. On Thu, Oct 3, 2013 at 10:22 AM, George Christman wrote: > Hello, I'm creating a loop with a list of dates for presentation inside a > form. When I submit the form, it fails with the following exception. >

5.4 List inside form is failing Could not find a coercion from type java.lang.String

2013-10-03 Thread George Christman
Hello, I'm creating a loop with a list of dates for presentation inside a form. When I submit the form, it fails with the following exception. org.apache.tapestry5.ioc.util.UnknownValueException *Could not find a coercion from type java.lang.String to type java.util.Date.* availableValues Config

Re: [5.4.22] Need example of custom javascript

2013-10-03 Thread Geoff Callender
Well, that worked! Thank you very much. For anyone else who's confused, the structure of the WAR ends up with 2 META-INF files: - one in the root context (generated by mvn war:war, it contains the MANIFEST.MF, pom, etc) - one in WEB-INF/classes/ (copied there from src/main/resources/ by mvn r

Re: [5.4.22] Need example of custom javascript

2013-10-03 Thread Thiago H de Paula Figueiredo
On Thu, 03 Oct 2013 09:36:13 -0300, Geoff Callender wrote: Now I'm really confused! But I see a few people have said to put META-INF/modules/ in src/main/resources, which would be picked up by mvn resources:resources and put into the project's target/classes, eventually put in the WAR as

Re: [5.4.22] Need example of custom javascript

2013-10-03 Thread Geoff Callender
Now I'm really confused! mvn war:war puts META-INF in the context root - see http://maven.apache.org/plugins/maven-war-plugin/usage.html and http://www.tech-juice.org/2012/05/12/how-maven-builds-a-war-file/ . But I see a few people have said to put META-INF/modules/ in src/main/resources, whic

Re: [ANN] Tapestry 5.4 alternative datepicker

2013-10-03 Thread Thiago H de Paula Figueiredo
On Wed, 02 Oct 2013 23:53:06 -0300, Lenny Primak wrote: Excellent. Any plans to make beaneditor use this or does this already work? Oops, I forgot that for this, you can override the viewing and edition blocks, so for BeanEditor and BeanEditForm you don't need the future component repl

Re: [ANN] Tapestry 5.4 alternative datepicker

2013-10-03 Thread Thiago H de Paula Figueiredo
On Wed, 02 Oct 2013 23:53:06 -0300, Lenny Primak wrote: Excellent. Any plans to make beaneditor use this or does this already work? There's a JIRA asking for a way to replace a component by another automatically, so, for example, or t:type="DateField" actually uses Barry's DateField o

Re: [5.4.22] Need example of custom javascript

2013-10-03 Thread Bård Magnus Kvalheim
Hi Geoff. Believe the META-INF should be on the classpath (in resources if using maven structure) On Thu, Oct 3, 2013 at 1:52 PM, Geoff Callender < geoff.callender.jumpst...@gmail.com> wrote: > I've dropped the @Import and tried many things inspired by Thiago and > Lenny's source (thanks guys),

Re: [5.4.22] Need example of custom javascript

2013-10-03 Thread Thiago H de Paula Figueiredo
On Thu, 03 Oct 2013 08:52:13 -0300, Geoff Callender wrote: I've dropped the @Import and tried many things inspired by Thiago and Lenny's source (thanks guys), but the module is still not found. Does the URL of the module look right? http://gc1.local:8080/myapp/asset.gz/module/page

Re: [5.4.22] Need example of custom javascript

2013-10-03 Thread Geoff Callender
I've dropped the @Import and tried many things inspired by Thiago and Lenny's source (thanks guys), but the module is still not found. Does the URL of the module look right? http://gc1.local:8080/myapp/asset.gz/module/pages/stuff.js My WAR has META-INF/ at the top level alongside WEB-I

Re: Should the JQuery UI library be include with 5.4

2013-10-03 Thread Barry Books
I was not a big fan of breaking it up. jQuery UI is not that large and if you use different parts on different pages one download seems better. On Thu, Oct 3, 2013 at 5:47 AM, Dmitry Gusev wrote: > Before Tapestry 5.4 I used tapestry-jquery as jQuery UI provider (I don't > use T5.4 yet in any o

Re: Should the JQuery UI library be include with 5.4

2013-10-03 Thread Barry Books
I'm not sure how it would break anything to just include it although I can see issues with the themes. My concern is to get the DateField component to work I created a custom JQuery UI download and included it. If everyone that wants to add some jQuery component does this there will be lots of dup

Re: Should the JQuery UI library be include with 5.4

2013-10-03 Thread Dmitry Gusev
Before Tapestry 5.4 I used tapestry-jquery as jQuery UI provider (I don't use T5.4 yet in any of my projects). There is a @ImportJQueryUI annotation you can use to import jQuery UI parts you need: @ImportJQueryUI(value = { "jquery.ui.tabs" }) Not sure how it will work in Tapestry 5.4 and what ar

Re: [ANN] Tapestry 5.4 alternative datepicker

2013-10-03 Thread Barry Books
I already have a Sonatype account and I'll probably put this into Maven Central this weekend. I think I'm going to add one of the Bootstrap javascript implementations and write some test cases before I do that. I'll also offer it up to be included in Tapestry. Since it's not at all compatible wit

Re: [T5.3] Form of checkboxes from a list

2013-10-03 Thread Adrien Berthet
Hi ! So, I tried to use a checklist, and as you said, it worked ! For anyone wanting the solution : TestList.java : public class TestList { @Inject private AlertManager alertManager; @Persist @Property private List list; @Persist @Property private List selectedV

[5.4.22] RequireJs custom path contribution - perhaps on Stacks or JavaScriptSupport

2013-10-03 Thread Bård Magnus Kvalheim
Hi folks. As part of 5.4 migration process we have some components that make use of JQueryFileUpload, https://github.com/blueimp/jQuery-File-Upload . This library uses the factory approach for defining the modules to work in both AMD and non AMD environments. Internally it handles loading of requ

Re: Should the JQuery UI library be include with 5.4

2013-10-03 Thread Bård Magnus Kvalheim
define(["t5/core/dom", "t5/core/events", "jquery", "// code.jquery.com/ui/1.10.3/jquery-ui.js"], ... That's interesting - loading of scripts directly within a define. Seems very useful and convenient. Thought I might use same approach in some scenarios. I tried to lookup on documentation of that

Re: Should the JQuery UI library be include with 5.4

2013-10-03 Thread Magnus Kvalheim
define(["t5/core/dom", "t5/core/events", "jquery", "// code.jquery.com/ui/1.10.3/jquery-ui.js"], ... That's interesting - loading of scripts directly within a define. Seems very useful and convenient. Thought I might use same approach in some scenarios. I tried to lookup on documentation of that