Re: Simple CMS / content editor component

2012-03-08 Thread Lenny Primak
Sounds great!  Thanks!



On Mar 8, 2012, at 11:49 PM, Kalle Korhonen  wrote:

> For the brave souls, there's now
> http://svn.codehaus.org/tynamo/trunk/tapestry-editablecontent/ and the
> initial snapshots available at
> https://nexus.codehaus.org/content/groups/snapshots-group/org/tynamo/tapestry-editablecontent/0.0.1-SNAPSHOT/.
> 
> Kalle
> 
> 
> On Sat, Feb 18, 2012 at 8:53 AM, Kalle Korhonen
>  wrote:
>> On Sat, Feb 18, 2012 at 6:48 AM, Tiger Gui  wrote:
>>> It seems to be built base on FCKeditor for T5, i think it can really
>>> works. Does Tapestry team consider creating a T5 build in rich-text
>>> editor ?
>> 
>> FCKEditor is not Apache license and can therefore never be part of T5
>> core project, nor does it need to be. The FCKEditor for T5 on kenai is
>> GPL which makes it a non-starter for most projects.
>> 
>> Dragan's https://github.com/plannowtech/tapestry5-ckeditor is based on
>> the newer CKEditor and it provided a good enough building block for
>> what I'm proposing. Let's be clear though - I'm not interested in
>> being the business of building a yet another rich-text editor. No,
>> what I'd like to have is a simple drop-in module for lightweight
>> content editing. This is more about associations and interaction with
>> the existing page structure and the persistence layer than the rich
>> text editor itself. I'll check the modest-cms but it's activity is
>> plain none, so it doesn't bode well.
>> 
>> Kalle
>> 
>> 
>>> 
>>> 2012/2/18 based2 :
> http://t5-easy-fckeditor.kenai.com/
 
> 
 http://citydotmobicms.sourceforge.net/
 http://code.google.com/p/modest-cms/
 
 ==
 https://github.com/bobharner/Tapestry-finder
 http://wiki.apache.org/tapestry/Tapestry5ModuleRegistry
 http://wiki.apache.org/tapestry/Tapestry5OpensourceApps
 
 
 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/Simple-CMS-content-editor-component-tp5494712p5495246.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
 
>>> 
>>> 
>>> 
>>> --
>>> Best Regards From Tiger Gui
>>> --
>>> Open source is some kind of life attitude
>>> 
>>> -
>>> 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: Simple CMS / content editor component

2012-03-08 Thread Kalle Korhonen
For the brave souls, there's now
http://svn.codehaus.org/tynamo/trunk/tapestry-editablecontent/ and the
initial snapshots available at
https://nexus.codehaus.org/content/groups/snapshots-group/org/tynamo/tapestry-editablecontent/0.0.1-SNAPSHOT/.

Kalle


On Sat, Feb 18, 2012 at 8:53 AM, Kalle Korhonen
 wrote:
> On Sat, Feb 18, 2012 at 6:48 AM, Tiger Gui  wrote:
>> It seems to be built base on FCKeditor for T5, i think it can really
>> works. Does Tapestry team consider creating a T5 build in rich-text
>> editor ?
>
> FCKEditor is not Apache license and can therefore never be part of T5
> core project, nor does it need to be. The FCKEditor for T5 on kenai is
> GPL which makes it a non-starter for most projects.
>
> Dragan's https://github.com/plannowtech/tapestry5-ckeditor is based on
> the newer CKEditor and it provided a good enough building block for
> what I'm proposing. Let's be clear though - I'm not interested in
> being the business of building a yet another rich-text editor. No,
> what I'd like to have is a simple drop-in module for lightweight
> content editing. This is more about associations and interaction with
> the existing page structure and the persistence layer than the rich
> text editor itself. I'll check the modest-cms but it's activity is
> plain none, so it doesn't bode well.
>
> Kalle
>
>
>>
>> 2012/2/18 based2 :
 http://t5-easy-fckeditor.kenai.com/
>>>

>>> http://citydotmobicms.sourceforge.net/
>>> http://code.google.com/p/modest-cms/
>>>
>>> ==
>>> https://github.com/bobharner/Tapestry-finder
>>> http://wiki.apache.org/tapestry/Tapestry5ModuleRegistry
>>> http://wiki.apache.org/tapestry/Tapestry5OpensourceApps
>>>
>>>
>>> --
>>> View this message in context: 
>>> http://tapestry.1045711.n5.nabble.com/Simple-CMS-content-editor-component-tp5494712p5495246.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
>>>
>>
>>
>>
>> --
>> Best Regards From Tiger Gui
>> --
>> Open source is some kind of life attitude
>>
>> -
>> 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: tapestry5-db-migrations

2012-03-08 Thread Taha Hafeez Siddiqi
Thanks Christian

The only reservation we have against Liquibase is xml. There is a groovy 
support but I am not sure how good it is.  But I think it is the only way to go 
:-(

regards
Taha

On Mar 5, 2012, at 8:12 PM, derkoe wrote:

> 
> Taha Hafeez wrote
>> 
>> I was looking for something like rails migration and came across
>> https://github.com/spreadthesource/tapestry5-db-migrations. It looks
>> promising. I have a few queries about it :-
>> 
>> 1) Is it being actively maintained as the last commit was 9 months ago.
>> 
>> 2) It is based on Tapestry-5.2. Any plans of upgrading to 5.3
>> 
>> 3) And how do we add a custom column definition like in
>> @Column(columnDefinition = "longtext") etc.
>> 
> 
> We use Liquibase (http://www.liquibase.org/) - it works like a charm. We
> created a simple Tapestry service which you can contribute a collection of
> Liquibase changelog files. 
> 
> This LiquibaseService is called from a HibernateConfigurer which builds the
> Hibernate ConnectionProvider and passes the connection to the
> LiquibaseService.
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/tapestry5-db-migrations-tp5535228p5537715.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
> 


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



Re: Programmatical page/component rendering

2012-03-08 Thread Thiago H. de Paula Figueiredo
I guess you could solve the problem another way: process the macros before  
the content is sent for Tapestry to render. Once I had a similar problem  
to solve (macros) and that's how I solved it. Tapestry templates were  
never meant to be used by users, just by developers. So, if you need  
templates and macros, you use a template engine (FreeMarker is quite good)  
and pass its output to OutputRaw. If Tapestry components are needed, I  
used to following trick: I've put them in pages inside a block. To render  
them, I use ComponentSource.getPage() to get the page, then  
getComponentResources().findBlock() to get the block, add information  
needed by the block through the Environment, then used Delegate to render  
the block. Works quite well. :)


Another option is to use Tapestry DOM rewriting in @AfterRender.

On Thu, 08 Mar 2012 21:16:14 -0300, Charles Roth  wrote:


Could someone expand (expound?) more on rendering a Tapestry 5 component
*inside* a java class?

For example, I have an application I'm rewriting (from an
ancient-god-help-me-C-program) in Tapestry.  It's a venerable forum tool
that lets users put "macros" in their posts.  Each macro is rather like a
Tapestry component.

So as I'm rendering the page in the normal Tapestry way, I also want to
parse the users's posts, and be able to evaluate (render) the macros
(components) in the posts, and then spit the output, probably via
outputraw(?), to the Tapestry page.

So for example, a user's post might have something like:
   "Hey, I'm living now at %googleMap(latitude,longitude), and it's  
really

%blink(cool)!"

I want to be able to parse out the %googleMap and evaluate it (render  
it) as
a component (that I will write), then parse out the %blink and evaluate  
it
as another component (say, ye olde HTML blink tag)... accumulate all of  
the
user's text plus the rendered components, and THEN spit out all of the  
text.


Trying to do this with a (large!) collection of blocks would be tedious,  
and
maybe even impossible.  But this thread suggests that there are other  
ways

to do it, programmatically inside the Java class for a page.

Any hints or pointers are most welcome.  Thanks in advance!

--
View this message in context:  
http://tapestry.1045711.n5.nabble.com/Programmatical-page-component-rendering-tp5159795p5549303.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




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

Owner, Ars Machina Tecnologia da Informação Ltda.
Consultor, desenvolvedor e instrutor em Java, Tapestry e Hibernate
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: Programmatical page/component rendering

2012-03-08 Thread Charles Roth
Could someone expand (expound?) more on rendering a Tapestry 5 component
*inside* a java class?

For example, I have an application I'm rewriting (from an
ancient-god-help-me-C-program) in Tapestry.  It's a venerable forum tool
that lets users put "macros" in their posts.  Each macro is rather like a
Tapestry component.

So as I'm rendering the page in the normal Tapestry way, I also want to
parse the users's posts, and be able to evaluate (render) the macros
(components) in the posts, and then spit the output, probably via
outputraw(?), to the Tapestry page.

So for example, a user's post might have something like:
   "Hey, I'm living now at %googleMap(latitude,longitude), and it's really
%blink(cool)!"

I want to be able to parse out the %googleMap and evaluate it (render it) as
a component (that I will write), then parse out the %blink and evaluate it
as another component (say, ye olde HTML blink tag)... accumulate all of the
user's text plus the rendered components, and THEN spit out all of the text.

Trying to do this with a (large!) collection of blocks would be tedious, and
maybe even impossible.  But this thread suggests that there are other ways
to do it, programmatically inside the Java class for a page.

Any hints or pointers are most welcome.  Thanks in advance!

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Programmatical-page-component-rendering-tp5159795p5549303.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: ZoneRefresh mixin should cleanup after itself if the zone is destroyed

2012-03-08 Thread Dragan Sahpaski
Done,
https://issues.apache.org/jira/browse/TAP5-1866

Please also see: https://issues.apache.org/jira/browse/TAP5-1867 which is a
blocker for 1866.

Cheers,
Dragan Sahpaski



On Thu, Mar 8, 2012 at 12:28 PM, Taha Hafeez Siddiqi <
tawus.tapes...@gmail.com> wrote:

