Re: T5.4-alpha-2: Module Initialization Priority / Order

2013-01-18 Thread Steve Eynon
> If possible, change your module to not care about order.

Hmm... that reminds me of:

Patient: "Doctor, doctor! It hurts when I do this"
Doctor: "Well don't do it then!"

After realising this has to be a common issue with RequireJS, I
figured it must have been already solved. And in some way it is, via
the depends / define mechanism:

If module B needs to run after module A, then module B depends on
module A. If you update your module B definition to:

define ["jquery", "A"], ($) -> # note A is not even given a
variable declaration

then it seems all calls to module A are executed before module B.

Note it doesn't matter what dependencies I declare in my
JavaScriptModuleConfigurations, the only change that makes a
difference is in the JS define signature. (Which does lead me to ask
why I need to declare my dependencies in two different places - in the
JS and the TapestryModule.)

While this works well, it is not idea for my use case; which is
optionally loading skins for a charting framework. Each skin is a
separate module / file and I make a call to initialise the one being
used. But because the modules are static files, I now need to depend
on / and download ALL the skins before initialising the one in use.

I guess I'm after some kind of dynamic / runtime dependency, which is
what the InitialisationPriority gave me.

> However, I'm thinking about scanning the inits and doing a pre-load pass,
> where it artifically forces all the dependencies to be loaded before
> invoking any inits

While that would work, surely you'd loose some of the speed benefits
of using AMD? As waiting for everything to download first is
technically not much better than a window.load mechanism.

You could do a pre-load pass for each of the InitialisationPriorites
(early, norm & late) but then I feel you'd be fighting the RequireJS
way of things.

I think what is in place is good, only the InitialisationPriority
should probably be scrapped (it always seemed like a course grained
cludge to me anyway) and the depends mechanism probably needs a little
more thought / love.

Steve.
--
Steve Eynon
---
"If at first you don't succeed,
   so much for skydiving!"



On 19 January 2013 01:51, Howard Lewis Ship  wrote:
> Yes, lots of async going on, so the dependencies of the modules may cause
> the module's exporting function (the thing you pass to define() as the
> second parameter) to occur in an unpredictable order.
>
> If possible, change your module to not care about order.
>
> However, I'm thinking about scanning the inits and doing a pre-load pass,
> where it artifically forces all the dependencies to be loaded before
> invoking any inits. Still thinking about that ... as in, should it be
> necessary?  Are the modules and logic broken if such a phase is necessary?
>
> On Fri, Jan 18, 2013 at 12:19 AM, Steve Eynon <
> steve.ey...@alienfactory.co.uk> wrote:
>
>> The priority ordering is lost when the call is handed over to
>> RequireJS from pageinit:invokeInitializer().
>>
>> There's a shed load of code on the server side to ensure the priority
>> ordering is kept.
>> The generated page init JSON is in the correct order.
>> The initialisation code is called in the correct order.
>> But pageinit:invokeInitializer() doesn't actually invoke the
>> initializer. It calls require() which seems to store a callback to be
>> executed sometime later.
>>
>> I'm guessing the random execution order is due to the async nature of
>> the modules being loaded.
>>
>> Being new to AMD and RequireJS I don't know how to go about fixing
>> this. Should I raise a JIRA?
>>
>> Steve.
>> --
>> Steve Eynon
>> ---
>> "If at first you don't succeed,
>>so much for skydiving!"
>>
>>
>>
>> On 17 January 2013 13:32, Steve Eynon 
>> wrote:
>> > Hiya,
>> >
>> > I have the following in a component:
>> >
>> > void setupRender() {
>> >
>> jsSupport.require("af/highcharts/theme/darkGreen").priority(InitializationPriority.EARLY);
>> > jsSupport.require("af/highcharts/lineChart").with(params);
>> > }
>> >
>> > and yet the theme module is still called *after* the lineChart. From
>> > Firefox console:
>> >
>> > Invoking af/highcharts/lineChart({ ... })
>> > Invoking af/highcharts/theme/darkGreen()
>> >
>> > Is this because one module is invoked with params and the other
>> > without? The component is used several times on the same page,
>> > resulting in many calls to "require" the same modules.
>> >
>> > Steve.
>> > P.S. So far I'm liking the use of RequireJS - I get a cosy feeling
>> > from having my dependencies injected into my JS modules, it's like an
>> > IoC for JS!
>> > --
>> > Steve Eynon
>> > ---
>> > "If at first you don't succeed,
>> >so much for skydiving!"
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>

