Why does AbstractComponentEventLink require a Zone?

2012-01-03 Thread Jochen Frey
Hi! I am somewhat new to Tapestry (loving it). I am trying to piggy back updates/calls to JavaScript components on my page onto responses to EventLink or ActionLink requests. Imagine a page with multiple charts on it, and on any click I want to be able to update any chart widget if the serv

Re: mixins Confirm is invalid

2012-01-03 Thread Taha Hafeez
This is what works for me in jquery (function($) { $.extend(Tapestry.Initializer, { confirm: function(params) { $("#" + params.element).bind(params.event, function(event) { if (!confirm(params.message)) { event.preventDefault();

Re: mixins Confirm is invalid

2012-01-03 Thread dick_hu
Taha Hafeez wrote > > Try event.preventDefault() instead of Event.stop(event) > > I think that will do > > > It failed also. thank you. -- View this message in context: http://tapestry.1045711.n5.nabble.com/mixins-Confirm-is-invalid-tp5118652p5118771.html Sent from the Tapestry - User

Re: mixins Confirm is invalid

2012-01-03 Thread Taha Hafeez
Try event.preventDefault() instead of Event.stop(event) I think that will do On Wed, Jan 4, 2012 at 10:16 AM, dick_hu wrote: > No, it means the confirm does not stop the event when I click the cancel > button in the dialog. > Taha Hafeez wrote >> >> Hi >> >> What do you mean when you say it is

Re: mixins Confirm is invalid

2012-01-03 Thread dick_hu
No, it means the confirm does not stop the event when I click the cancel button in the dialog. Taha Hafeez wrote > > Hi > > What do you mean when you say it is invalid ? > > Is there any error ? > > > -- View this message in context: http://tapestry.1045711.n5.nabble.com/mixins-Confirm-is-

Re: mixins Confirm is invalid

2012-01-03 Thread Taha Hafeez
Hi What do you mean when you say it is invalid ? Is there any error ? On Wed, Jan 4, 2012 at 9:20 AM, dick_hu wrote: > I add a mixins "Confirm" to a EventLink,When the eventlink request is xhr > will return a zone,the mixins > is invalid. > > the mixins's  java is > @Import(library = "confirm.

Re: Why Components in Loop are the only one instance? What should I do?

2012-01-03 Thread Josh Canfield
> Is there some other solutions? If sometimes I put my existing complex > Component into a Loop, It will not work. There are many solutions. It all depends on where your complexity is. It sounds like you need to work out a communication mechanism between your component and it's container. Presuma

mixins Confirm is invalid

2012-01-03 Thread dick_hu
I add a mixins "Confirm" to a EventLink,When the eventlink request is xhr will return a zone,the mixins is invalid. the mixins's java is @Import(library = "confirm.js") public class Confirm { @InjectContainer private ClientElement container; @Inject private Java

Re: Why Components in Loop are the only one instance? What should I do?

2012-01-03 Thread Bo Gao
>> I have changed all the values I want to persist to context values and it >> works for me now.> Is this the only way to solve this problem? > > Probably not, but it seems like a fine solution. Is there some other solutions? If sometimes I put my existing complex Component into a Loop, It will

Re: jquery

2012-01-03 Thread François Facon
configuration.add(JQuerySymbolConstants.SUPPRESS_PROTOTYPE, "false"); Make your application use Prototype and the default tapestry.js with jQuery in no-conflict mode but in this case $ is the shortcut for Prototype. That's why your code is not working. in this "backward compatibility" mode you ca

Re: Difference between renderSupport.addScript and JSON addInit(function, JSON Object)

2012-01-03 Thread Thiago H. de Paula Figueiredo
On Wed, 28 Dec 2011 14:40:12 -0200, Javix wrote: In javascript, I just replaced arguments by jsonObject: function load(jsonObject){ ... //acces to the variable in JSON errorText.text(jsonObject.m2) } Why in case of JSON it DOES NOT WORK ? From the addInit() JavaDoc, specifically the first p

Re: How to handle urls for a White Label site

2012-01-03 Thread Thiago H. de Paula Figueiredo
On Tue, 03 Jan 2012 13:00:42 -0200, captain_rhino wrote: Currently I have a very messy way of passing a context (the context indicates which prtner site it is from) through so as the PageRenderLinkTransformer can then use this context to dynamically create the url displayed to the user? I'd

Re: Beaneditor bug null property error

2012-01-03 Thread Thiago H. de Paula Figueiredo
On Tue, 03 Jan 2012 16:33:59 -0200, felipexz wrote: Yes of course I agree. But when you have Annotated fields, it can be instatiated in other classes, can't be ? Remember: instantiate a class = using the Java "new" operator. How I would know that it's not already been instatiated ? That's a

Re: Beaneditor bug null property error

2012-01-03 Thread Thiago H. de Paula Figueiredo
On Tue, 03 Jan 2012 16:02:50 -0200, felipexz wrote: Hi Sven.. I read it but the method on"Something" is a convention ? Sorry but I'm new on Tapestry so I don't know. Yes: http://tapestry.apache.org/component-events.html I only found about the "onPrepare" in the wiki http://wiki.apache.org/t

Re: Beaneditor bug null property error

2012-01-03 Thread felipexz
Yes of course I agree. But when you have Annotated fields, it can be instatiated in other classes, can't be ? How I would know that it's not already been instatiated ? That's an annotated field. I'm justing asking.. as I said I'm a newbie. Best regards -- View this message in context: http://ta

Re: jquery

2012-01-03 Thread csckid
I wrote this two lines in the Appmodule configuration.add(JQuerySymbolConstants.JQUERY_ALIAS, "$j"); configuration.add(JQuerySymbolConstants.SUPPRESS_PROTOTYPE, "false"); Now everything is working i.e. autocomplete mixin, jquery/tooltip, tapestry validation, (function( $ ) { $(document).ready

Re: T5 progress bar in a grid

2012-01-03 Thread Lance Java
I have created a component to hide all the gubbins that I mentioned earlier. All you need to do is create a more beautiful progress bar (my css skills aren't great). I have created a simple page which adds 3 progressRunnableLinks on a page. Each fires a task that takes 10 seconds, updating it's per

Re: Beaneditor bug null property error

2012-01-03 Thread Sven Homburg
The prefered convention in java : instantiate an class before work with it. the documentation advise you only, where it make sense to do this job ;-) with regards Sven Homburg Founder of the Chenille Kit Project http://chenillekit.codehaus.org 2012/1/3 felipexz : > Hi Sven.. I read it but the

Re: Beaneditor bug null property error

2012-01-03 Thread felipexz
Hi Sven.. I read it but the method on"Something" is a convention ? Sorry but I'm new on Tapestry so I don't know. I only found about the "onPrepare" in the wiki http://wiki.apache.org/tapestry/Tapestry5HowToUseForms So I think if its a convention ok, right. But if not I think it should be in the

Re: Is it possible to initialize a custom SymbolProvider with another symbol?

2012-01-03 Thread Howard Lewis Ship
It is not possible. However, you can initialize a symbol with another symbol's value: configuration.add("my.new.symbol", "${some.other.symbol}") Tapestry does a good job of detecting and reporting any unintentional cycles you might create this way. On Tue, Jan 3, 2012 at 7:59 AM, Borut Bolčina

Re: Beaneditor bug null property error

2012-01-03 Thread Sven Homburg
have a look at this page http://tapestry.apache.org/forms-and-validation.html ""When rendering, the Form component emits two notifications: first, "prepareForRender", then "prepare". These allow the Form's container to setup any fields or properties that will be referenced in the form. For exampl

Re: Why Components in Loop are the only one instance? What should I do?

2012-01-03 Thread Josh Canfield
> I have changed all the values I want to persist to context values and it > works for me now.> Is this the only way to solve this problem? Probably not, but it seems like a fine solution. On Mon, Jan 2, 2012 at 6:04 PM, Elivoa wrote: > I have a zone in my component. And an event link to refresh

Re: Beaneditor bug null property error

2012-01-03 Thread felipexz
Hi, now its working but I think you should add this "hint" in the documentantion and at the Tutorial. I know we need to initialize the class but where was my problem. The working code is: public class CreateMunicipio { @Property @Persist private Municipio municipio;

Re: Beaneditor bug null property error

2012-01-03 Thread Lenny Primak
I Don't see you initializing the municipio variable anywhere in your code. You need something like setupRender and initialize it via new if it is null. On Jan 3, 2012, at 12:14 PM, felipexz wrote: > I'm using Tomcat 7 and java 1.7.. its a problem ? > > -- > View this message in context: >

Re: Beaneditor bug null property error

2012-01-03 Thread felipexz
I'm using Tomcat 7 and java 1.7.. its a problem ? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Beaneditor-sending-null-object-tp5115312p5117434.html Sent from the Tapestry - User mailing list archive at Nabble.com. ---

Re: Beaneditor bug null property error

2012-01-03 Thread felipexz
Hi, I think the problem is not about Persistence... the problem is municipio is coming null. Anyway I tryed with session.merge.. anyway it says idMunicipio cannot be null. Best regards -- View this message in context: http://tapestry.1045711.n5.nabble.com/Beaneditor-sending-null-object-tp511531

Re: Beaneditor bug null property error

2012-01-03 Thread Thiago H. de Paula Figueiredo
On Tue, 03 Jan 2012 14:50:03 -0200, felipexz wrote: I tryed.. after the beaneditor submit it should persist my object.. but it comes null. And I get this error: Caused by: org.hibernate.PersistentObjectException: detached entity passed to persist: com.icms.feam.entities.Municipio Use Ses

Re: Beaneditor bug null property error

2012-01-03 Thread felipexz
I tryed.. after the beaneditor submit it should persist my object.. but it comes null. And I get this error: Caused by: org.hibernate.PersistentObjectException: detached entity passed to persist: com.icms.feam.entities.Municipio Best regards -- View this message in context: http://tapestry.104

Re: Beaneditor bug null property error

2012-01-03 Thread Thiago H. de Paula Figueiredo
On Tue, 03 Jan 2012 14:38:14 -0200, felipexz wrote: Hi, thank you Thiago.. the code is this: public class CreateMunicipio { @Property private Municipio municipio; When I try to run it.. my object municipio is null in CreateMunicipio.class why ? I'm filling it in my beane

Re: Beaneditor bug null property error

2012-01-03 Thread felipexz
Hi, thank you Thiago.. the code is this: public class CreateMunicipio { @Property private Municipio municipio; @Inject private Session session; @CommitAfter Object onSuccess() { session.persist(municipio);

Re: Beaneditor bug null property error

2012-01-03 Thread Thiago H. de Paula Figueiredo
On Tue, 03 Jan 2012 14:19:00 -0200, felipexz wrote: I'm sorry but my questions are not cleary ? Hi! No, they weren't clear. Please post code and the full stack trace (if any). Without them, we can only guess what's happening. ;) No, tapestry-hibernate doesn't support Hibernate 4 yet, but

Re: Beaneditor bug null property error

2012-01-03 Thread felipexz
I'm sorry but my questions are not cleary ? Best regards -- View this message in context: http://tapestry.1045711.n5.nabble.com/Beaneditor-sending-null-object-tp5115312p5117279.html Sent from the Tapestry - User mailing list archive at Nabble.com. ---

Re: Beaneditor bug null property error

2012-01-03 Thread Howard Lewis Ship
http://catb.org/esr/faqs/smart-questions.html On Mon, Jan 2, 2012 at 12:11 PM, felipexz wrote: > Hi people, good evening. I'm trying to develop an application using > Beaneditor like the Tapestry tutorial but when I try to persist is in my > create java page my entity that I @Inject is comming nu

Beaneditor bug null property error

2012-01-03 Thread felipexz
Hi people, good evening. I'm trying to develop an application using Beaneditor like the Tapestry tutorial but when I try to persist is in my create java page my entity that I @Inject is comming null. I tryed at first with eclipselink and now with hibernate using Session I got same problem. Would i

Re: Is it possible to initialize a custom SymbolProvider with another symbol?

2012-01-03 Thread Borut Bolčina
Hi, I would still like an advice on the approach on how to initialize custom symbol provider with tapestry provided symbol. The code below ends in IllegalStateException Construction of service 'SymbolSource' has failed due to recursion: the service depends on itself in some way. The code from A

Re: How to handle urls for a White Label site

2012-01-03 Thread captain_rhino
I got some basic rewriting of differrent partners working. One for Lloyds and one for Amex. Simple requests such as http://localhost:8080/makeaclaim/lloyds/test or http://localhost:8080/makeaclaim/amex/test got url rewrote to makeaclaim.partner.test So good so far. I have a Test class where

Object [object Object] has no method 'attachEvent'

2012-01-03 Thread gs_tapestry
I guess most people still in holiday mood :-). Happy new year to everyone ! Let me try this again. Hopefully someone had experience with my issue. Thanks in advance, Simon -- View this message in context: http://tapestry.1045711.n5.nabble.com/A-TAP5-586-alike-issue-tp5110620p5116997.html Sent

Re: jquery

2012-01-03 Thread Emmanuel DEMEY
Can you override the JQuerySymbolConstants.JQUERY_ALIAS constant in your AppModule : configuration.add(JQuerySymbolConstants.JQUERY_ALIAS, "$j"); in order to override the jQuery Alias. 2012/1/3 csckid > With this line > configuration.add(JQuerySymbolConstants.SUPPRESS_PROTOTYPE, "false"); > >

Re: jquery

2012-01-03 Thread csckid
With this line configuration.add(JQuerySymbolConstants.SUPPRESS_PROTOTYPE, "false"); This code works (function( $ ) { $(document).ready(function(){ alert("ok"); }); }) ( jQuery ); But the problem is jquery/tooltip mixin doesn't work now. -- View this message in context: http://tapestry.1045711

Re: jquery

2012-01-03 Thread Emmanuel DEMEY
With SUPPRESS_PROTOTYPE to false, all your jQuery code should work ! Can you test this code : (function( $ ) { $(document).ready(function(){ alert("ok"); }); }) ( jQuery ); There is probably a conflict between the "$". 2012/1/2 csckid > I am using tapestry5-jquery version 2.6.1 > > When I wro

Re: 5.3.1 upgrade error : class has been transformed and may not be directly instantiated.

2012-01-03 Thread Thiago H. de Paula Figueiredo
On Wed, 28 Dec 2011 15:24:20 -0200, Andrew Dahl wrote: "Class us.venses.core.base.util.IndexedObject has been transformed and may not be directly instantiated." I am getting this error on a class after upgrading to 5.3.1 from 5.2.6. The class is referenced from a component, but is not in

Re: T5 progress bar in a grid

2012-01-03 Thread Lance Java
There are a couple of approaches to do this, since tapestry does not support ajax push (aka reverse ajax) out-of-the box, a simple solution would be to have the client poll the server for the current percentage complete. In order to display a progress bar to the client, you must do the actual work