> Hi Dragan
>
> Great! Please open a Jira and attach the patch.
>
> Sent from my iPhone
>
> On Mar 8, 2012, at 4:05 PM, Dragan Sahpaski 
> wrote:
>
> > Hi,
> > We have the following use case:
> > A zone with a ZoneRefresh (located in another zone) is updated several
> > times and then the outer zone is updated with another block.
> > After the update, exceptions are constantly thrown by the javascript
> > PeriodicUpdater on this line
> > "zoneRefresh.fire(Tapestry.ZONE_REFRESH_EVENT)" because the div element
> > that's linked to the zone with Tapestry.Initializer.updateZoneOnEvent is
> > not destroyed and the corresponding timer is also not destroyed.
> >
> > I think the ZoneRefresh mixin should cleanup after itself in scenarios
> like
> > this.
> >
> > If someone this this idea is solid and back it up, I'm willing to work on
> > implementing a patch.
> > Clearly the improvement code would be internal (mainly javascript and
> tests
> > to back it up), and won't involve public API changes.
> >
> > Cheers,
> > Dragan Sahpaski
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Hibernate/Tapestry5 - MySQL database

2012-03-08 Thread CHAUVEL
Thanks Guys!
Finally I used a mapping file. Just the way it is.


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Hibernate-Tapestry5-MySQL-database-tp5528748p5548925.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: Tapestry client side validation vs jQuery Validator.

2012-03-08 Thread George Christman
Thiago, I'll have to look deeper into assigning validations automatically.
That would be a life saver. 

I agree, Manu and team have done an excellent job with Tapestry-jQuery. It
seems as if most ui components / plugins built today are being built in
jQuery, so this plugin makes third party components so much easier to work
with. Plus you get to use bootstrap, jQuery UI etc. without noconflict. 

Personal projects hmm what are those ??? :( Where does the time go! 



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-client-side-validation-vs-jQuery-Validator-tp5547993p5548765.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: Tapestry client side validation vs jQuery Validator.

2012-03-08 Thread Thiago H. de Paula Figueiredo
On Thu, 08 Mar 2012 14:06:49 -0300, Emmanuel DEMEY  
 wrote:


As Thiago said, the main pros of Tapestry Validator, is that everything  
is> configured on the server side. So you will have a server side and a  
client side validations configured at once.


I forgot to mention that validations are applied automatically and you can  
add your own rules for assigning them too.



PS @Thiago : Try Tapestry5-jQuery, and you will love it ;)


I'll try it when I have time to work on my personal projects again. I hope  
it's soon. And I have no doubts I'll love Tapestry5-jQuery. :)


Cheers!

--
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: Server Side Validation with ajax form loop

2012-03-08 Thread George Christman
Sure, not a problem. I'll file a bug in the morning.


On Thu, Mar 8, 2012 at 2:58 PM, David Canteros [via Tapestry] <
ml-node+s1045711n5548672...@n5.nabble.com> wrote:

> Could you please do it? My english is not good  (my natural language is
> spanish) and you already have the code with the issue.
> Tell me if you can't.
> Thanks!
>
> David
>
>
>
>
>
> --
> David Germán Canteros
>
>
> 2012/3/6 George Christman <[hidden 
> email]>
>
>
> > Sounds good to me. Do you want to file the jira issue, or would you like
> me
> > to?
> >
> > --
> > View this message in context:
> >
> http://tapestry.1045711.n5.nabble.com/Server-Side-Validation-with-ajax-form-loop-tp5120576p5540927.html
>
> > Sent from the Tapestry - User mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: [hidden 
> > email]
> > For additional commands, e-mail: [hidden 
> > email]
> >
> >
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://tapestry.1045711.n5.nabble.com/Server-Side-Validation-with-ajax-form-loop-tp5120576p5548672.html
>  To unsubscribe from Server Side Validation with ajax form loop, click
> here
> .
> NAML
>



-- 
George Christman
www.CarDaddy.com
P.O. Box 735
Johnstown, New York


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Server-Side-Validation-with-ajax-form-loop-tp5120576p5548686.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: Server Side Validation with ajax form loop

2012-03-08 Thread David Canteros
Could you please do it? My english is not good  (my natural language is
spanish) and you already have the code with the issue.
Tell me if you can't.
Thanks!

David





--
David Germán Canteros


2012/3/6 George Christman 

> Sounds good to me. Do you want to file the jira issue, or would you like me
> to?
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Server-Side-Validation-with-ajax-form-loop-tp5120576p5540927.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: ?t:lb=t being appended to query parameter

2012-03-08 Thread George Christman
Hi Howard, was I able to provide enough useful data?

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t-lb-t-being-appended-to-query-parameter-tp5526503p5548536.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: Tapestry client side validation vs jQuery Validator.

2012-03-08 Thread George Christman
I figured I'd end up having to use jQuery. I found the downside to using
jQuery is server side validation. I'm sure there must be a better way to do
this, but I found myself handling dynamic server side validation with code
like below. This uses the same db tables used in after render to set the
clientside fields. 

String message = "You must provide a value for ";

List formValidations =
session.createCriteria(FormValidation.class)
.add(Restrictions.eq("currentState", pr.getCurrentState()))
.add(Restrictions.eq("applicationAction.id",
action)).list();

for (FormValidation formValidation : formValidations) {
FormField formField = formValidation.getFormField();

String dbTableName = formField.getDbTableName();
String dbTableField = formField.getDbTableField();
String fieldName = formField.getName();

if (DatabaseConstants.DB_TABLE_NAME_PR.equals(dbTableName)) {
Field field = pr.getClass().getDeclaredField(dbTableField);
field.setAccessible(true);

if (field.get(pr) == null) {
form.recordError(message + fieldName);
}
}

As always, thanks for your input. 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-client-side-validation-vs-jQuery-Validator-tp5547993p5548292.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: ComponentParameters - Binding Expressions - "component:"

2012-03-08 Thread Jochen Frey
I have considered @AfterRender (and tried it at some point), but I may have to 
revisit that since it's been a while and maybe I was missing something.

... and since you asked:

We are building components by tightly integrating .java, .tml, and .js, so that 
they can be re-used by non specialists.  Due to our product requirements we 
typically have to heavily customize components, or roll our own integrations 
between Tapestry, client side JS, and JQuery (in addition to using and 
modifying available integrations and components, which are a great place start).

We are trying to stay within the TS framework as much as possible, which causes 
us to use "Zone" a lot, and that means dealing with the 't:id' vs 'id' issues 
since we often need to pass clientId's into our JavaScript integrations, and 
that in turn causes us to manage our own id's.

That and guessing at the custom events that Tapestry or tapestry-jquery may be 
using are the two sharp edges we've not been able to find satisfying solutions 
for.

That being said, Tapestry is a fantastic framework which I wouldn't want to 
miss, and it provides tons of value.  What I am talking about above is what we 
are seeing when we are pushing the boundaries of Tapestry towards more 
customized client-side experiences, including ones that go way beyond 
BeanEditor and similar components.

Maybe this was a case of "too much information" ... but there you have it ;-)

J



On Mar 8, 2012, at 8:53 AM, Thiago H. de Paula Figueiredo wrote:

> On Thu, 08 Mar 2012 13:46:47 -0300, Jochen Frey  wrote:
> 
>> My real concern is slightly different.  It boils down to the fact that it is 
>> incredibly hard (if not impossible in certain situations) to determine the 
>> automatically generated ClientID of a component (that's embedded in the 
>> current component) during @SetupRender.
> 
> Have you tried it in @AfterRender?
> 
>> Worst of all, it really slows down adoption (or acceptance) of Tapestry with 
>> JavaScript specialists.
> 
> I guess they wouldn't use Zones anyway . . . or am I wrong? (often I am).
> 
> Maybe this is a similar scenario to what we sometimes find with 
> BeanEditForm/BeanEditor: they're meant to be used as scaffolding, giving nice 
> results for more common scenarios, not meant to be used in heavy 
> customization ones.
> 
> -- 
> 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

---
  joc...@jochenfrey.com
  +1.415.366.0450
  @jochen_frey



Re: Tapestry client side validation vs jQuery Validator.

2012-03-08 Thread Emmanuel DEMEY
As Thiago said, the main pros of Tapestry Validator, is that everything is
configured on the server side. So you will have a server side and a client
side validations configured at once.

But, in fact, with all your requirements, you should use jQuery Validator.

Just for your information, a tutorial for creating a new Validator :
http://wiki.apache.org/tapestry/CreatingCustomValidators

PS @Thiago : Try Tapestry5-jQuery, and you will love it ;)

Manu

2012/3/8 Thiago H. de Paula Figueiredo 

> On Thu, 08 Mar 2012 13:56:04 -0300, George Christman <
> gchrist...@cardaddy.com> wrote:
>
>  I agree, it is pretty bulky and complex and I'm not opposed to using the
>> tapestry validator, however I haven't found much documentation on how to
>> create custom tapestry-jquery validators.
>>
>
> Without having used tapestry-jquery yet (lack of time, sigh), I'd guess
> it's the same as adding Tapestry validations without tapestry-jquery.
>
> You have a long list of very specific requirements, so maybe the jQuery
> validator route will be better suited.
>
>
>
>> The reason I chose to use the jQuery validator is for the following
>> reasons,
>> maybe you could tell me if this is possible using the tapestry version.
>>
>> 1. We are building a single form with extensive workflow. The form
>> essentially remains the same with the exception of validation and user
>> role.
>> Field validation is completely dynamic from a db and determined based on
>> the
>> workflows current state. jQuery Validator allows me to validate a field
>> based on the class .required. With that being said, I can use a script in
>> after render to set all the required classes in the form. I'm not certain
>> tapestry would enable me to do this.
>>
>> 2. Popup form. We have a serious of popup forms that request data. This
>> data
>> needs to be validated without form submission prior to updating a field
>> within the main form.
>>
>> 3. Dynamic data validation, we need to validate a sum of fields equals
>> 100%.
>>
>> 4. we also need to use an error box to handle some of the dynamic
>> validation.
>>
>> 5. Validate visible fields only.
>>
>> Like I said, I'm not opposed to the built in version, I'm just not sure
>> that
>> it's capable of handling all this. If so, could you point me to some
>> documentation, it would be greatly appreciated. Thanks Manu.
>>
>> --
>> View this message in context: http://tapestry.1045711.n5.**
>> nabble.com/Tapestry-client-**side-validation-vs-jQuery-**
>> Validator-tp5547993p5548091.**html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>> --**--**-
>> To unsubscribe, e-mail: 
>> users-unsubscribe@tapestry.**apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> Consultor, desenvolvedor e instrutor em Java, Tapestry e Hibernate
> http://www.arsmachina.com.br
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Emmanuel DEMEY
Ingénieur Etude et Développement
ATOS Worldline
+33 (0)6 47 47 42 02
demey.emman...@gmail.com
http://emmanueldemey.fr