Re: Tapestry datatable with NULL number

2013-01-18 Thread Emmanuel DEMEY
Hi,

Which version of Tapestry jQuery do you use ? I think this issue has been
solved in the current SNAPSHOT.

Manu


2013/1/18 dominate 

> Hello,
>
> I am usin Tapestry table t:type="jquery/datatable". When one field (whose
> datatype is Long) is null, it gives me error: Render queue error in
> Expansion[PropBinding[expansion bin/Search:thegrid(cellValue)]]: Cannot
> format given Object as a Number
>
> So, there should be some generic way to prevent this (I cannot override all
> the fields with ...)
> I have tried CoercionTuple but it was not the solution.
>
> Do you have any idea? Here is the code:
>
> 
>
>
>
>
>
> 
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Tapestry-datatable-with-NULL-number-tp5719382.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 : @EmmanuelDemey


Re: T5.4-alpha-2: Module Initialization Priority / Order

2013-01-18 Thread Howard Lewis Ship
Yes, lots of async going on, so the dependencies of the modules may cause
the module's exporting function (the thing you pass to define() as the
second parameter) to occur in an unpredictable order.

If possible, change your module to not care about order.

However, I'm thinking about scanning the inits and doing a pre-load pass,
where it artifically forces all the dependencies to be loaded before
invoking any inits. Still thinking about that ... as in, should it be
necessary?  Are the modules and logic broken if such a phase is necessary?

On Fri, Jan 18, 2013 at 12:19 AM, Steve Eynon <
steve.ey...@alienfactory.co.uk> wrote:

> The priority ordering is lost when the call is handed over to
> RequireJS from pageinit:invokeInitializer().
>
> There's a shed load of code on the server side to ensure the priority
> ordering is kept.
> The generated page init JSON is in the correct order.
> The initialisation code is called in the correct order.
> But pageinit:invokeInitializer() doesn't actually invoke the
> initializer. It calls require() which seems to store a callback to be
> executed sometime later.
>
> I'm guessing the random execution order is due to the async nature of
> the modules being loaded.
>
> Being new to AMD and RequireJS I don't know how to go about fixing
> this. Should I raise a JIRA?
>
> Steve.
> --
> Steve Eynon
> ---
> "If at first you don't succeed,
>so much for skydiving!"
>
>
>
> On 17 January 2013 13:32, Steve Eynon 
> wrote:
> > Hiya,
> >
> > I have the following in a component:
> >
> > void setupRender() {
> >
> jsSupport.require("af/highcharts/theme/darkGreen").priority(InitializationPriority.EARLY);
> > jsSupport.require("af/highcharts/lineChart").with(params);
> > }
> >
> > and yet the theme module is still called *after* the lineChart. From
> > Firefox console:
> >
> > Invoking af/highcharts/lineChart({ ... })
> > Invoking af/highcharts/theme/darkGreen()
> >
> > Is this because one module is invoked with params and the other
> > without? The component is used several times on the same page,
> > resulting in many calls to "require" the same modules.
> >
> > Steve.
> > P.S. So far I'm liking the use of RequireJS - I get a cosy feeling
> > from having my dependencies injected into my JS modules, it's like an
> > IoC for JS!
> > --
> > Steve Eynon
> > ---
> > "If at first you don't succeed,
> >so much for skydiving!"
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com


JMeter Load Test example

2013-01-18 Thread sthomps
Thought I would give back a little to the community for all your help.

As JMeter is not the easiest tool to use, here's a very simple load-test for
testing an Ajax submit on a form. 

load-test.jmx
   





--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/JMeter-Load-Test-example-tp5719384.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



Tapestry datatable with NULL number

2013-01-18 Thread dominate
Hello,

