Re: Weird behaviour, require js doesn't refresh changed js file immediately

2015-03-20 Thread abangkis
thanks a lot Felix :)

On Fri, Mar 20, 2015 at 12:06 AM, Felix Scheffer <
fschef...@felix-scheffer.de> wrote:

> Hi,
>
> for AMD modules, caching should be disabled by default.
>
> The default value for the Cache-Control header in this case is:
> "max-age=60,must-revalidate". You can customize that by setting
> SymbolConstants.OMIT_EXPIRATION_CACHE_CONTROL_HEADER.
>
> Hope that helps!
>
> Felix
>
>
> 2015-03-19 10:46 GMT+01:00 abangkis :
>
> > Sorry to brought up old thread. Does anyone know where I can set up the
> > expiration time for require js module? Can I set it to zero or 1 second?
> >
> > Thanks.
> >
> >
> >
> > On Tue, Feb 10, 2015 at 10:21 PM, Howard Lewis Ship 
> > wrote:
> >
> > > For modules, which can't be fingerprinted with a checksum in the URL,
> > > Tapestry applies a short expiration time in development, and a much
> > longer
> > > one in production. I suspect you are hitting that.  A hard refresh,
> > > clearing the local cache, should force the browser to request the
> updated
> > > resource.
> > >
> > > Sometimes the browser just refuses to get the resource; you can see
> this
> > > when it looks one way in the browser, and differently and correctly via
> > > curl or httpie.
> > >
> > > On Sun, Feb 8, 2015 at 10:49 PM, abangkis  wrote:
> > >
> > > > Ok, my workaround is to add some kind of index number to log to
> > > javascript
> > > > console such as : console.log("29. Google map is ready"); I keep
> > > refreshing
> > > > until the number is changed. For now it's good enough but hopefully
> > > there's
> > > > a better solution in the future.
> > > >
> > > > On Sat, Feb 7, 2015 at 11:24 AM, abangkis 
> wrote:
> > > >
> > > > > Hi guys, another question about require js. So i experiment with
> > > creating
> > > > > a new source folder in eclipse by the name of requiresrc. Under
> that
> > > > folder
> > > > > will reside the META-INF/modules/my_javascript.js file. This way
> > > eclipse
> > > > > will deploy the META-INF/modules folder to the classes module
> > > > > automatically. It worked.
> > > > >
> > > > > The problem is when i change my_javascript.js file content. The
> > content
> > > > > doesn't get refreshed automatically. Hitting F5 and Shift-F5
> doesn't
> > > > change
> > > > > it too. But after a while (5-10 second) then the content will be
> > > changed
> > > > > automatically.
> > > > >
> > > > > Looking around i found this related thread
> > > > >
> > > >
> > >
> >
> http://www.wenda.io/questions/4211439/force-refresh-doesnt-work-for-head-js.html
> > > > > basically it says that F5 wouldn't work because of the dynamic
> script
> > > > > loading. So, does anyone have a trick with this kind of thing?
> > Because
> > > > I'm
> > > > > used of putting my js folder under WebApp folder and hitting
> refresh,
> > > > >  tapestry would pick up the new content. Restarting the app every
> > time
> > > i
> > > > > change the js file would be a big pain.
> > > > >
> > > > > Thanks :)
> > > > >
> > > > > --
> > > > > http://www.mreunionlabs.net/ 
> > > > > twitter : @mreunionlabs @abangkis
> > > > > page : https://plus.google.com/104168782385184990771
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > http://www.mreunionlabs.net/ 
> > > > twitter : @mreunionlabs @abangkis
> > > > page : https://plus.google.com/104168782385184990771
> > > >
> > >
> > >
> > >
> > > --
> > > 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
> > > @hlship
> > >
> >
> >
> >
> > --
> > http://www.mreunionlabs.net/ 
> > twitter : @mreunionlabs @abangkis
> > page : https://plus.google.com/104168782385184990771
> >
>



-- 
http://www.mreunionlabs.net/ 
twitter : @mreunionlabs @abangkis
page : https://plus.google.com/104168782385184990771