Twitter : @gillespie59


Re: Tapestry client side validation vs jQuery Validator.

2012-03-08 Thread Thiago H. de Paula Figueiredo
On Thu, 08 Mar 2012 13:56:04 -0300, George Christman  
 wrote:



I agree, it is pretty bulky and complex and I'm not opposed to using the
tapestry validator, however I haven't found much documentation on how to
create custom tapestry-jquery validators.


Without having used tapestry-jquery yet (lack of time, sigh), I'd guess  
it's the same as adding Tapestry validations without tapestry-jquery.


You have a long list of very specific requirements, so maybe the jQuery  
validator route will be better suited.




The reason I chose to use the jQuery validator is for the following  
reasons,

maybe you could tell me if this is possible using the tapestry version.

1. We are building a single form with extensive workflow. The form
essentially remains the same with the exception of validation and user  
role.
Field validation is completely dynamic from a db and determined based on  
the

workflows current state. jQuery Validator allows me to validate a field
based on the class .required. With that being said, I can use a script in
after render to set all the required classes in the form. I'm not certain
tapestry would enable me to do this.

2. Popup form. We have a serious of popup forms that request data. This  
data

needs to be validated without form submission prior to updating a field
within the main form.

3. Dynamic data validation, we need to validate a sum of fields equals  
100%.


4. we also need to use an error box to handle some of the dynamic
validation.

5. Validate visible fields only.

Like I said, I'm not opposed to the built in version, I'm just not sure  
that

it's capable of handling all this. If so, could you point me to some
documentation, it would be greatly appreciated. Thanks Manu.

--
View this message in context:  
http://tapestry.1045711.n5.nabble.com/Tapestry-client-side-validation-vs-jQuery-Validator-tp5547993p5548091.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




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

Owner, Ars Machina Tecnologia da Informação Ltda.
Consultor, desenvolvedor e instrutor em Java, Tapestry e Hibernate
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: Tapestry client side validation vs jQuery Validator.

2012-03-08 Thread Thiago H. de Paula Figueiredo
Without knowing jQuery Validator, I'd say the Tapestry client-side  
validation has the advantage of being added automatically based on the  
server-side validations added to a field. In addition, the error messages  
are ready to use out of the box and can be customized. Maybe you can even  
use both at the same time, with jQuery validations being added to cover  
what the Tapestry ones don't.


On Thu, 08 Mar 2012 13:20:30 -0300, George Christman  
 wrote:



Hello, I'm using the Tapestry jQuery project with the full removal of
prototype. I have some rather complex client side validation requiring  
the

use of an error box. My question is whether it would be best to disable
tapestry client side validation and solely use jquery validator or use  
both

in conjunction.

What are the pros and cons to Tapestry client side validation in  
comparison

to jQuery Validator.

Thanks.

--
View this message in context:  
http://tapestry.1045711.n5.nabble.com/Tapestry-client-side-validation-vs-jQuery-Validator-tp5547993p5547993.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




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

Owner, Ars Machina Tecnologia da Informação Ltda.
Consultor, desenvolvedor e instrutor em Java, Tapestry e Hibernate
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: Hwo to redirect to another page from a vois @OnEvent method

2012-03-08 Thread Kalle Korhonen
What Thiago is saying, you can just return the page (class or
instance) if you changed the return type:
@OnEvent(value = EventConstants.ACTIVATE)
  public Object initPage(Object[] parameters)  throws IOException{

 if(something goes wrong) {
  return MyErrorPage.class;
}

Kalle

On Thu, Mar 8, 2012 at 8:03 AM, Thiago H. de Paula Figueiredo
 wrote:
> On Thu, 08 Mar 2012 12:53:26 -0300, Javix  wrote:
>
>> I don't really know, the method signature was defined as void that's why
>> I'm asking. And as it is void, in java these methods can not return
>> anything.
>
>
> Unless this method is overriding another one, just change its return type
> and do the right thing. ;) Using Response.sendRedirect() isn't very
> Tapestry-ish. :)
>
>
> --
> 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: Tapestry client side validation vs jQuery Validator.

2012-03-08 Thread George Christman
I agree, it is pretty bulky and complex and I'm not opposed to using the
tapestry validator, however I haven't found much documentation on how to
create custom tapestry-jquery validators. 

The reason I chose to use the jQuery validator is for the following reasons,
maybe you could tell me if this is possible using the tapestry version. 

1. We are building a single form with extensive workflow. The form
essentially remains the same with the exception of validation and user role.
Field validation is completely dynamic from a db and determined based on the
workflows current state. jQuery Validator allows me to validate a field
based on the class .required. With that being said, I can use a script in
after render to set all the required classes in the form. I'm not certain
tapestry would enable me to do this. 

2. Popup form. We have a serious of popup forms that request data. This data
needs to be validated without form submission prior to updating a field
within the main form. 

3. Dynamic data validation, we need to validate a sum of fields equals 100%. 

4. we also need to use an error box to handle some of the dynamic
validation. 

5. Validate visible fields only. 

Like I said, I'm not opposed to the built in version, I'm just not sure that
it's capable of handling all this. If so, could you point me to some
documentation, it would be greatly appreciated. Thanks Manu. 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-client-side-validation-vs-jQuery-Validator-tp5547993p5548091.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: Hwo to redirect to another page from a vois @OnEvent method

2012-03-08 Thread Javix
Yeah, it works! I did as you told, - changed the method signature for
Object and return MyClacc.class or null when needed.
thanks a lot !

On 8 March 2012 17:04, Thiago H de Paula Figueiredo [via Tapestry] <
ml-node+s1045711n5547946...@n5.nabble.com> wrote:

> On Thu, 08 Mar 2012 12:53:26 -0300, Javix <[hidden 
> email]>
> wrote:
>
> > I don't really know, the method signature was defined as void that's why
> > I'm asking. And as it is void, in java these methods can not return
> > anything.
>
> Unless this method is overriding another one, just change its return type
>
> and do the right thing. ;) Using Response.sendRedirect() isn't very
> Tapestry-ish. :)
>
> --
> 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: [hidden 
> email]
> For additional commands, e-mail: [hidden 
> email]
>
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://tapestry.1045711.n5.nabble.com/How-to-redirect-to-another-page-from-a-void-OnEvent-method-tp5547799p5547946.html
>  To unsubscribe from How to redirect to another page from a void @OnEvent
> method, click 
> here
> .
> NAML
>


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-redirect-to-another-page-from-a-void-OnEvent-method-tp5547799p5548086.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: ComponentParameters - Binding Expressions - "component:"

2012-03-08 Thread Thiago H. de Paula Figueiredo
On Thu, 08 Mar 2012 13:46:47 -0300, Jochen Frey   
wrote:


My real concern is slightly different.  It boils down to the fact that  
it is incredibly hard (if not impossible in certain situations) to  
determine the automatically generated ClientID of a component (that's  
embedded in the current component) during @SetupRender.


Have you tried it in @AfterRender?

Worst of all, it really slows down adoption (or acceptance) of Tapestry  
with JavaScript specialists.


I guess they wouldn't use Zones anyway . . . or am I wrong? (often I am).

Maybe this is a similar scenario to what we sometimes find with  
BeanEditForm/BeanEditor: they're meant to be used as scaffolding, giving  
nice results for more common scenarios, not meant to be used in heavy  
customization ones.


--
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: ComponentParameters - Binding Expressions - "component:"

2012-03-08 Thread Jochen Frey
My real concern is slightly different.  It boils down to the fact that it is 
incredibly hard (if not impossible in certain situations) to determine the 
automatically generated ClientID of a component (that's embedded in the current 
component) during @SetupRender.

This forces developers to  manage their own ids (as suggested by Paul and 
Thiago), and in my experience it's error prone and cumbersome.

Worst of all, it really slows down adoption (or acceptance) of Tapestry with 
JavaScript specialists.

J


On Mar 8, 2012, at 5:03 AM, Denis Stepanov wrote:

>> The pattern that Paul and Thiago are suggesting works fine if that component 
>> occurs a single time on a page.  However, if you use it multiple times, the 
>> client side zoneId (as well as the Tapestry JS initializers) are not unique 
>> any more, which causes the same zone to be updated all the time, no matter 
>> which EventLink got the click.
> 
> Again and again randomly generated zone id confuses developers. :)
> 
> Should I collect all mail posts with that problem at my issue: "Warn user or 
> disallow zone with randomly generated id"? :)
> 
> https://issues.apache.org/jira/browse/TAP5-1834
> 
> Denis
> 
> Mar 7, 2012 v 7:09 PM, Jochen Frey:
> 
>> That's definitely another way of solving this.  Still goes by way of the 
>> java file, but provides a different sort of flexibility.
>> 
>> Cheers!
>> J
>> 
>> On Mar 7, 2012, at 9:30 AM, Thiago H. de Paula Figueiredo wrote:
>> 
>>> On Wed, 07 Mar 2012 13:41:02 -0300, Jochen Frey  
>>> wrote:
>>> 
 Thanks guys!
