Re: 5.1 : Dynamic add (and remove) JS taspestry validator

2011-04-12 Thread TNO
Nobody... Le 10/04/2011 17:31, TNO a écrit : Hi everybody, I try to do dynamic cross validation on two fields. I have a grid into a form. On each row, I have a select field (OK and KO) and a textarea commentary. When the user select KO, commentary is enabled and his value is required. When

Re: Tapestry Using Ajax

2011-04-12 Thread robnangle
Taha Hafeez wrote: If page is not loading fully, it might be a because of recursive ajax calls I am calling several different event methods? Would that be the cause? Taha Hafeez wrote: http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/zonewithoutyellowfade I

RE: Possible error in Tapestry.js

2011-04-12 Thread Jim O'Callaghan
Thanks for the link Taha. Not sure if the fix for this is external, or if there should be some kind of try/catch in Tapestry JS that uses $(this.form) as a fallback. Regards, Jim. - To unsubscribe, e-mail:

Re: Possible error in Tapestry.js

2011-04-12 Thread Taha Hafeez
I agree, it should be in tapestry.js regards Taha On Tue, Apr 12, 2011 at 3:19 PM, Jim O'Callaghan jc1000...@yahoo.co.ukwrote: Thanks for the link Taha. Not sure if the fix for this is external, or if there should be some kind of try/catch in Tapestry JS that uses $(this.form) as a

Re: Components communication with nested components

2011-04-12 Thread Kristian Marinkovic
Declaring all possible values as parameters leads to high coupling. Just imagine declaring the parameters in a hierarchy of 5 components just to have it. I'd use Environmental services to pass data between different component hierarchies. You can also apply the MVC pattern: create a service

Re: Components communication with nested components

2011-04-12 Thread Taha Hafeez
I am also using @Environmental but it is not availiable at all times. e.g. when the nested component contains a form and that form is submitted... So in order to deal with it I use @Persist, first time around and on form submission I use the persisted value as the environment does not contain the

Re: Tapestry Using Ajax

2011-04-12 Thread Taha Hafeez
Hi If you share some code, that would be helpful regards Taha On Tue, Apr 12, 2011 at 3:07 PM, robnangle robnan...@gmail.com wrote: Taha Hafeez wrote: If page is not loading fully, it might be a because of recursive ajax calls I am calling several different event methods? Would

Re: Tapestry Using Ajax