Re: JS conflict

2015-03-20 Thread Cheng Zhang
Found another article showing it is possible to use jQuery in addition to
Prototype. I will try.

http://tapestry.apache.org/legacy-javascript.html

On Fri, Mar 20, 2015 at 11:29 AM, Cheng Zhang 
wrote:

> I am not sure. I even did not realize Tapestry use Prototype as its
> default JS library.
> I do not want to change existing code with built-in prototype.
> I just made some research and found the Tapestry is tightly coupling with
> Prototype, probably I can only use the Foundation components that do not
> require JS.
>
>
> https://tapestry.apache.org/javascript-rewrite.html#JavaScriptRewrite-DependenceonPrototype/Scriptaculous
>
> Thank you so much Thiago.
>
>
> On Fri, Mar 20, 2015 at 6:54 AM, Thiago H de Paula Figueiredo <
> thiag...@gmail.com> wrote:
>
>> Are you sure Foundation Framework is compatible with Prototype.js? If
>> not, and if it's compatible with jQuery, you can make Tapestry 5.4 use
>> jQuery instead. Not exactly a Tapestry problem.
>>
>>
>> On Thu, 19 Mar 2015 20:38:02 -0300, Cheng Zhang <
>> charlesdenverj...@gmail.com> wrote:
>>
>>  More information from dev tool Console:
>>>
>>> Uncaught TypeError: undefined is not a function prototype.js:2284
>>> Element.Methods.writeAttribute
>>>  prototype.js:2284
>>> global.Element
>>>  prototype.js:1898
>>> Tapestry.waitForPage
>>> tapestry.js:120
>>>
>>> onclick
>>> (index):7
>>> a.sendClick
>>> all.js:34
>>> a.onTouchEnd
>>> all.js:34
>>>
>>> d
>>> all.js:34
>>>
>>> On Thu, Mar 19, 2015 at 5:28 PM, Cheng Zhang <
>>> charlesdenverj...@gmail.com>
>>> wrote:
>>>
>>>  Hi all,

 I am trying to apply Foundation framework to an existing Tapestry
 project.
 But the JavaScript usded by Foundation seems like conflict with
 Tapestry JS.

 Once I added the Foundataion JS file to my tml file, the eventlink does
 no
 longer work, there is no any response after cliking, and Eclipse console
 has no output.

 I believe the http://foundation.zurb.com/docs/assets/js/all.js makes
 some
 negative effect on the existing JS function Tapestry.waitForPage.

 The tml file eventlink code:

 >>> t:update=*"show"* href=*"#"*>Forgot Password
 In browser the generated html code:

 >>> update="show" href="/portal/signin:resetpassword">Forgot Password

 Thanks for your help!

 Charles


>>
>> --
>> Thiago H. de Paula Figueiredo
>> Tapestry, Java and Hibernate consultant and developer
>> http://machina.com.br
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>


Re: JS conflict

2015-03-20 Thread Cheng Zhang
I am not sure. I even did not realize Tapestry use Prototype as its default
JS library.
I do not want to change existing code with built-in prototype.
I just made some research and found the Tapestry is tightly coupling with
Prototype, probably I can only use the Foundation components that do not
require JS.

https://tapestry.apache.org/javascript-rewrite.html#JavaScriptRewrite-DependenceonPrototype/Scriptaculous

Thank you so much Thiago.