>>> 
>>> Hi!
>>> 
 I have a lot of components that are re-used either in loops, or just 
 embedded in multiple components (often in the same page).
 
 The pattern that Paul and Thiago are suggesting works fine if that 
 component occurs a single time on a page.  However, if you use it multiple 
 times, the client side zoneId (as well as the Tapestry JS initializers) 
 are not unique any more, which causes the same zone to be updated all the 
 time, no matter which EventLink got the click.
>>> 
>>> Again, provide the id yourself, in this case dinamically 
>>> (id="${generatedId}"). When you don't provide the id yourself, Tapestry 
>>> components generate a random one when it finds the original id, based in 
>>> t:id, is already taken.
>>> 
>>> -- 
>>> 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
>> 
>> ---
>> joc...@jochenfrey.com
>> +1.415.366.0450
>> @jochen_frey
>> 
> 

---
  joc...@jochenfrey.com
  +1.415.366.0450
  @jochen_frey



Re: Tapestry client side validation vs jQuery Validator.

2012-03-08 Thread Emmanuel DEMEY
Hi

In an older version, Tapestry5-jquery Validation mechanism was based on
jquery Vallidator. But Clément removed all the stack, because the plugin
was too big and too complex for our needed.

Why don't you create your JavaScript Tapestry validator ? Do you need
absolutely JQuery Validator ?

Manu

2012/3/8 George Christman 

> Hello, I'm using the Tapestry jQuery project with the full removal of
> prototype. I have some rather complex client side validation requiring the
> use of an error box. My question is whether it would be best to disable
> tapestry client side validation and solely use jquery validator or use both
> in conjunction.
>
> What are the pros and cons to Tapestry client side validation in comparison
> to jQuery Validator.
>
> Thanks.
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Tapestry-client-side-validation-vs-jQuery-Validator-tp5547993p5547993.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
>
>


-- 
Emmanuel DEMEY
Ingénieur Etude et Développement
ATOS Worldline
+33 (0)6 47 47 42 02
demey.emman...@gmail.com
http://emmanueldemey.fr

Twitter : @gillespie59


Tapestry client side validation vs jQuery Validator.

2012-03-08 Thread George Christman
Hello, I'm using the Tapestry jQuery project with the full removal of
prototype. I have some rather complex client side validation requiring the
use of an error box. My question is whether it would be best to disable
tapestry client side validation and solely use jquery validator or use both
in conjunction. 

What are the pros and cons to Tapestry client side validation in comparison
to jQuery Validator. 

Thanks.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-client-side-validation-vs-jQuery-Validator-tp5547993p5547993.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: Hwo to redirect to another page from a vois @OnEvent method

2012-03-08 Thread Thiago H. de Paula Figueiredo

On Thu, 08 Mar 2012 12:53:26 -0300, Javix  wrote:


I don't really know, the method signature was defined as void that's why
I'm asking. And as it is void, in java these methods can not return
anything.


Unless this method is overriding another one, just change its return type  
and do the right thing. ;) Using Response.sendRedirect() isn't very  
Tapestry-ish. :)


--
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



SeleniumTestCase.waitForElementToDisappear() does not seem to work

2012-03-08 Thread Dragan Sahpaski
Hi,
In TAP5-1492 [1]  "New features for SeleniumTestCase" one of the added
methods to SeleniumTestCase is waitForElementToDisappear.
The commit [2] is by Howard on 31 Mar 2011.

I want to use it but I just don't get how it could work. The Prototype
hide() documentation [3] briefly says "Hides and returns element".

I don't see it used in any of the tapestry projects and don't know if
anyone has used it before.
Here is the code:

 protected final void waitForElementToDisappear(String elementId)
{
String condition = String.format("window.$(\"%s\").hide()",
elementId);

waitForCondition(condition, PAGE_LOAD_TIMEOUT);
}

IMO this method does not what it is supposed to do.
Can I get support for a JIRA?

[1] TAP5-1492 https://issues.apache.org/jira/browse/TAP5-1492

[2] Commit
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java?p2=%2Ftapestry%2Ftapestry5%2Ftrunk%2Ftapestry-test%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Ftapestry5%2Ftest%2FSeleniumTestCase.java&p1=%2Ftapestry%2Ftapestry5%2Ftrunk%2Ftapestry-test%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Ftapestry5%2Ftest%2FSeleniumTestCase.java&r1=1087494&r2=1087493&view=diff&pathrev=1087494

[3] Prototype hide() function http://prototypejs.org/api/element/hide


Cheers,
Dragan Sahpaski


Re: Hwo to redirect to another page from a vois @OnEvent method

2012-03-08 Thread Javix
I don't really know, the method signature was defined as void that's why
I'm asking. And as it is void, in java these methods can not return
anything.

On 8 March 2012 16:50, Thiago H de Paula Figueiredo [via Tapestry] <
ml-node+s1045711n5547914...@n5.nabble.com> wrote:

> On Thu, 08 Mar 2012 12:17:47 -0300, Javix <[hidden 
> email]>
> wrote:
>
> > Is it possible to redirect to another page from inside a void method
> > annotated as follows:
>
> Does it really need to be void? If you don't want to redirect, just return
>
> null. It's the same as returning void.
>
> --
> 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: [hidden 
> email]
> For additional commands, e-mail: [hidden 
> email]
>
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://tapestry.1045711.n5.nabble.com/How-to-redirect-to-another-page-from-a-void-OnEvent-method-tp5547799p5547914.html
>  To unsubscribe from How to redirect to another page from a void @OnEvent
> method, click 
> here
> .
> NAML
>


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-redirect-to-another-page-from-a-void-OnEvent-method-tp5547799p5547922.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: Hwo to redirect to another page from a vois @OnEvent method

2012-03-08 Thread Thiago H. de Paula Figueiredo

On Thu, 08 Mar 2012 12:17:47 -0300, Javix  wrote:


Is it possible to redirect to another page from inside a void method
annotated as follows:


Does it really need to be void? If you don't want to redirect, just return  
null. It's the same as returning void.


--
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: Hwo to redirect to another page from a vois @OnEvent method

2012-03-08 Thread Dragan Sahpaski
On Thu, Mar 8, 2012 at 4:17 PM, Javix  wrote:

> Is it possible to redirect to another page from inside a void method
> annotated as follows:
>

Yes,

@Inject Response response;

@OnEvent(value = EventConstants.ACTIVATE)
   public void initPage(Object[] parameters)  throws IOException{

  if(something goes wrong) {
   response.sendRedirect("Some url");
 }

Cheers,
Dragan Sahpaski


> @OnEvent(value = EventConstants.ACTIVATE)
>public void initPage(Object[] parameters) {
> 
>   if(something goes wrong) {
>redirect to home page
>  }
>
>
> }
>
> Thank you
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Hwo-to-redirect-to-another-page-from-a-vois-OnEvent-method-tp5547799p5547799.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
>
>


Hwo to redirect to another page from a vois @OnEvent method

2012-03-08 Thread Javix
Is it possible to redirect to another page from inside a void method
annotated as follows:

@OnEvent(value = EventConstants.ACTIVATE)
public void initPage(Object[] parameters) {

   if(something goes wrong) {
redirect to home page
  }


}

Thank you

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Hwo-to-redirect-to-another-page-from-a-vois-OnEvent-method-tp5547799p5547799.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: A strange error with MaxLength Validator

2012-03-08 Thread Lance Java
http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Formatter.html#syntax

On Thursday, 8 March 2012, Rural Hunter  wrote:
> Ah, thanks. Now I understand the message in tapestry 5.2.
>
> 于 2012/3/8 21:08, Taha Hafeez Siddiqi 写道:
>
> You can change the ordering by using %2$s for second argument and %1$s
for second argument. So something like "%2$s and %1$s"
>
> Please do file a JIRA.
>
> regards
> Taha
>
> On Mar 8, 2012, at 6:33 PM, Rural Hunter wrote:
>
> Yes, I overriden the message with the default English one and it works.
But...to translate the message into Chinese in a better way, the order of
the 2 parameters has to be reversed. Is there anyway to handle this
situation?
>
> 于 2012/3/8 18:39, Lance Java 写道:
>
> Try overriding the error message using these instructions:
>
>
http://tapestry.apache.org/forms-and-validation.html#FormsandValidation-CustomizingValidationMessages
>
> Set the error message to something like "no more than %d chars allowed in
> %s"
>
> On Thursday, 8 March 2012, Lance Java   wrote:
>
> What language are your error messages displaying in?
>
> Perhaps there is a bad format in one of the language property files.
>
> FYI, the validator is looking for a property named "maximum-string-length"
>
> On Thursday, 8 March 2012, Lance Java   wrote:
>
> Have you overridden the validation error message?
>
> Tapestry is having troubles showing an error message and is trying to
>
> push a string where an integer should go.
>
> Somewhere in the validation error message, there is a %d where it should
>
> be a %s.
>
> On Thursday, 8 March 2012, Rural Hunter   wrote:
>
> I just meet a strange error with MaxLength Validator with tapestry
>
> 5.3.1. My test page is vary simple(copied from jump start):
>
> Page:
> 
> 
> 
> 
> aaa:
> 
> t:validate="maxlength=5"/>
>
> (required, maxLength=10, letters only)
> 
> 
> 
> 
> 
> 
> 
> 
>
> Then the page run with error:
> CreatingValidators1:firstname (class
>
> org.apache.tapestry5.corelib.components.TextField)
>
> context:CreatingValidators1.tml, line 17
> 12
> 13
> 14
> 15
> 16aaa:
> 17
> t:validate=


Re: A strange error with MaxLength Validator

2012-03-08 Thread Rural Hunter

Ah, thanks. Now I understand the message in tapestry 5.2.

于 2012/3/8 21:08, Taha Hafeez Siddiqi 写道:

You can change the ordering by using %2$s for second argument and %1$s for second 
argument. So something like "%2$s and %1$s"

Please do file a JIRA.

regards
Taha

On Mar 8, 2012, at 6:33 PM, Rural Hunter wrote:


Yes, I overriden the message with the default English one and it works. 
But...to translate the message into Chinese in a better way, the order of the 2 
parameters has to be reversed. Is there anyway to handle this situation?

于 2012/3/8 18:39, Lance Java 写道:

Try overriding the error message using these instructions:

http://tapestry.apache.org/forms-and-validation.html#FormsandValidation-CustomizingValidationMessages

Set the error message to something like "no more than %d chars allowed in
%s"

On Thursday, 8 March 2012, Lance Java   wrote:

What language are your error messages displaying in?

Perhaps there is a bad format in one of the language property files.

FYI, the validator is looking for a property named "maximum-string-length"

On Thursday, 8 March 2012, Lance Java   wrote:

Have you overridden the validation error message?

Tapestry is having troubles showing an error message and is trying to

push a string where an integer should go.

Somewhere in the validation error message, there is a %d where it should

be a %s.

On Thursday, 8 March 2012, Rural Hunter   wrote:

I just meet a strange error with MaxLength Validator with tapestry

5.3.1. My test page is vary simple(copied from jump start):

Page:




aaa:

t:validate="maxlength=5"/>

(required, maxLength=10, letters only)









Then the page run with error:
CreatingValidators1:firstname (class

org.apache.tapestry5.corelib.components.TextField)

context:CreatingValidators1.tml, line 17
12
13
14
15
16aaa:
17
t:validate="maxlength=5"/>

18(required, maxLength=10, letters only)
19
20
21
22

org.apache.tapestry5.ioc.internal.util.TapestryException
d != java.lang.String

location
context:CreatingValidators1.tml, line 17

java.util.IllegalFormatConversionException
d != java.lang.String

argumentClass
class java.lang.String
conversion
d
Filter stack frames Stack trace



  java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:3999)
  java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2709)

