Re: Loading javascript file in tapestry

2014-09-22 Thread Chris Mylonas
Hi I'm using a jquery plugin called backstretch. In my included js file called "main.js" I have this snippet relevant to that 3rd party module: $("body").backstretch([ "assets/images/bg1.jpg", "assets/images/bg2.jpg", "assets/images/bg3.jpg" ], {duration: 5000, fade: 1000}); My main.js

Re: Loading javascript file in tapestry

2014-09-22 Thread akshay
Hi, My js file is a colorpicker and it uses these images to display the color options. Being a thirdparty component it, should just work fine without any changes. But that doesnt seems to be the case , and no image is displayed for the picker, since the image is not loaded/resource is not found .

Re: RadioGroup validation

2014-09-22 Thread Thiago H de Paula Figueiredo
On Sat, 20 Sep 2014 06:16:03 -0300, Christian Dutaret wrote: Hi all, Hi! I am having serious trouble validating RadioGroup components: - JSR-303 or @Validate annotations do not work for RadioGroup This is probably a bug. - if using validate="required" instead, no client-side validatio

Re: Loading javascript file in tapestry

2014-09-22 Thread Thiago H de Paula Figueiredo
On Mon, 22 Sep 2014 19:11:59 -0300, akshay wrote: Hi, Hi! Thanks for your concern!! ;) Whereas when I remove "dependsOn(img.getFile()))" code snippet, it loads fine, but without the image( which is required by the js file to work functionally). I am just trying to find out a way in w

Re: Loading javascript file in tapestry

2014-09-22 Thread akshay
Hi, Thanks for your concern!! Doesnt work here implies that , the javascript fails to be identified and hence its not loaded. Whereas when I remove "dependsOn(img.getFile()))" code snippet, it loads fine, but without the image( which is required by the js file to work functionally). I am just t

Re: Loading javascript file in tapestry

2014-09-22 Thread Thiago H de Paula Figueiredo
On Mon, 22 Sep 2014 16:54:03 -0300, akshay wrote: Hello, Hi! configuration.add("xyz", new JavaScriptModuleConfiguration( js).exports("variable").dependsOn(img.getFile())); The dependsOn() method you called above doesn't not do what you think it does. It says a given RequireJS

Loading javascript file in tapestry

2014-09-22 Thread akshay
Hello, I am unable to load the images related to my *.js file in the normal way, due to unknown reasons. So, I am trying to find a way in which I can explicity load the image path associated to my *.js file. I intend to use my custom Library class which contributes JavaScript libraries. As of n

Re: observe mixin

2014-09-22 Thread Lance Java
jquery (and other js frameworks) support selecting by attributes other than the id. More info here: http://api.jquery.com/category/selectors/ I was suggesting to add an attribute to each of your select elements and then use an appropriate selector to look it up: eg; public List getFieldSelect

Re: observe mixin

2014-09-22 Thread Thiago H de Paula Figueiredo
On Mon, 22 Sep 2014 14:28:19 -0300, squallmat . wrote: About the id problem of select, in the code source of the page the id of the select is good, but here in the json request there is an id appended in suffix : 1. selectId: "selectClients_1fadb44aa044" Is that the problem of select

Re: observe mixin

2014-09-22 Thread squallmat .
I have this : 1. content: ": > What happens when you view the network traffic in the chrome developer > tools? Can you see the values as request parameters? > > Are the select element ids (in the html) what you think they are? There's > an issue where the clientId is ignored by tapestry for s

Re: observe mixin

2014-09-22 Thread Lance Java
What happens when you view the network traffic in the chrome developer tools? Can you see the values as request parameters? Are the select element ids (in the html) what you think they are? There's an issue where the clientId is ignored by tapestry for select. And tapestry adds a unique suffix to

Re: observe mixin

2014-09-22 Thread squallmat .
Do you see why observe does not work? Or another method to make working what I want to do ? I'm stuck on this. 2014-09-22 16:39 GMT+02:00 squallmat . : > Ok the javascript works now, but not the mixin itself. > I have a first select where i chose a value, and then a second select > where i chose

Re: observe mixin

2014-09-22 Thread squallmat .
Ok the javascript works now, but not the mixin itself. I have a first select where i chose a value, and then a second select where i chose another value. On change on the second select I ajax reload both in a zone and i'd like the first to keep value. In the event method I reallocate the value of

Re: observe mixin

2014-09-22 Thread squallmat .
ok I used bind function instead of observe. And even with the original values $(spec.id) without the # the code works now. First time i make a javascript working :p 2014-09-22 15:56 GMT+02:00 squallmat . : > Hi Lance, thanks for the help. Yes i really need to learn javascript, I > still have an e