On Fri, Mar 20, 2015 at 6:54 AM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> Are you sure Foundation Framework is compatible with Prototype.js? If not,
> and if it's compatible with jQuery, you can make Tapestry 5.4 use jQuery
> instead. Not exactly a Tapestry problem.
>
>
> On Thu, 19 Mar 2015 20:38:02 -0300, Cheng Zhang <
> charlesdenverj...@gmail.com> wrote:
>
>  More information from dev tool Console:
>>
>> Uncaught TypeError: undefined is not a function prototype.js:2284
>> Element.Methods.writeAttribute
>>  prototype.js:2284
>> global.Element
>>  prototype.js:1898
>> Tapestry.waitForPage
>> tapestry.js:120
>>
>> onclick
>> (index):7
>> a.sendClick
>> all.js:34
>> a.onTouchEnd
>> all.js:34
>>
>> d
>> all.js:34
>>
>> On Thu, Mar 19, 2015 at 5:28 PM, Cheng Zhang > >
>> wrote:
>>
>>  Hi all,
>>>
>>> I am trying to apply Foundation framework to an existing Tapestry
>>> project.
>>> But the JavaScript usded by Foundation seems like conflict with Tapestry
>>> JS.
>>>
>>> Once I added the Foundataion JS file to my tml file, the eventlink does
>>> no
>>> longer work, there is no any response after cliking, and Eclipse console
>>> has no output.
>>>
>>> I believe the http://foundation.zurb.com/docs/assets/js/all.js makes
>>> some
>>> negative effect on the existing JS function Tapestry.waitForPage.
>>>
>>> The tml file eventlink code:
>>>
>>> >> t:update=*"show"* href=*"#"*>Forgot Password
>>> In browser the generated html code:
>>>
>>> >> update="show" href="/portal/signin:resetpassword">Forgot Password
>>>
>>> Thanks for your help!
>>>
>>> Charles
>>>
>>>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Design / Best Practice on Multinational App

2015-03-20 Thread Adam X
What's the best approach for a single build of an app with global presence?
I'm not asking for localisation, but subtle functional differences. Some
examples are Address entity bean, which requires a state for some
countries, but not for the others. Do I build separate Address bean for
each region and deploy it based on execution mode? Or do I build a single
bean that encapsulates the functionality of all regions and provide if-then
logic based on deployment? Or is there a better, more Tapestrized solution?

Note, that Address entity bean is the simplest example that comes off the
top of my hat. There will be plenty of others. In some corporate
environments I've seen inheritance based code base deployments where a
generic code base would be built, and each region would be a sort of a fork
of generic codebase. Perhaps that?

Adam


Re: JS conflict

2015-03-20 Thread Thiago H de Paula Figueiredo
Are you sure Foundation Framework is compatible with Prototype.js? If not,  
and if it's compatible with jQuery, you can make Tapestry 5.4 use jQuery  
instead. Not exactly a Tapestry problem.


On Thu, 19 Mar 2015 20:38:02 -0300, Cheng Zhang  
 wrote:



More information from dev tool Console:

Uncaught TypeError: undefined is not a function prototype.js:2284
Element.Methods.writeAttribute
prototype.js:2284

global.Element
 prototype.js:1898
Tapestry.waitForPage
tapestry.js:120

onclick
(index):7
a.sendClick
all.js:34
a.onTouchEnd
all.js:34

d
all.js:34

On Thu, Mar 19, 2015 at 5:28 PM, Cheng Zhang  


wrote:


Hi all,

I am trying to apply Foundation framework to an existing Tapestry  
project.
But the JavaScript usded by Foundation seems like conflict with  
Tapestry JS.


Once I added the Foundataion JS file to my tml file, the eventlink does  
no

longer work, there is no any response after cliking, and Eclipse console
has no output.

I believe the http://foundation.zurb.com/docs/assets/js/all.js makes  
some

negative effect on the existing JS function Tapestry.waitForPage.

The tml file eventlink code:

Forgot Password
In browser the generated html code:


update="show" href="/portal/signin:resetpassword">Forgot Password

Thanks for your help!

Charles




--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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



DateTimePicker Component

2015-03-20 Thread TNO

Hi,

I'm using tapestry 5.3.7 with tapsetry-jquery.

I'm looking for a DateTimePicker component.

Tapestry have only a datepicker
Chenille Kit used to have one (ck.DateTimeField), but this project seems 
to be dead


Thanks for your help, Thomas



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



Re: [5.4] Where to put the require.config?

2015-03-20 Thread Chris Poulsen
In a javascript stack?

On Fri, Mar 20, 2015 at 4:05 AM, Rural Hunter  wrote:

> Hi,
>
> I'm testing tapestry 5.4. I'm wondering where to put the requirejs.config
> code for my own modules and third-party modules?
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>