java.util.Formatter$FormatSpecifier.print(Formatter.java:2661)
java.util.Formatter.format(Formatter.java:2433)
java.util.Formatter.format(Formatter.java:2367)
java.lang.String.format(String.java:2813)


  
org.apache.tapestry5.ioc.internal.util.MessageFormatterImpl.format(MessageFormatterImpl.java:49)
  org.apache.tapestry5.validator.MaxLength.buildMessage(MaxLength.java:39)
  org.apache.tapestry5.validator.MaxLength.render(MaxLength.java:48)
  org.apache.tapestry5.validator.MaxLength.render(MaxLength.java:23)
  
org.apache.tapestry5.internal.services.FieldValidatorImpl.render(FieldValidatorImpl.java:56)
  
org.apache.tapestry5.internal.services.CompositeFieldValidator.render(CompositeFieldValidator.java:45)
  
org.apache.tapestry5.corelib.base.AbstractTextField.begin(AbstractTextField.java:167)
  
org.apache.tapestry5.corelib.base.AbstractTextField.beginRender(AbstractTextField.java)

I don't understand what happened internally. The same code works fine

with tapestry 5.2.



-
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: A strange error with MaxLength Validator

2012-03-08 Thread Taha Hafeez Siddiqi
You can change the ordering by using %2$s for second argument and %1$s for 
second argument. So something like "%2$s and %1$s"

Please do file a JIRA.

regards
Taha

On Mar 8, 2012, at 6:33 PM, Rural Hunter wrote:

> Yes, I overriden the message with the default English one and it works. 
> But...to translate the message into Chinese in a better way, the order of the 
> 2 parameters has to be reversed. Is there anyway to handle this situation?
> 
> 于 2012/3/8 18:39, Lance Java 写道:
>> Try overriding the error message using these instructions:
>> 
>> http://tapestry.apache.org/forms-and-validation.html#FormsandValidation-CustomizingValidationMessages
>> 
>> Set the error message to something like "no more than %d chars allowed in
>> %s"
>> 
>> On Thursday, 8 March 2012, Lance Java  wrote:
>>> What language are your error messages displaying in?
>>> 
>>> Perhaps there is a bad format in one of the language property files.
>>> 
>>> FYI, the validator is looking for a property named "maximum-string-length"
>>> 
>>> On Thursday, 8 March 2012, Lance Java  wrote:
 Have you overridden the validation error message?
 
 Tapestry is having troubles showing an error message and is trying to
>> push a string where an integer should go.
 Somewhere in the validation error message, there is a %d where it should
>> be a %s.
 On Thursday, 8 March 2012, Rural Hunter  wrote:
> I just meet a strange error with MaxLength Validator with tapestry
>> 5.3.1. My test page is vary simple(copied from jump start):
> Page:
> 
> 
> 
> 
> aaa:
> > t:validate="maxlength=5"/>
> (required, maxLength=10, letters only)
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Then the page run with error:
> CreatingValidators1:firstname (class
>> org.apache.tapestry5.corelib.components.TextField)
> context:CreatingValidators1.tml, line 17
> 12
> 13
> 14
> 15
> 16aaa:
> 17> t:validate="maxlength=5"/>
> 18(required, maxLength=10, letters only)
> 19
> 20
> 21
> 22
> 
> org.apache.tapestry5.ioc.internal.util.TapestryException
> d != java.lang.String
> 
> location
>context:CreatingValidators1.tml, line 17
> 
> java.util.IllegalFormatConversionException
> d != java.lang.String
> 
> argumentClass
>class java.lang.String
> conversion
>d
> Filter stack frames Stack trace
> 
> 
>>  java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:3999)
>>  java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2709)
>java.util.Formatter$FormatSpecifier.print(Formatter.java:2661)
>java.util.Formatter.format(Formatter.java:2433)
>java.util.Formatter.format(Formatter.java:2367)
>java.lang.String.format(String.java:2813)
> 
>>  
>> org.apache.tapestry5.ioc.internal.util.MessageFormatterImpl.format(MessageFormatterImpl.java:49)
>>  org.apache.tapestry5.validator.MaxLength.buildMessage(MaxLength.java:39)
>>  org.apache.tapestry5.validator.MaxLength.render(MaxLength.java:48)
>>  org.apache.tapestry5.validator.MaxLength.render(MaxLength.java:23)
>>  
>> org.apache.tapestry5.internal.services.FieldValidatorImpl.render(FieldValidatorImpl.java:56)
>>  
>> org.apache.tapestry5.internal.services.CompositeFieldValidator.render(CompositeFieldValidator.java:45)
>>  
>> org.apache.tapestry5.corelib.base.AbstractTextField.begin(AbstractTextField.java:167)
>>  
>> org.apache.tapestry5.corelib.base.AbstractTextField.beginRender(AbstractTextField.java)
> I don't understand what happened internally. The same code works fine
>> with tapestry 5.2.
> 
> 
> 
> -
> 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: A strange error with MaxLength Validator

2012-03-08 Thread Rural Hunter
Yes, I overriden the message with the default English one and it works. 
But...to translate the message into Chinese in a better way, the order 
of the 2 parameters has to be reversed. Is there anyway to handle this 
situation?


于 2012/3/8 18:39, Lance Java 写道:

Try overriding the error message using these instructions:

http://tapestry.apache.org/forms-and-validation.html#FormsandValidation-CustomizingValidationMessages

Set the error message to something like "no more than %d chars allowed in
%s"

On Thursday, 8 March 2012, Lance Java  wrote:

What language are your error messages displaying in?

Perhaps there is a bad format in one of the language property files.

FYI, the validator is looking for a property named "maximum-string-length"

On Thursday, 8 March 2012, Lance Java  wrote:

Have you overridden the validation error message?

Tapestry is having troubles showing an error message and is trying to

push a string where an integer should go.

Somewhere in the validation error message, there is a %d where it should

be a %s.

On Thursday, 8 March 2012, Rural Hunter  wrote:

I just meet a strange error with MaxLength Validator with tapestry

5.3.1. My test page is vary simple(copied from jump start):

Page:




aaa:

t:validate="maxlength=5"/>

(required, maxLength=10, letters only)









Then the page run with error:
CreatingValidators1:firstname (class

org.apache.tapestry5.corelib.components.TextField)

context:CreatingValidators1.tml, line 17
12
13
14
15
16aaa:
17
t:validate="maxlength=5"/>

18(required, maxLength=10, letters only)
19
20
21
22

org.apache.tapestry5.ioc.internal.util.TapestryException
d != java.lang.String

location
context:CreatingValidators1.tml, line 17

java.util.IllegalFormatConversionException
d != java.lang.String

argumentClass
class java.lang.String
conversion
d
Filter stack frames Stack trace



  java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:3999)
  java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2709)

java.util.Formatter$FormatSpecifier.print(Formatter.java:2661)
java.util.Formatter.format(Formatter.java:2433)
java.util.Formatter.format(Formatter.java:2367)
java.lang.String.format(String.java:2813)


  
org.apache.tapestry5.ioc.internal.util.MessageFormatterImpl.format(MessageFormatterImpl.java:49)
  org.apache.tapestry5.validator.MaxLength.buildMessage(MaxLength.java:39)
  org.apache.tapestry5.validator.MaxLength.render(MaxLength.java:48)
  org.apache.tapestry5.validator.MaxLength.render(MaxLength.java:23)
  
org.apache.tapestry5.internal.services.FieldValidatorImpl.render(FieldValidatorImpl.java:56)
  
org.apache.tapestry5.internal.services.CompositeFieldValidator.render(CompositeFieldValidator.java:45)
  
org.apache.tapestry5.corelib.base.AbstractTextField.begin(AbstractTextField.java:167)
  
org.apache.tapestry5.corelib.base.AbstractTextField.beginRender(AbstractTextField.java)

