T5.3.1 javascript logging

2012-01-13 Thread angelochen
Hi, I use following code to log some info, but where we can find it out? in Chrome's javascript console, there was nothing: @Environmental private JavaScriptSupport javaScriptSupport; void setupRender() throws IOException { javaScriptSupport.addScript("Tapestry.error(\"hello he

Re: reading an asset into a string

2012-01-13 Thread angelochen
Hi Thiago, String s = myEffects.toString() it does not read the content of the file, but the name of the asset. Thiago H de Paula Figueiredo wrote > > On Fri, 13 Jan 2012 12:40:37 -0200, angelochen > wrote: > >> is this possible? >> >> @Inject @Path("context:/js/init.

Re: can someone explain what t:ac is?

2012-01-13 Thread Josh Canfield
> So the part before the query param is the event context, and t:ac is the > page context.  Right? > You are right. t:ac is the parameters passed to onActivate when your event is processed > '/programs/info.requestoverride:internalevent/10508?t:ac=10508' Here you have a component id of info.requ

Re: can someone explain what t:ac is?

2012-01-13 Thread hese
Really? But according to this page http://tapestry.apache.org/tapestry5/apidocs/constant-values.html t:ac is the page's activation context. When I had t:context="program.id" the url generated was, '/programs/info.requestoverride:internalevent/10508?t:ac=10508' When I tried t:context="['test',

Re: Advice on creating new components

2012-01-13 Thread Thiago H. de Paula Figueiredo
You can have one component per type and also one component using them to choose the right one to be shown at that time. That's what I'd do. On Fri, 13 Jan 2012 15:52:58 -0200, Josh Canfield wrote: The answers you get to this is are going to be mostly personal preference, so I'll give you

Re: can someone explain what t:ac is?

2012-01-13 Thread Thiago H. de Paula Figueiredo
On Fri, 13 Jan 2012 15:45:20 -0200, hese <1024h...@gmail.com> wrote: ok I got it, 'page context' is also being passed along with the context that i requested. If I dont want this, I just filter it out in my event handler. Right? ac = activation context, but the event's one, not the page ac

Re: reading an asset into a string

2012-01-13 Thread Thiago H. de Paula Figueiredo
On Fri, 13 Jan 2012 12:40:37 -0200, angelochen wrote: is this possible? @Inject @Path("context:/js/init.photoswipe.js") private Asset myEffects; Yes, but what's the relation of the code above with the subject of your message? Haven't you tried the code above before posting in the m

Re: Advice on creating new components

2012-01-13 Thread Josh Canfield
The answers you get to this is are going to be mostly personal preference, so I'll give you mine. I would definitely create at least one component to contain all three of the types of identifiers, then when you add a fourth, or remove one, they magically get updated on all the pages. Whether you

Re: can someone explain what t:ac is?

2012-01-13 Thread hese
ok I got it, 'page context' is also being passed along with the context that i requested. If I dont want this, I just filter it out in my event handler. Right? -- View this message in context: http://tapestry.1045711.n5.nabble.com/can-someone-explain-what-t-ac-is-tp5143182p5143212.html Sent f

can someone explain what t:ac is?

2012-01-13 Thread hese
Hi, I am using a customized version of chennillekit's (can never get the spelling right) onEvent mixin. I notice that it puts some query parameters after the context value. /programs/info.requestoverride:internalevent/10508?t:ac=10508 But this does not happen for all components. I read it is

Re: reading an asset into a string

2012-01-13 Thread Dusko Jovanovski
It's here: http://tapestry.apache.org/assets.html#Assets-InjectingAssets On Fri, Jan 13, 2012 at 4:01 PM, angelochen wrote: > hi, > i checked that link, but can't find info. > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/reading-an-asset-into-a-string-tp5142710p514

Re: reading an asset into a string

2012-01-13 Thread angelochen
hi, i checked that link, but can't find info. -- View this message in context: http://tapestry.1045711.n5.nabble.com/reading-an-asset-into-a-string-tp5142710p5142757.html Sent from the Tapestry - User mailing list archive at Nabble.com. ---

Re: reading an asset into a string

2012-01-13 Thread Dusko Jovanovski
Yes, see http://tapestry.apache.org/assets.html On Fri, Jan 13, 2012 at 3:40 PM, angelochen wrote: > is this possible? > > @Inject @Path("context:/js/init.photoswipe.js") >private Asset myEffects; > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/reading-an-asset

Advice on creating new components

2012-01-13 Thread captain_rhino
Good afternoon. A few pointers on how to go about doing the following would be apprecaited from anyone please. I have a page where one and ONLY ONE of the following unique identifiers needs to appear on screen to a user, have values entered into those fields and have the values of the fields val

reading an asset into a string

2012-01-13 Thread angelochen
is this possible? @Inject @Path("context:/js/init.photoswipe.js") private Asset myEffects; -- View this message in context: http://tapestry.1045711.n5.nabble.com/reading-an-asset-into-a-string-tp5142710p5142710.html Sent from the Tapestry - User mailing list archive at Nabble.com. ---

Re: Mixin trying to use an enum

2012-01-13 Thread Thiago H. de Paula Figueiredo
On Thu, 12 Jan 2012 19:37:09 -0200, Travis Romney wrote: A jira issue has been filed under TAPESTRY-2788 Thanks! I forgot to mention that the TRAC project for Tapestry 5 is TAP-5, not TAPESTRY. This is a common mistake. Don't worry abou

Re: Breakdown of downloaded tapestry-core versions from 2011

2012-01-13 Thread Thiago H. de Paula Figueiredo
On Fri, 13 Jan 2012 03:24:25 -0200, Kalle Korhonen wrote: Thought this might be interesting to Tapestry users in general but especially to Tapestry add-on (plugins, components, modules, extensions) developers. Here are the percentages of all downloads of tapestry-core from Maven central over

Re: T5.3.1 load js and execute it

2012-01-13 Thread Thiago H. de Paula Figueiredo
On Fri, 13 Jan 2012 08:54:09 -0200, angelochen wrote: Hi, Hi! I have js file like following and I'd like it to be run when page is loaded, using @Import includes the js file, but not running it, any way to achieve this? Thanks, All JavaScript code in a .js file added to an HTML page

Re: two component classes, one component tml

2012-01-13 Thread Thiago H. de Paula Figueiredo
On Fri, 13 Jan 2012 06:14:52 -0200, Kalle Korhonen wrote: On Thu, Jan 12, 2012 at 11:45 PM, Paul Stanton wrote: I have two components who's tml is identical. Is it possible to have tapestry load the tml from one location? Yes, use inheritance: http://tapestry.apache.org/component-templat

T5.3.1 load js and execute it

2012-01-13 Thread angelochen
Hi, I have js file like following and I'd like it to be run when page is loaded, using @Import includes the js file, but not running it, any way to achieve this? Thanks, (function(window, $, PhotoSwipe){ $(document).ready(function(){ // more code here }); }(window, window.jQuery

[T5.3.1] Tapestry.js error on IE8

2012-01-13 Thread Adriaan Joubert
Hi, I'm somewhat non-plussed by a javascript error in Tapestry.js on IE8 (this works fine on firefox/chrome). We have several zones on a page, and in Tapestry.onDOMLoaded there is a call Tapestry.init({ "formEventManager" : [ { "formId" : "GlobalSearch", "validate" : {

Re: how/where is tapestry.js included?

2012-01-13 Thread Robert Zeigler
The inclusion by components is a side-effect. You can trigger the auto-inclusion without a component by using code that depends on the stack. In particular, if you call JavaScriptSupport.addInitializerCall, JavaScriptSupport.addScript, if you import a library (via annotation or directly via Jav

Re: two component classes, one component tml

2012-01-13 Thread Kalle Korhonen
On Thu, Jan 12, 2012 at 11:45 PM, Paul Stanton wrote: > I have two components who's tml is identical. > Is it possible to have tapestry load the tml from one location? Yes, use inheritance: http://tapestry.apache.org/component-templates.html Kalle ---