I am usin Tapestry table t:type="jquery/datatable". When one field (whose
datatype is Long) is null, it gives me error: Render queue error in
Expansion[PropBinding[expansion bin/Search:thegrid(cellValue)]]: Cannot
format given Object as a Number

So, there should be some generic way to prevent this (I cannot override all
the fields with ...)
I have tried CoercionTuple but it was not the solution.

Do you have any idea? Here is the code:







 



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-datatable-with-NULL-number-tp5719382.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: [ANN] JumpStart 6.5.4 - fixes populating the database

2013-01-18 Thread Geoff Callender
Hi Jon,

Thanks - you are right - the installation instructions now handle this (as of a 
few hours ago).

I misdiagnosed the problem and you've pointed me to the real cause, which was 
that the hsqldb and sqltool were in the downloaded project (they are not 
supposed to be - the Ant scripts are supposed to get them) and they were 
corrupt. JumpStart 6.5.5 will be out in a day or so without those two jars.

Cheers,

Geoff

On 18/01/2013, at 8:31 AM, Jon Williams wrote:

> Hi Geoff,
> 
> I encountered a couple of glitches following your latest installation
> instructions.
> Both hsqldb-2.2.9.jar
> and sqltool-2.2.9.jar
> have invalid zip headers. I replaced these 2 files with the latest 2.2.9
> from HSql and everything is working so far.
> 
> Thanks
> Jon
> 
> 
> On Thu, Jan 17, 2013 at 8:56 AM, Geoff Callender <
> geoff.callender.jumpst...@gmail.com> wrote:
> 
>> Hi all,
>> 
>> There have been issues with populating the database since 6.5.0. These
>> have been fixed with this release. Apologies to all who have been affected.
>> 
>> Cheers,
>> 
>> Geoff
>> 
>> 
>> -
>> 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: Radiogroup with Enum value and option with NULL value

2013-01-18 Thread nquirynen
Hi,

Thanks Taha, I solved it in the following way:

I don't really want to add something to my Language enum. 
I replaced it with a "dummy" html radio input as you suggested. To make it a
part of the whole radiogroup I had to add the name attribute. Now I also had
to add the value attribute with an empty value, because else I got the same
error as I had initially. And with a condition I preselect the radio input
when needed.


  
  
${format:labeled=language.description}
  
  
  
  

  
  
  ${message:unknown}




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Radiogroup-with-Enum-value-and-option-with-NULL-value-tp5719355p5719379.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: T5.4-alpha-2: Module Initialization Priority / Order

2013-01-18 Thread Steve Eynon
The priority ordering is lost when the call is handed over to
RequireJS from pageinit:invokeInitializer().

There's a shed load of code on the server side to ensure the priority
ordering is kept.
The generated page init JSON is in the correct order.
The initialisation code is called in the correct order.
But pageinit:invokeInitializer() doesn't actually invoke the
initializer. It calls require() which seems to store a callback to be
executed sometime later.

I'm guessing the random execution order is due to the async nature of
the modules being loaded.

Being new to AMD and RequireJS I don't know how to go about fixing
this. Should I raise a JIRA?

Steve.
--
Steve Eynon
---
"If at first you don't succeed,
   so much for skydiving!"



On 17 January 2013 13:32, Steve Eynon  wrote:
> Hiya,
>
> I have the following in a component:
>
> void setupRender() {
> 
> jsSupport.require("af/highcharts/theme/darkGreen").priority(InitializationPriority.EARLY);
> jsSupport.require("af/highcharts/lineChart").with(params);
> }
>
> and yet the theme module is still called *after* the lineChart. From
> Firefox console:
>
> Invoking af/highcharts/lineChart({ ... })
> Invoking af/highcharts/theme/darkGreen()
>
> Is this because one module is invoked with params and the other
> without? The component is used several times on the same page,
> resulting in many calls to "require" the same modules.
>
> Steve.
> P.S. So far I'm liking the use of RequireJS - I get a cosy feeling
> from having my dependencies injected into my JS modules, it's like an
> IoC for JS!
> --
> Steve Eynon
> ---
> "If at first you don't succeed,
>so much for skydiving!"

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