2011-04-12 Thread robnangle
Code below for java: public Object onChangeOfKeeper() { keeper = _request.getParameter(param); if (keeper == null) { captains = null; } else if (keeper != null) { captains.add(keeper);

Re: Components communication with nested components

2011-04-12 Thread Kristian Marinkovic
there are two phases in tapestry: the action phase and the render phase. for every phase you have to set your environmental services explicitly. i often have services that use the ApplicationStateManager service directly to access the persisted data, so my components are only aware of the

Re: Tapestry Using Ajax

2011-04-12 Thread Taha Hafeez
From what you have shared, you have a common zone for all the selects and for each 'onchange' event of the selects this zone is updated. This may cause change in other selects which might result in recursive zone updates and hence the flashing. In order to prevent the yellow fade, set update in

Re: Components communication with nested components

2011-04-12 Thread Taha Hafeez
If i understand correctly, it is possible to use @Environmental in render phase, as the parent and nested components both go through that phase but in action phase only the nested component events will be called. Your second suggestion seems very interesting. It will be very helpful if you can

Re: accessing fields marked with @Property in Grid component

2011-04-12 Thread littlejoysoftware
Thanks. -- View this message in context: http://tapestry.1045711.n5.nabble.com/accessing-fields-marked-with-Property-in-Grid-component-tp4296037p4297997.html Sent from the Tapestry - User mailing list archive at Nabble.com. -

Re: @Broadcast annotation

2011-04-12 Thread Thiago H. de Paula Figueiredo
On Tue, 12 Apr 2011 08:48:59 -0300, tmar...@gmx.de wrote: Hello again! Hi! Is there any way to get the @Broadcast annotation from Atmosphere: http://atmosphere.java.net/nonav/apidocs/org/atmosphere/annotation/Broadcast.html working inside of a Tapestry5 page or component? I never tried

Re: Tapestry Using Ajax

2011-04-12 Thread robnangle
Taha Hafeez wrote: From what you have shared, you have a common zone for all the selects and for each 'onchange' event of the selects this zone is updated. This may cause change in other selects which might result in recursive zone updates and hence the flashing. In order to prevent the

Re: Required a sample program in Tapestry 4.1.3 which demonstrates AJAX Functionality

2011-04-12 Thread LLTYK
Here's an example of @EventListener I found floating around. Using the annotation magically adds a javascript method to a certain div on the page. @EventListener(elements = FooJsEventSource, events = foo) public void doFoo() { log.trace(doFoo); } -- View this message in

Re: accessing fields marked with @Property in Grid component

2011-04-12 Thread Howard Lewis Ship
Tapestry annotations are themselves annotated to indicate where they can be used. On Apr 11, 2011 7:26 AM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: On Mon, 11 Apr 2011 11:23:02 -0300, littlejoysoftware littlejoysoftw...@me.com wrote: I'm working through the examples in Tapestry

RE: Possible error in Tapestry.js

2011-04-12 Thread Jim O'Callaghan
Can any of the Tapestry committers vet this before I add a JIRA - thanks. Regards, Jim. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org

RE: Possible error in Tapestry.js

2011-04-12 Thread Richard Hill
Incidently, I had a possibly related problem a while back, also IE8. Original mail attached. A wild guess, but it could be something to do with the way IE8 tries to parallelarise loading and interpreting of js assets. R. On Tue, 2011-04-12 at 15:22 +0100, Jim O'Callaghan wrote: Can any of

RE: Possible error in Tapestry.js

2011-04-12 Thread Jim O'Callaghan
Thanks Richard – it doesn’t appear to be a million miles off – in my case the POST does get made also, but as you say, it’s not ideal. Any other suggestions for a fix / workaround welcome. The JS in tapestry.js looks pretty gritty. Regards, Jim.

T5: @Property(create=true) ?

2011-04-12 Thread Adam Zimowski
Maybe I'm over-thinking here... I find a lot of times I have to do this: @Property private AddressUiBean address; @SetupRender void init() { if(address == null) address = new AddressUiBean(); } What would be super nice, following the spirit of @SessionState, is this: @Property(create=true)

Re: T5: @Property(create=true) ?

2011-04-12 Thread Christophe Cordenier
My response is not directly related to your question, by the way... in previous version of T5 it was possible to initiliaze the value of persistent variables at declaration time. And this value was considered as the default value. This feature was the cause of session conflicts, more precisely, i

Re: T5: @Property(create=true) ?

2011-04-12 Thread Thiago H. de Paula Figueiredo
On Tue, 12 Apr 2011 13:52:10 -0300, Christophe Cordenier christophe.corden...@gmail.com wrote: My response is not directly related to your question, by the way... in previous version of T5 it was possible to initiliaze the value of persistent variables at declaration time. And this value

Re: T5: @Property(create=true) ?

2011-04-12 Thread Thiago H. de Paula Figueiredo
On Tue, 12 Apr 2011 13:34:17 -0300, Adam Zimowski zimowsk...@gmail.com wrote: Maybe I'm over-thinking here... I find a lot of times I have to do this: @Property private AddressUiBean address; @SetupRender void init() { if(address == null) address = new AddressUiBean(); } Why not activate

Re: T5: @Property(create=true) ?

2011-04-12 Thread Adam Zimowski
You have a point Thiago, I will try other init phases, I suppose just a habit, and it worked :) In regards to your comment on page pool Now that Tap isn't using it, would auto create property instance be an issue? Just curious.. Adam On Tue, Apr 12, 2011 at 12:19 PM, Thiago H. de Paula

Re: T5: @Property(create=true) ?

2011-04-12 Thread Thiago H. de Paula Figueiredo
On Tue, 12 Apr 2011 14:25:31 -0300, Adam Zimowski zimowsk...@gmail.com wrote: You have a point Thiago, I will try other init phases, I suppose just a habit, and it worked :) It works, but which event to use is a very scenario-specific decision. :) In regards to your comment on page

Re: T5: @Property(create=true) ?

2011-04-12 Thread Howard Lewis Ship
This wouldn't have to be an extension to the @Property annotation, it could be a new annotation, (say) @AutoCreate, perhaps with a value to say when (initialize, setup render, etc.). It could use the same kind of logic that the BeanEditForm uses, one that supports the full injection mechanism.

Re: Using @Environmental and JavaScriptSupport Object to dynamically load css based on browser

2011-04-12 Thread bogdan_cm
Thank you very much for the responses. very useful stuff. Cheers. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Using-Environmental-and-JavaScriptSupport-Object-to-dynamically-load-css-based-on-browser-tp4283102p4298887.html Sent from the Tapestry - User mailing list

Re: Using @Environmental and JavaScriptSupport Object to dynamically load css based on browser

2011-04-12 Thread bogdan_cm
Very useful stuff. Thanks very much for replies. Cheers, Bogdan. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Using-Environmental-and-JavaScriptSupport-Object-to-dynamically-load-css-based-on-browser-tp4283102p4298913.html Sent from the Tapestry - User mailing list

T5: @Validate on RadioGroup

2011-04-12 Thread Adam Zimowski
I have a bean where @Validate(required) does not work on a radiogroup, but t:radiogroup validate=required ... does. Other @Validate annotated fields (TextField's) work. My companyType is purposely set to null by default, as I do not want any radio pre-selected, thus it shall be required. Is

Re: T5: @Validate on RadioGroup

2011-04-12 Thread Taha Hafeez
Hi I compared the code from RadioGroup with that of Select and found the following difference In Select if parameter 'validate' is not given a default is chosen and so it is never null. Validation is performed in processSubmission() method by the line