On Mon, 30 Jan 2012 11:03:16 -0200, Julien Martin wrote:
@Thiago,
I actually wanted to avoid an additional dependency.
That's ok, but then you're not using a stack. It would have worked if you
included it as a library. I've never used tapestry5-jquery myself, but I
do think it deserves to
@Thiago,
I actually wanted to avoid an additional dependency.
I am going to include the autocomplete javascript within the root layout as
a library.
@All
Thanks all for helping me with this issue!! I understand how Tapestry deals
with javascript much better now!! [?]
Regards,
Julien.
2012/1/30 T
I tried using the "@Import stack=" in order to include the jquery libraries
to no avail.
I get this:
Render queue error in SetupRender[Index:childminderlayout.layout]: No
JavaScriptStack with name 'context:/js/jquery-1.6.2.js'.
Any one has any clue?
Regards,
Julien.
2012/1/30 Julien Martin
> @Th
@Thiago: ok will do.
2012/1/30 Thiago H. de Paula Figueiredo
> On Mon, 30 Jan 2012 08:14:40 -0200, Julien Martin
> wrote:
>
> I have actually. The issue is how to replace a variable within the js
>> file with the appropriate value.
>>
>
> You don't. Make it a parameter of a function you'll cal
You're right François,
It is an issue with the inclusion order of my files.
I noticed that the files @Import(ed) by my main layout component come after
the files @Import(ed) by the pages that use that layout. It should be the
other way around.
Is there a way to have more control over that?
Julien.
This should work. Perhaps a conflict regading inclusion order of your js file.
At this point you have to debug with firebug to see why
Tapestry.Initializer.bignibou_autocomplete() is not defined.
perhaps extend failed as jquery was already there.
Regards
François
---
Hi François,
I like your solution as it seems more flexible. I tried to implement it as
follows:
/js/jquery.autocomplete.js:
*jQuery.noConfict();*
*(function($) {*
* $.extend(Tapestry.Initializer, {*
* bignibou_autocomplete : function(specs) {*
* $("#accountPostcode").autocomplete({*
* source : fu
Thanks Lenny,
Is the dependency to "com.flowlogix.web.services.AssetMinimizer" necessary?
Is there a "pure-T5" way of retrieving the string from the script?
Here is what I came up with borrowing from your code:
*javaScriptSupport.addScript(getString(openStream(jsAutocomplete)), link);*
*
*
*
pri
It would be better to use js object and pass parameter to constructor.
for prototype see
http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained
http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/robust
for jquery
https://github.com/got5/tapestry5-jquery/blob/master/src/
Take a look at these:
http://code.google.com/p/flowlogix/source/browse/tapestry-services/src/main/java/com/flowlogix/web/mixins/ColorHighlight.java
http://code.google.com/p/flowlogix/source/browse/tapestry-services/src/main/resources/com/flowlogix/web/mixins/ColorHighlight.js
On Jan 30, 2012, at
Thanks François,
I have actually. The issue is how to replace a variable within the js file
with the appropriate value. This seems easy enough with an inline script as
above but if the script is located in its own file I don't know how to
achieve the desired effect.
Regards,
Julien.
Le 30 janvier
Hi Julien,
did you try the use of @Import to import your js file as explained
http://tapestry.apache.org/javascript.html?
Regards
François
2012/1/30 Julien Martin :
> Hi Thiago!
>
> Using your advice, I managed to generate the link easily. I have also moved
> the script to a separate file as adv
Hi Thiago!
Using your advice, I managed to generate the link easily. I have also moved
the script to a separate file as advised.
Now what remains unclear to me is that the *addScript* method takes a
String and not a url to my javascript file.
So on the one hand I have my link, on the other my ja
On Sun, 29 Jan 2012 19:22:31 -0200, Julien Martin wrote:
Thiago,
Hi!
Yes it is indeed a Tapestry page. Here is the java code for it (there is
no template for this page):
So the correct way of generating an URL for a page is to @Inject
PageRenderLinkSource and use one of its methods. Th
On Sat, 28 Jan 2012 20:12:06 -0200, Julien Martin wrote:
Hello Thiago,
Hi!
It is on a page template. The advice you provide does work. However, I
am realizing I need to concatenate the protocol+host+etc. which is a bit
cumbersome.
Page templates don't handle anything. Pages, components
2012/1/28 Julien Martin
> Hello Thiago,
>
> It is on a page template. The advice you provide does work. However, I am
> realizing I need to concatenate the protocol+host+etc. which is a bit
> cumbersome.
>
> The problem I have is that I don't understand how the path is worked out.
> My javascript
On Sat, 28 Jan 2012 17:43:17 -0200, Julien Martin wrote:
Hello,
Hi!
How can I achieve this with T5?
As a general answer, you can @Inject HttpServletRequest and use its
getContextPath() method. Depending on who handles this URL (a Tapestry
page? a Tapestry page event handler method), t
17 matches
Mail list logo