I don't understand what happened internally. The same code works fine

with tapestry 5.2.




-
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: ComponentParameters - Binding Expressions - "component:"

2012-03-08 Thread Denis Stepanov
> The pattern that Paul and Thiago are suggesting works fine if that component 
> occurs a single time on a page.  However, if you use it multiple times, the 
> client side zoneId (as well as the Tapestry JS initializers) are not unique 
> any more, which causes the same zone to be updated all the time, no matter 
> which EventLink got the click.

Again and again randomly generated zone id confuses developers. :)

Should I collect all mail posts with that problem at my issue: "Warn user or 
disallow zone with randomly generated id"? :)

https://issues.apache.org/jira/browse/TAP5-1834

Denis

Mar 7, 2012 v 7:09 PM, Jochen Frey:

> That's definitely another way of solving this.  Still goes by way of the java 
> file, but provides a different sort of flexibility.
> 
> Cheers!
> J
> 
> On Mar 7, 2012, at 9:30 AM, Thiago H. de Paula Figueiredo wrote:
> 
>> On Wed, 07 Mar 2012 13:41:02 -0300, Jochen Frey  
>> wrote:
>> 
>>> Thanks guys!
>> 
>> Hi!
>> 
>>> I have a lot of components that are re-used either in loops, or just 
>>> embedded in multiple components (often in the same page).
>>> 
>>> The pattern that Paul and Thiago are suggesting works fine if that 
>>> component occurs a single time on a page.  However, if you use it multiple 
>>> times, the client side zoneId (as well as the Tapestry JS initializers) are 
>>> not unique any more, which causes the same zone to be updated all the time, 
>>> no matter which EventLink got the click.
>> 
>> Again, provide the id yourself, in this case dinamically 
>> (id="${generatedId}"). When you don't provide the id yourself, Tapestry 
>> components generate a random one when it finds the original id, based in 
>> t:id, is already taken.
>> 
>> -- 
>> 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
> 
> ---
>  joc...@jochenfrey.com
>  +1.415.366.0450
>  @jochen_frey
> 



Re: A strange error with MaxLength Validator

2012-03-08 Thread Lance Java
Looks like you've found a bug... please file a jira for it

As a workaround, override the message using the link I sent previously with
a valid error message.

Cheers,
Lance.

On Thursday, 8 March 2012, Rural Hunter  wrote:
> update:
> I found the valication messages. This is from
ValidationMessages.properties:
> maximum-string-length=You may provide at most %d characters for %s.
>
> This is from ValidationMessages_zh_CN.properties:
> maximum-string-length=\u60a8\u6700\u591a\u80fd\u4e3a %s
\u63d0\u4f9b\u81f3\u5c11 %d \u5b57\u7b26\u3002
>
> So looks the order of %s and %d are reversed for zh_CN.
>
> This is from ValidationMessages_zh_CN.properties of tapestry 5.2.6 and it
looks very different with the one in 5.3.1:
> maximum-string-length =
%2$s\u7684\u5185\u5BB9\u4E0D\u80FD\u8D85\u8FC7%1$d\u5B57\u7B26\u3002
> --
> I didn't set any language in this test app. So tapestry might be using my
locale(Chinese). Where can I find the default property setting for Chinese?
>
> 于 2012/3/8 18:14, Lance Java 写道:
>>
>> What language are your error messages displaying in?
>>
>> Perhaps there is a bad format in one of the language property files.
>>
>> FYI, the validator is looking for a property named
"maximum-string-length"
>>
>> On Thursday, 8 March 2012, Lance Java  wrote:
>>
>> Have you overridden the validation error message?
>>
>> Tapestry is having troubles showing an error message and is trying to
>>
>> push a string where an integer should go.
>>
>> Somewhere in the validation error message, there is a %d where it should
>>
>> be a %s.
>>
>> On Thursday, 8 March 2012, Rural Hunter  wrote:
>>
>> I just meet a strange error with MaxLength Validator with tapestry
>>
>> 5.3.1. My test page is vary simple(copied from jump start):
>>
>> Page:
>> 
>> 
>> 
>> 
>> aaa:
>> >
>> t:validate="maxlength=5"/>
>>
>> (required, maxLength=10, letters only)
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> Then the page run with error:
>> CreatingValidators1:firstname (class
>>
>> org.apache.tapestry5.corelib.components.TextField)
>>
>> context:CreatingValidators1.tml, line 17
>> 12
>> 13
>> 14
>> 15
>> 16aaa:
>> 17>
>> t:validate="maxlength=5"/>
>>
>> 18(required, maxLength=10, letters only)
>> 19
>> 20
>> 21
>> 22
>>
>> org.apache.tapestry5.ioc.internal.util.TapestryException
>> d != java.lang.String
>>
>> location
>>context:CreatingValidators1.tml, line 17
>>
>> java.util.IllegalFormatConversionException
>> d != java.lang.String
>>
>> argumentClass
>>class java.lang.String
>> conversion
>>d
>> Filter stack frames Stack trace
>>
>>
>>  java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:3999)
>>  java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2709)
>>
>>java.util.Formatter$FormatSpecifier.print(Formatter.java:2661)
>>java.util.Formatter.format(Formatter.java:2433)
>>java.util.Formatter.format(Formatter.java:2367)
>>java.lang.String.format(String.java:2813)
>>
>>
 
org.apache.tapestry5.ioc.internal.util.MessageFormatterImpl.format(MessageFormatterImpl.java:49)
>>  org.apache.tapestry5.validator.MaxLength.buildMessage(MaxLength.java:39)
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Page refresh with FormFragments

2012-03-08 Thread Beat Durrer
Hi guys

I'm using a RadioGroup which is linked to 3 FormFragments using the
TriggerFragment mixin.
When you select a radio, one of the 3 FormFragments is shown. To not
loose the selection on Validation errors, I added a
@Persist(PersistenceConstants.FLASH) onto the variable which holds the
radio-value.

Now when you select a radio and submit the form, all values are stored
and the form is loaded again. Everything okay so far.
Now if I select a different radio (so a different Fragment is shown)
and hit F5 to refresh the page, the new radio selection is still
active but the wrong fragment is shown (it's the one from the previous
selection).
When I click anywhere into the form, the correct fragment is shown.

I also noticed that behavior in examples, so I guess it's probably not
entirely my fault. Is it a bug? Can I somehow prevent that confusing
behavior?

Examples (just change the radio selection and hit refresh):
http://lombok.demon.co.uk/tapestry5Demo/test/core/formfragmentdemoone
http://lombok.demon.co.uk/tapestry5Demo/test/core/formfragmentdemotwo


Cheers
Beat

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



Re: A strange error with MaxLength Validator

2012-03-08 Thread Rural Hunter

update:
I found the valication messages. This is from ValidationMessages.properties:
maximum-string-length=You may provide at most %d characters for %s.

This is from ValidationMessages_zh_CN.properties:
maximum-string-length=\u60a8\u6700\u591a\u80fd\u4e3a %s 
\u63d0\u4f9b\u81f3\u5c11 %d \u5b57\u7b26\u3002


So looks the order of %s and %d are reversed for zh_CN.

This is from ValidationMessages_zh_CN.properties of tapestry 5.2.6 and 
it looks very different with the one in 5.3.1:
maximum-string-length = 
%2$s\u7684\u5185\u5BB9\u4E0D\u80FD\u8D85\u8FC7%1$d\u5B57\u7B26\u3002

--
I didn't set any language in this test app. So tapestry might be using 
my locale(Chinese). Where can I find the default property setting for 
Chinese?


于 2012/3/8 18:14, Lance Java 写道:

What language are your error messages displaying in?

Perhaps there is a bad format in one of the language property files.

FYI, the validator is looking for a property named "maximum-string-length"

On Thursday, 8 March 2012, Lance Java  wrote:

Have you overridden the validation error message?

Tapestry is having troubles showing an error message and is trying to

push a string where an integer should go.

Somewhere in the validation error message, there is a %d where it should

be a %s.

On Thursday, 8 March 2012, Rural Hunter  wrote:

I just meet a strange error with MaxLength Validator with tapestry

5.3.1. My test page is vary simple(copied from jump start):

Page:




aaa:

t:validate="maxlength=5"/>

(required, maxLength=10, letters only)









Then the page run with error:
CreatingValidators1:firstname (class

org.apache.tapestry5.corelib.components.TextField)

context:CreatingValidators1.tml, line 17
12
13
14
15
16aaa:
17
t:validate="maxlength=5"/>

18(required, maxLength=10, letters only)
19
20
21
22

org.apache.tapestry5.ioc.internal.util.TapestryException
d != java.lang.String

location
context:CreatingValidators1.tml, line 17

java.util.IllegalFormatConversionException
d != java.lang.String

argumentClass
class java.lang.String
conversion
d
Filter stack frames Stack trace



  java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:3999)
  java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2709)

java.util.Formatter$FormatSpecifier.print(Formatter.java:2661)
java.util.Formatter.format(Formatter.java:2433)
java.util.Formatter.format(Formatter.java:2367)
java.lang.String.format(String.java:2813)


  
org.apache.tapestry5.ioc.internal.util.MessageFormatterImpl.format(MessageFormatterImpl.java:49)
  org.apache.tapestry5.validator.MaxLength.buildMessage(MaxLength.java:39)

org.apache.tapestry5.validator.MaxLength.render(MaxLength.java:48)
org.apache.tapestry5.validator.MaxLength.render(MaxLength.java:23)


  
org.apache.tapestry5.internal.services.FieldValidatorImpl.render(FieldValidatorImpl.java:56)
  
org.apache.tapestry5.internal.services.CompositeFieldValidator.render(CompositeFieldValidator.java:45)
  
org.apache.tapestry5.corelib.base.AbstractTextField.begin(AbstractTextField.java:167)
  
org.apache.tapestry5.corelib.base.AbstractTextField.beginRender(AbstractTextField.java)