Re: update zones via property set or events triggers

2014-09-22 Thread George Christman
Have you seen this jumpstart example? http://jumpstart.doublenegative.com.au/jumpstart7/examples/ajax/select1 On Mon, Sep 22, 2014 at 6:52 AM, John wrote: > If I have a child component that performs a select type function that > requires to be rerendered to show the selected item as well as noti

Re: observe mixin

2014-09-22 Thread squallmat .
Hi Lance, thanks for the help. Yes i really need to learn javascript, I still have an error on the js you gave me : apparently the observe() function is a prototype one, i'm trying to find an equivalent in jquery but i didn't found yet. Do you know how i could convert this observe() to jquery ? 20

Re: Quick question - structure for 125 static pages

2014-09-22 Thread Thiago H de Paula Figueiredo
On Mon, 22 Sep 2014 05:32:24 -0300, Stephen Nutbrown wrote: Hello, Hi! I am wondering the best way to structure this within Tapestry 5 - I can see lots of ways, but i'm trying to consider the best way. I have the requirement to make approximately 125 pages (or rather, 1 page with a possi

Re: observe mixin

2014-09-22 Thread Lance Java
Well, if you want to call yourself a web developer... it's probably about time you learnt a bit of javascript ;) The jquery version would probably look something like: T5.extendInitializers({ observe: function (spec) { $('#' + spec.id).on(spec.event, function() { var params = {}

Re: observe mixin

2014-09-22 Thread squallmat .
Could you explain me what need to be changed to make the mixin compatible with jquery ? 2014-09-22 11:39 GMT+02:00 squallmat . : > In the chrome javascript console I have : > > Uncaught TypeError: undefined is not a function > > I use jquery, because I use some components from > http://tapestry5-

Re: Quick question - structure for 125 static pages

2014-09-22 Thread Stephen Nutbrown
Thankyou Robert - Following your advice I spent some time looking in to how to do it as a service. So far I have found this, which seems to be extremely similar: http://wiki.apache.org/tapestry/Tapestry5HowToReadAFileFromContext Thanks for your help. On 22 September 2014 11:28, Robert Zeigler w

update zones via property set or events triggers

2014-09-22 Thread John
If I have a child component that performs a select type function that requires to be rerendered to show the selected item as well as notify a sibling component of the change should I: 1) trigger an event and handle it in the container to rerender? 2) as the currently selected item is passed as

Re: Quick question - structure for 125 static pages

2014-09-22 Thread Robert Zeigler
I would almost certainly code the retrieval as a service. It'll make it easier to test the core retrieval logic. Depending on the need to allow later editing of the content, I would think about whether the content would be better stored in a DB. Robert GATAATGCTATTTCTTTAACGAA > On Sep 22

Re: observe mixin

2014-09-22 Thread squallmat .
In the chrome javascript console I have : Uncaught TypeError: undefined is not a function I use jquery, because I use some components from http://tapestry5-jquery.com/ I'm really bad at javascript and I don't even understand what this error means. What i need to change to make it works with jque

Re: observe mixin

2014-09-22 Thread Lance Java
You've probably got a javascript error on the page, check the js console in your browser. Are you using prototype or jquery? The observe javascript is for prototype and will require a tweak for tapestry 5.4 / jquery.

Re: default value on radiogroup

2014-09-22 Thread squallmat .
It works now, thanks Thiago 2014-09-19 19:35 GMT+02:00 Thiago H de Paula Figueiredo : > On Fri, 19 Sep 2014 13:03:45 -0300, squallmat . > wrote: > > Hi, >> > > Hi! > > like said in title I have a radiogroup with a dynamic list of objects, >> and i'd like to put a specific default value to it,

Re: observe mixin

2014-09-22 Thread squallmat .
Hi Lance, i added observe.zone and now the page launch... but : Every dynamic behavior has stopped working : the ajaxformloop I have on my page does not work anymore, my ajaxupload too, and every zone reloading stopped working... it's like javascript is disabled. But I tested with a tag and java

Quick question - structure for 125 static pages

2014-09-22 Thread Stephen Nutbrown
Hello, I am wondering the best way to structure this within Tapestry 5 - I can see lots of ways, but i'm trying to consider the best way. I have the requirement to make approximately 125 pages (or rather, 1 page with a possible 125 different sets of data). Each page is a short tutorial which has

Re: double select and ajax

2014-09-22 Thread Lance Java
Depending on your use case, you may need each select to know the other select's value. In which case you could use the observe mixin to send both values when either changes (and an optional context). http://tapestry-stitch.uklance.cloudbees.net/observedemo