I don't understand what happened internally. The same code works fine

with tapestry 5.2.




-
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: A strange error with MaxLength Validator

2012-03-08 Thread Rural Hunter
I didn't set any language in this test app. So tapestry might be using 
my locale(Chinese). Where can I find the default property setting for 
Chinese?


于 2012/3/8 18:14, Lance Java 写道:

What language are your error messages displaying in?

Perhaps there is a bad format in one of the language property files.

FYI, the validator is looking for a property named "maximum-string-length"

On Thursday, 8 March 2012, Lance Java  wrote:

Have you overridden the validation error message?

Tapestry is having troubles showing an error message and is trying to

push a string where an integer should go.

Somewhere in the validation error message, there is a %d where it should

be a %s.

On Thursday, 8 March 2012, Rural Hunter  wrote:

I just meet a strange error with MaxLength Validator with tapestry

5.3.1. My test page is vary simple(copied from jump start):

Page:




aaa:

t:validate="maxlength=5"/>

(required, maxLength=10, letters only)









Then the page run with error:
CreatingValidators1:firstname (class

org.apache.tapestry5.corelib.components.TextField)

context:CreatingValidators1.tml, line 17
12
13
14
15
16aaa:
17
t:validate="maxlength=5"/>

18(required, maxLength=10, letters only)
19
20
21
22

org.apache.tapestry5.ioc.internal.util.TapestryException
d != java.lang.String

location
context:CreatingValidators1.tml, line 17

java.util.IllegalFormatConversionException
d != java.lang.String

argumentClass
class java.lang.String
conversion
d
Filter stack frames Stack trace



  java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:3999)
  java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2709)

java.util.Formatter$FormatSpecifier.print(Formatter.java:2661)
java.util.Formatter.format(Formatter.java:2433)
java.util.Formatter.format(Formatter.java:2367)
java.lang.String.format(String.java:2813)


  
org.apache.tapestry5.ioc.internal.util.MessageFormatterImpl.format(MessageFormatterImpl.java:49)
  org.apache.tapestry5.validator.MaxLength.buildMessage(MaxLength.java:39)

org.apache.tapestry5.validator.MaxLength.render(MaxLength.java:48)
org.apache.tapestry5.validator.MaxLength.render(MaxLength.java:23)


  
org.apache.tapestry5.internal.services.FieldValidatorImpl.render(FieldValidatorImpl.java:56)
  
org.apache.tapestry5.internal.services.CompositeFieldValidator.render(CompositeFieldValidator.java:45)
  
org.apache.tapestry5.corelib.base.AbstractTextField.begin(AbstractTextField.java:167)
  
org.apache.tapestry5.corelib.base.AbstractTextField.beginRender(AbstractTextField.java)

I don't understand what happened internally. The same code works fine

with tapestry 5.2.




-
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: ZoneRefresh mixin should cleanup after itself if the zone is destroyed

2012-03-08 Thread Taha Hafeez Siddiqi
Hi Dragan 

Great! Please open a Jira and attach the patch. 

Sent from my iPhone

On Mar 8, 2012, at 4:05 PM, Dragan Sahpaski  wrote:

> Hi,
> We have the following use case:
> A zone with a ZoneRefresh (located in another zone) is updated several
> times and then the outer zone is updated with another block.
> After the update, exceptions are constantly thrown by the javascript
> PeriodicUpdater on this line
> "zoneRefresh.fire(Tapestry.ZONE_REFRESH_EVENT)" because the div element
> that's linked to the zone with Tapestry.Initializer.updateZoneOnEvent is
> not destroyed and the corresponding timer is also not destroyed.
> 
> I think the ZoneRefresh mixin should cleanup after itself in scenarios like
> this.
> 
> If someone this this idea is solid and back it up, I'm willing to work on
> implementing a patch.
> Clearly the improvement code would be internal (mainly javascript and tests
> to back it up), and won't involve public API changes.
> 
> Cheers,
> Dragan Sahpaski

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



Re: A strange error with MaxLength Validator

2012-03-08 Thread Lance Java
Try overriding the error message using these instructions:

http://tapestry.apache.org/forms-and-validation.html#FormsandValidation-CustomizingValidationMessages

Set the error message to something like "no more than %d chars allowed in
%s"

On Thursday, 8 March 2012, Lance Java  wrote:
> What language are your error messages displaying in?
>
> Perhaps there is a bad format in one of the language property files.
>
> FYI, the validator is looking for a property named "maximum-string-length"
>
> On Thursday, 8 March 2012, Lance Java  wrote:
>> Have you overridden the validation error message?
>>
>> Tapestry is having troubles showing an error message and is trying to
push a string where an integer should go.
>>
>> Somewhere in the validation error message, there is a %d where it should
be a %s.
>>
>> On Thursday, 8 March 2012, Rural Hunter  wrote:
>>> I just meet a strange error with MaxLength Validator with tapestry
5.3.1. My test page is vary simple(copied from jump start):
>>> Page:
>>> 
>>> 
>>> 
>>> 
>>> aaa:
>>> 
>>> (required, maxLength=10, letters only)
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>> Then the page run with error:
>>> CreatingValidators1:firstname (class
org.apache.tapestry5.corelib.components.TextField)
>>> context:CreatingValidators1.tml, line 17
>>> 12 
>>> 13 
>>> 14 
>>> 15 
>>> 16 aaa:
>>> 17 
>>> 18 (required, maxLength=10, letters only)
>>> 19 
>>> 20 
>>> 21 
>>> 22 
>>>
>>> org.apache.tapestry5.ioc.internal.util.TapestryException
>>> d != java.lang.String
>>>
>>> location
>>>context:CreatingValidators1.tml, line 17
>>>
>>> java.util.IllegalFormatConversionException
>>> d != java.lang.String
>>>
>>> argumentClass
>>>class java.lang.String
>>> conversion
>>>d
>>> Filter stack frames Stack trace
>>>
>>>
 java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:3999)
>>>
 java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2709)
>>>java.util.Formatter$FormatSpecifier.print(Formatter.java:2661)
>>>java.util.Formatter.format(Formatter.java:2433)
>>>java.util.Formatter.format(Formatter.java:2367)
>>>java.lang.String.format(String.java:2813)
>>>
 
org.apache.tapestry5.ioc.internal.util.MessageFormatterImpl.format(MessageFormatterImpl.java:49)
>>>
 org.apache.tapestry5.validator.MaxLength.buildMessage(MaxLength.java:39)
>>>
 org.apache.tapestry5.validator.MaxLength.render(MaxLength.java:48)
>>>
 org.apache.tapestry5.validator.MaxLength.render(MaxLength.java:23)
>>>
 
org.apache.tapestry5.internal.services.FieldValidatorImpl.render(FieldValidatorImpl.java:56)
>>>
 
org.apache.tapestry5.internal.services.CompositeFieldValidator.render(CompositeFieldValidator.java:45)
>>>
 
org.apache.tapestry5.corelib.base.AbstractTextField.begin(AbstractTextField.java:167)
>>>
 
org.apache.tapestry5.corelib.base.AbstractTextField.beginRender(AbstractTextField.java)
>>>
>>> I don't understand what happened internally. The same code works fine
with tapestry 5.2.
>>>
>>>
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>


ZoneRefresh mixin should cleanup after itself if the zone is destroyed

2012-03-08 Thread Dragan Sahpaski
Hi,
We have the following use case:
A zone with a ZoneRefresh (located in another zone) is updated several
times and then the outer zone is updated with another block.
After the update, exceptions are constantly thrown by the javascript
PeriodicUpdater on this line
"zoneRefresh.fire(Tapestry.ZONE_REFRESH_EVENT)" because the div element
that's linked to the zone with Tapestry.Initializer.updateZoneOnEvent is
not destroyed and the corresponding timer is also not destroyed.

I think the ZoneRefresh mixin should cleanup after itself in scenarios like
this.

If someone this this idea is solid and back it up, I'm willing to work on
implementing a patch.
Clearly the improvement code would be internal (mainly javascript and tests
to back it up), and won't involve public API changes.

Cheers,
Dragan Sahpaski


Re: A strange error with MaxLength Validator

2012-03-08 Thread Lance Java
What language are your error messages displaying in?

Perhaps there is a bad format in one of the language property files.

FYI, the validator is looking for a property named "maximum-string-length"

On Thursday, 8 March 2012, Lance Java  wrote:
> Have you overridden the validation error message?
>
> Tapestry is having troubles showing an error message and is trying to
push a string where an integer should go.
>
> Somewhere in the validation error message, there is a %d where it should
be a %s.
>
> On Thursday, 8 March 2012, Rural Hunter  wrote:
>> I just meet a strange error with MaxLength Validator with tapestry
5.3.1. My test page is vary simple(copied from jump start):
>> Page:
>> 
>> 
>> 
>> 
>> aaa:
>> 
>> (required, maxLength=10, letters only)
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> Then the page run with error:
>> CreatingValidators1:firstname (class
org.apache.tapestry5.corelib.components.TextField)
>> context:CreatingValidators1.tml, line 17
>> 12 
>> 13 
>> 14 
>> 15 
>> 16 aaa:
>> 17 
>> 18 (required, maxLength=10, letters only)
>> 19 
>> 20 
>> 21 
>> 22 
>>
>> org.apache.tapestry5.ioc.internal.util.TapestryException
>> d != java.lang.String
>>
>> location
>>context:CreatingValidators1.tml, line 17
>>
>> java.util.IllegalFormatConversionException
>> d != java.lang.String
>>
>> argumentClass
>>class java.lang.String
>> conversion
>>d
>> Filter stack frames Stack trace
>>
>>
 java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:3999)
>>
 java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2709)
>>java.util.Formatter$FormatSpecifier.print(Formatter.java:2661)
>>java.util.Formatter.format(Formatter.java:2433)
>>java.util.Formatter.format(Formatter.java:2367)
>>java.lang.String.format(String.java:2813)
>>
 
org.apache.tapestry5.ioc.internal.util.MessageFormatterImpl.format(MessageFormatterImpl.java:49)
>>
 org.apache.tapestry5.validator.MaxLength.buildMessage(MaxLength.java:39)
>>org.apache.tapestry5.validator.MaxLength.render(MaxLength.java:48)
>>org.apache.tapestry5.validator.MaxLength.render(MaxLength.java:23)
>>
 
org.apache.tapestry5.internal.services.FieldValidatorImpl.render(FieldValidatorImpl.java:56)
>>
 
org.apache.tapestry5.internal.services.CompositeFieldValidator.render(CompositeFieldValidator.java:45)
>>
 
org.apache.tapestry5.corelib.base.AbstractTextField.begin(AbstractTextField.java:167)
>>
 
org.apache.tapestry5.corelib.base.AbstractTextField.beginRender(AbstractTextField.java)
>>
>> I don't understand what happened internally. The same code works fine
with tapestry 5.2.
>>
>>
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>


Re: [Tapestry5-jquery ajaxupload] How to change "Drop files here to upload" with button ?

2012-03-08 Thread ayok03
oke i realize bcos configuration 



i change to 




Worked!!




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry5-jquery-ajaxupload-How-to-change-Drop-files-here-to-upload-with-button-tp5543058p5546960.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: A strange error with MaxLength Validator

2012-03-08 Thread Rural Hunter
No, I didn't set any validation message. Just the tml and java files for 
the page.


于 2012/3/8 17:41, Lance Java 写道:

Have you overridden the validation error message?

Tapestry is having troubles showing an error message and is trying to push
a string where an integer should go.

Somewhere in the validation error message, there is a %d where it should be
a %s.

On Thursday, 8 March 2012, Rural Hunter  wrote:

I just meet a strange error with MaxLength Validator with tapestry 5.3.1.

My test page is vary simple(copied from jump start):

Page:




aaa:

t:validate="maxlength=5"/>

(required, maxLength=10, letters only)









Then the page run with error:
CreatingValidators1:firstname (class

org.apache.tapestry5.corelib.components.TextField)

context:CreatingValidators1.tml, line 17
12
13
14
15
16aaa:
17
t:validate="maxlength=5"/>

18(required, maxLength=10, letters only)
19
20
21
22

org.apache.tapestry5.ioc.internal.util.TapestryException
d != java.lang.String

location
context:CreatingValidators1.tml, line 17

java.util.IllegalFormatConversionException
d != java.lang.String

argumentClass
class java.lang.String
conversion
d
Filter stack frames Stack trace



  java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:3999)
  java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2709)

java.util.Formatter$FormatSpecifier.print(Formatter.java:2661)
java.util.Formatter.format(Formatter.java:2433)
java.util.Formatter.format(Formatter.java:2367)
java.lang.String.format(String.java:2813)


  
org.apache.tapestry5.ioc.internal.util.MessageFormatterImpl.format(MessageFormatterImpl.java:49)
  org.apache.tapestry5.validator.MaxLength.buildMessage(MaxLength.java:39)

org.apache.tapestry5.validator.MaxLength.render(MaxLength.java:48)
org.apache.tapestry5.validator.MaxLength.render(MaxLength.java:23)


  
org.apache.tapestry5.internal.services.FieldValidatorImpl.render(FieldValidatorImpl.java:56)
  
org.apache.tapestry5.internal.services.CompositeFieldValidator.render(CompositeFieldValidator.java:45)
  
org.apache.tapestry5.corelib.base.AbstractTextField.begin(AbstractTextField.java:167)
  
org.apache.tapestry5.corelib.base.AbstractTextField.beginRender(AbstractTextField.java)

I don't understand what happened internally. The same code works fine

with tapestry 5.2.




-
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: Rendering components in Alerts

2012-03-08 Thread Magnus Kvalheim
Thanks Kalle,

For alerts I created issue:  https://issues.apache.org/jira/browse/TAP5-1863


For the more general renderer for blocks:
https://issues.apache.org/jira/browse/TAP5-1864

--magnus

On Wed, Mar 7, 2012 at 8:20 PM, Kalle Korhonen
wrote:

> On Wed, Mar 7, 2012 at 12:17 AM, Magnus Kvalheim 
> wrote:
> > We've just upgraded to 5.3.2 and checked out some of the new components.
> > The Alerts seems pretty useful, but looks like it's only possible to pass
> > on strings.
> > I'm thinking a pretty common use-case would be to render some
> > components/markup in it - like links.
> > I experimented a little by manually rendering a block and pass that on to
> > alertManager. Got some inspiration from this thread about rendering
> blocks
> > *alertManager.info(markupWriter.toString());*
> > That seems to work, but it's a bit clumsy and don't know if it's
> > the recommended approach for rendering blocks. Does a convenience method
> > exist for rendering blocks/components?
> > Not sure if it's possible, but how about if one could pass blocks to
> alerts
> > directly. That could be pretty flexible as well...
>
> Certainly the recommended approach is to use the provided render
> queue, rather than create your own - but obviously the current
> implementation doesn't always allow to do so. Completely agree with
> you that rendering links, and, in general, rendering blocks would be
> very useful for alerts. I don't see any major issue why it couldn't be
> supported. Please open an issue for it.
>
> Kalle
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: A strange error with MaxLength Validator

2012-03-08 Thread Lance Java
Have you overridden the validation error message?

Tapestry is having troubles showing an error message and is trying to push
a string where an integer should go.

Somewhere in the validation error message, there is a %d where it should be
a %s.

On Thursday, 8 March 2012, Rural Hunter  wrote:
> I just meet a strange error with MaxLength Validator with tapestry 5.3.1.
My test page is vary simple(copied from jump start):
> Page:
> 
> 
> 
> 
> aaa:
> 
> (required, maxLength=10, letters only)
> 
> 
> 
> 
> 
> 
> 
> 
>
> Then the page run with error:
> CreatingValidators1:firstname (class
org.apache.tapestry5.corelib.components.TextField)
> context:CreatingValidators1.tml, line 17
> 12 
> 13 
> 14 
> 15 
> 16 aaa:
> 17 
> 18 (required, maxLength=10, letters only)
> 19 
> 20 
> 21 
> 22 
>
> org.apache.tapestry5.ioc.internal.util.TapestryException
> d != java.lang.String
>
> location
>context:CreatingValidators1.tml, line 17
>
> java.util.IllegalFormatConversionException
> d != java.lang.String
>
> argumentClass
>class java.lang.String
> conversion
>d
> Filter stack frames Stack trace
>
>
 java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:3999)
>
 java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2709)
>java.util.Formatter$FormatSpecifier.print(Formatter.java:2661)
>java.util.Formatter.format(Formatter.java:2433)
>java.util.Formatter.format(Formatter.java:2367)
>java.lang.String.format(String.java:2813)
>
 
org.apache.tapestry5.ioc.internal.util.MessageFormatterImpl.format(MessageFormatterImpl.java:49)
>
 org.apache.tapestry5.validator.MaxLength.buildMessage(MaxLength.java:39)
>org.apache.tapestry5.validator.MaxLength.render(MaxLength.java:48)
>org.apache.tapestry5.validator.MaxLength.render(MaxLength.java:23)
>
 
org.apache.tapestry5.internal.services.FieldValidatorImpl.render(FieldValidatorImpl.java:56)
>
 
org.apache.tapestry5.internal.services.CompositeFieldValidator.render(CompositeFieldValidator.java:45)
>
 
org.apache.tapestry5.corelib.base.AbstractTextField.begin(AbstractTextField.java:167)
>
 
org.apache.tapestry5.corelib.base.AbstractTextField.beginRender(AbstractTextField.java)
>
> I don't understand what happened internally. The same code works fine
with tapestry 5.2.
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


A strange error with MaxLength Validator

2012-03-08 Thread Rural Hunter
I just meet a strange error with MaxLength Validator with tapestry 
5.3.1. My test page is vary simple(copied from jump start):

Page:




aaa:
t:validate="maxlength=5"/>

(required, maxLength=10, letters only)









Then the page run with error:
CreatingValidators1:firstname (class 
org.apache.tapestry5.corelib.components.TextField)

context:CreatingValidators1.tml, line 17
12 
13 
14 
15 
16 aaa:
17 t:validate="maxlength=5"/>

18 (required, maxLength=10, letters only)
19 
20 
21 
22 

org.apache.tapestry5.ioc.internal.util.TapestryException
d != java.lang.String

location
context:CreatingValidators1.tml, line 17

java.util.IllegalFormatConversionException
d != java.lang.String

argumentClass
class java.lang.String
conversion
d
Filter stack frames Stack trace


java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:3999)

java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2709)

java.util.Formatter$FormatSpecifier.print(Formatter.java:2661)
java.util.Formatter.format(Formatter.java:2433)
java.util.Formatter.format(Formatter.java:2367)
java.lang.String.format(String.java:2813)

org.apache.tapestry5.ioc.internal.util.MessageFormatterImpl.format(MessageFormatterImpl.java:49)

org.apache.tapestry5.validator.MaxLength.buildMessage(MaxLength.java:39)

org.apache.tapestry5.validator.MaxLength.render(MaxLength.java:48)
org.apache.tapestry5.validator.MaxLength.render(MaxLength.java:23)

org.apache.tapestry5.internal.services.FieldValidatorImpl.render(FieldValidatorImpl.java:56)

org.apache.tapestry5.internal.services.CompositeFieldValidator.render(CompositeFieldValidator.java:45)

org.apache.tapestry5.corelib.base.AbstractTextField.begin(AbstractTextField.java:167)

org.apache.tapestry5.corelib.base.AbstractTextField.beginRender(AbstractTextField.java) 



I don't understand what happened internally. The same code works fine 
with tapestry 5.2.





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