Re: summer of code coming to end
Jesse Kuhnert jkuhnert at gmail.com writes: There has been some signifcant tooling going on by those crazy guys at aol. It looks like with the move of all tapestry javascript into dojo packages which has already happened - people who care will be able to create special compressed js versions that include exactly ~only~ the javascript that their app actually uses. Down to each little bit even :) Obviously this blows away any talk I had of thinking 23kb was pretty good for size. http://ajaxian.com/archives/js-linker-in-dojo-toolkit Great feature! This means that the web-app is no longer forced to load unnecessary JS code. Just implement this feature as a default behaviour of Tapestry since nobody wants to have a web-app that is fatter than necessary. To move all tapestry javascript into dojo packages, thus making dojo ubiqitious in a Tapestry generated web-app, is a design decision. This feature significantly reduces the basic concern formulated in the thread Tapestry 4.1: dojo everywhere?. Thank you for taking care of this issue! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to use tacos components?
Strange, But my solution is Don't use tacos, because DOJO has almost the same functionality I can use(see) a dropdowndatepicker, but how do I use that in combination with Tapestry? Can someone give me an example? I can't find any good documentation about that (just like the other parts of Tapestry :( ) I tried: input name=bornDate id=bornDate dojoType=DropdownDatePicker value=ognl:Customer.bornDate/ I can choose a date but, when submitting the form, it doesn't store the right (new selected) date, found in the bornDate textfield. Anyone? Do you have a lot of free time? Please write some good Tapestry 4 tutorials with example code! :P -Original Message- From: Pedro Viegas [mailto:[EMAIL PROTECTED] Sent: donderdag 31 augustus 2006 22:43 To: Tapestry users Subject: Re: How to use tacos components? You may have a dojo incompatibility issue. Take a look at what version of dojo you have installed and what version the TACOS release you have requires. I had a similar issue a while back and this was the reason. Hope it helps, On 8/31/06, Jasper Huzen [EMAIL PROTECTED] wrote: I'm trying to use tacos components but I doesn't work as espected I've configured my tapestry project for usage of tacos. I can use (and see) DOJO objects when I add in example div dojoType=FloatingPane title=Inner window constrainToContainer=false style=left: 20px; top: 60px; width: 120px; height: 80px; (I think the configuration is ok?) I tried to add to my html input jwcid=[EMAIL PROTECTED]:DatePicker value=ognl: bornDate / and I see the picker icon. My problem is that I can't click (can click but does nothing:P) on the DatePicker. How do I use the tacos:DatePicker in example? -- Pedro Viegas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tapestry Acegi
Thanks James. I'd seen the Tapestry Acegi site and it looks a little thin on the ground ;-) I'll have another go with the docs you've sent and I'll see how I go. Rob Cole CSA Web +44 (0)20 754 51117 James Carman [EMAIL PROTECTED] 31/08/2006 18:11 To 'Tapestry users' users@tapestry.apache.org
RE: Tapestry Acegi
Thanks Jasper. I'll take a look. Rob Cole CSA Web +44 (0)20 754 51117 Jasper Huzen [EMAIL PROTECTED] 31/08/2006 19:49 To Tapestry users users@tapestry.apache.org
Re: multiple stylesheets
Nick, that worked perfectly, thanks! I just had to change a few things for it to comply with T4, but unfortunately now I'm faced with another problem, there's no titles on my stylesheets. Border.html html jwcid=shell stylesheets=ognl:{assets.stylesheet1,assets.stylesheet2 } Border.jwc asset name=stylesheet1 path=context:css/style.css / asset name=stylesheet2 path=context:css/template.css / gives me: link rel=stylesheet type=text/css href=/fast-store-app/css/style.css / link rel=stylesheet type=text/css href=/fast-store-app/css/template.css / but I'd like: link rel=stylesheet type=text/css href=/fast-store-app/css/style.csstitle=default / link rel=stylesheet type=text/css href=/fast-store-app/css/template.css title=super/ So as I can select them on the fly from my browser's view-use style setting. If you or anyone else has already figured out how to do this I'd like to hear how it's done. Thanks again, Brian. On 9/1/06, Nick Westgate [EMAIL PROTECTED] wrote: Hi Brian. Hopefully someone using T4 can offer you more help, but in my current T3 project I do this via ... Border.jwc - which has a stylesheets parameter: ... component-specification class=blah.blah.Border allow-informal-parameters=no parameter name=stylesheets type=java.lang.Object direction=in/ component id=shell type=Shell binding name=title expression=title/ binding name=stylesheets expression=stylesheets/ binding name=doctype 'html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN' /binding /component ... SomePage.html - which passes the array of stylesheet assets: html head /head body jwcid=$content$ div jwcid=border stylesheets=ognl:{assets.common, assets.apply} ... SomePage.page - which defines the css assets: context-asset name=common path=css/common.css/ context-asset name=apply path=css/apply.css/ Cheers, Nick. Brian Long wrote: Hi all, I'm afraid I might have dug myself into a hole (again!), but I hope someone my have already encountered this problem and is willing to let me know of a possible solution. I'm trying to add multiple stylesheets to my web project, I'm currently using a @Shell component to enclose my web pages, this has a single stylesheet as per the example on the tapestry website. span jwcid=@Shell stylesheet=asset:stylesheet title=MyCorp Customer Login I want to add some more, and according to the component description there's a parameter stylesheets that will take an array of IAssets, this is want I'd like to do, the only problem is that my shell in inside a custom @Border component. Soo, I have a Border.html and Border.jwc and I have to try and create an array of IAssets (my list of stylesheets). How do I do this, create a Border.java? Any suggestions would be much appreciated . . . /Brian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to use tacos components?
Jasper Huzen wrote: Strange, But my solution is Don't use tacos, because DOJO has almost the same functionality If you just want to use 'simple' dojo widgets, this might be close to true - assuming that you use the dojoType=someWidget style which however has performance issues (and which tacos doesn't use). Keep in mind that there are more in tacos (and even dojo) than dojo's widgets. I can use(see) a dropdowndatepicker, but how do I use that in combination with Tapestry? Can someone give me an example? I can't find any good documentation about that (just like the other parts of Tapestry :( ) I tried: input name=bornDate id=bornDate dojoType=DropdownDatePicker value=ognl:Customer.bornDate/ Assuming that you do NOT use the dojoType=DropdownDatePicker attribute, do you think the above code should work? Isn't it missing something? or even better some things? I can choose a date but, when submitting the form, it doesn't store the right (new selected) date, found in the bornDate textfield. Anyone? I'm hoping you can work it out. Do you have a lot of free time? Please write some good Tapestry 4 tutorials with example code! :P Point taken... but i'm pretty sure everyone's doing their best. Perhaps the community can help here. -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / J2EE Consulting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multiple stylesheets
Well, in Tapestry 4.1.1 there's a new component @Style that can append stylesheets inside HEAD. It can be used from anywhere - even components can have their needed stylesheets appended. Here's some example usages: link jwcid=@Style href=main.css media=all/ link jwcid=@Style href=asset:style1 title=main/ link jwcid=@Style href=asset:style2 title=other rel=alternate stylesheet/ In Tapestry 4.0 or older, you should make use of the delegate parameter of @Shell You supply it with an IRender implementation, and it gets rendered just before /HEAD Brian Long wrote: Nick, that worked perfectly, thanks! I just had to change a few things for it to comply with T4, but unfortunately now I'm faced with another problem, there's no titles on my stylesheets. Border.html html jwcid=shell stylesheets=ognl:{assets.stylesheet1,assets.stylesheet2 } Border.jwc asset name=stylesheet1 path=context:css/style.css / asset name=stylesheet2 path=context:css/template.css / gives me: link rel=stylesheet type=text/css href=/fast-store-app/css/style.css / link rel=stylesheet type=text/css href=/fast-store-app/css/template.css / but I'd like: link rel=stylesheet type=text/css href=/fast-store-app/css/style.csstitle=default / link rel=stylesheet type=text/css href=/fast-store-app/css/template.css title=super/ So as I can select them on the fly from my browser's view-use style setting. If you or anyone else has already figured out how to do this I'd like to hear how it's done. Thanks again, Brian. On 9/1/06, Nick Westgate [EMAIL PROTECTED] wrote: Hi Brian. Hopefully someone using T4 can offer you more help, but in my current T3 project I do this via ... Border.jwc - which has a stylesheets parameter: ... component-specification class=blah.blah.Border allow-informal-parameters=no parameter name=stylesheets type=java.lang.Object direction=in/ component id=shell type=Shell binding name=title expression=title/ binding name=stylesheets expression=stylesheets/ binding name=doctype 'html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN' /binding /component ... SomePage.html - which passes the array of stylesheet assets: html head /head body jwcid=$content$ div jwcid=border stylesheets=ognl:{assets.common, assets.apply} ... SomePage.page - which defines the css assets: context-asset name=common path=css/common.css/ context-asset name=apply path=css/apply.css/ Cheers, Nick. Brian Long wrote: Hi all, I'm afraid I might have dug myself into a hole (again!), but I hope someone my have already encountered this problem and is willing to let me know of a possible solution. I'm trying to add multiple stylesheets to my web project, I'm currently using a @Shell component to enclose my web pages, this has a single stylesheet as per the example on the tapestry website. span jwcid=@Shell stylesheet=asset:stylesheet title=MyCorp Customer Login I want to add some more, and according to the component description there's a parameter stylesheets that will take an array of IAssets, this is want I'd like to do, the only problem is that my shell in inside a custom @Border component. Soo, I have a Border.html and Border.jwc and I have to try and create an array of IAssets (my list of stylesheets). How do I do this, create a Border.java? Any suggestions would be much appreciated . . . /Brian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / J2EE Consulting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multiple stylesheets
Brian, I've never had to do that, but it's pretty easy to hack the built-in Tapestry components. Just look at the java source for Shell and add the outputting of the title attributes. In this case it looks like that would be easy if you want the stylesheet title based on the css filename, but if you need to provide a different name for each one you'll have to do more. Perhaps add another Shell parameter that takes an array of title strings for the stylesheets. Cheers, Nick. Brian Long wrote: Nick, that worked perfectly, thanks! I just had to change a few things for it to comply with T4, but unfortunately now I'm faced with another problem, there's no titles on my stylesheets. Border.html html jwcid=shell stylesheets=ognl:{assets.stylesheet1,assets.stylesheet2 } Border.jwc asset name=stylesheet1 path=context:css/style.css / asset name=stylesheet2 path=context:css/template.css / gives me: link rel=stylesheet type=text/css href=/fast-store-app/css/style.css / link rel=stylesheet type=text/css href=/fast-store-app/css/template.css / but I'd like: link rel=stylesheet type=text/css href=/fast-store-app/css/style.csstitle=default / link rel=stylesheet type=text/css href=/fast-store-app/css/template.css title=super/ So as I can select them on the fly from my browser's view-use style setting. If you or anyone else has already figured out how to do this I'd like to hear how it's done. Thanks again, Brian. On 9/1/06, Nick Westgate [EMAIL PROTECTED] wrote: Hi Brian. Hopefully someone using T4 can offer you more help, but in my current T3 project I do this via ... Border.jwc - which has a stylesheets parameter: ... component-specification class=blah.blah.Border allow-informal-parameters=no parameter name=stylesheets type=java.lang.Object direction=in/ component id=shell type=Shell binding name=title expression=title/ binding name=stylesheets expression=stylesheets/ binding name=doctype 'html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN' /binding /component ... SomePage.html - which passes the array of stylesheet assets: html head /head body jwcid=$content$ div jwcid=border stylesheets=ognl:{assets.common, assets.apply} ... SomePage.page - which defines the css assets: context-asset name=common path=css/common.css/ context-asset name=apply path=css/apply.css/ Cheers, Nick. Brian Long wrote: Hi all, I'm afraid I might have dug myself into a hole (again!), but I hope someone my have already encountered this problem and is willing to let me know of a possible solution. I'm trying to add multiple stylesheets to my web project, I'm currently using a @Shell component to enclose my web pages, this has a single stylesheet as per the example on the tapestry website. span jwcid=@Shell stylesheet=asset:stylesheet title=MyCorp Customer Login I want to add some more, and according to the component description there's a parameter stylesheets that will take an array of IAssets, this is want I'd like to do, the only problem is that my shell in inside a custom @Border component. Soo, I have a Border.html and Border.jwc and I have to try and create an array of IAssets (my list of stylesheets). How do I do this, create a Border.java? Any suggestions would be much appreciated . . . /Brian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DirectArea component in Tapestry 4
I was wondering how to make a DirectArea component (getting callbacks on Image Maps) for Tapestry 4 as the implementation for Tapestry 3 does not work in Tapestry 4. And clues? I was looking at using the ILinkRenderer but to be honest I am just getting in a muddle. Cheers, Hajaash
Re: DirectArea component in Tapestry 4
Perfect. Where did you find that the name for the engine service was engine-service:direct ? On 9/1/06, Brian Long [EMAIL PROTECTED] wrote: Hajaansh, had the same problem myself when moving from 3 to 4, so here are the updated AreaLink.jwc and AreaLink.java that I use. The main difference in the use of property injection for the engine service. AreaLink.jwc ?xml version=1.0 encoding=UTF-8? !DOCTYPE component-specification PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; component-specification class=com.yourProject.web.page.AreaLink allow-body=no allow-informal-parameters=yes !--inject property=directService object=engine-service:direct/-- description Creates a non-contextual link. Non-persistent state can be stored within the link using the context. /description parameter name=listener required=yes / parameter name=parameters description An object, or list of objects, encoded into the URL as service parameters. /description /parameter reserved-parameter name=href/ /component-specification AreaLink.java package com.annadaletech.yourProject.web.jwc; import org.apache.tapestry.AbstractComponent; import org.apache.tapestry.IActionListener; import org.apache.tapestry.IDirect; import org.apache.tapestry.IMarkupWriter; import org.apache.tapestry.IRequestCycle; import org.apache.tapestry.Tapestry; import org.apache.tapestry.annotations.InjectObject; import org.apache.tapestry.engine.DirectServiceParameter; import org.apache.tapestry.engine.IEngineService; import org.apache.tapestry.engine.ILink; import org.apache.tapestry.link.DirectLink; public abstract class AreaLink extends AbstractComponent implements IDirect { public abstract Object getParameters(); public abstract IActionListener getListener(); @InjectObject(engine-service:direct) public abstract IEngineService getDirectService(); public void renderComponent(IMarkupWriter writer, IRequestCycle cycle) { if (cycle.isRewinding()) return; Object[] parameters = DirectLink.constructServiceParameters (getParameters()); //IEngineService service = getDirectService(); DirectServiceParameter dsParam = new DirectServiceParameter(this,parameters); ILink link = getDirectService().getLink(false,dsParam); writer.beginEmpty(area); writer.attribute(href,link.getURL()); renderInformalParameters(writer,cycle); } public void trigger(IRequestCycle cycle) { IActionListener listener = getListener(); if (listener == null) throw Tapestry.createRequiredParameterException(this, listener); listener.actionTriggered(this, cycle); } public boolean isStateful() { return false; } } hivemodule.xml contribution configuration-id=tapestry.url.ServiceEncoders direct-service-encoder id=direct stateless-extension=direct stateful-extension=sdirect/ /contribution yourProject.application component-type type=AreaLink specification-path=jwc/AreaLink.jwc / I hope this helps . . . /Brian. On 9/1/06, Hajaansh [EMAIL PROTECTED] wrote: I was wondering how to make a DirectArea component (getting callbacks on Image Maps) for Tapestry 4 as the implementation for Tapestry 3 does not work in Tapestry 4. And clues? I was looking at using the ILinkRenderer but to be honest I am just getting in a muddle. Cheers, Hajaash
RE: DirectArea component in Tapestry 4
It's a HiveMind object provider. http://tapestry.apache.org/tapestry4/tapestry/hivedocs/service/tapestry.serv ices.EngineServiceObjectProvider.html -Original Message- From: Hajaansh [mailto:[EMAIL PROTECTED] Sent: Friday, September 01, 2006 7:21 AM To: Tapestry users Subject: Re: DirectArea component in Tapestry 4 Perfect. Where did you find that the name for the engine service was engine-service:direct ? On 9/1/06, Brian Long [EMAIL PROTECTED] wrote: Hajaansh, had the same problem myself when moving from 3 to 4, so here are the updated AreaLink.jwc and AreaLink.java that I use. The main difference in the use of property injection for the engine service. AreaLink.jwc ?xml version=1.0 encoding=UTF-8? !DOCTYPE component-specification PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; component-specification class=com.yourProject.web.page.AreaLink allow-body=no allow-informal-parameters=yes !--inject property=directService object=engine-service:direct/-- description Creates a non-contextual link. Non-persistent state can be stored within the link using the context. /description parameter name=listener required=yes / parameter name=parameters description An object, or list of objects, encoded into the URL as service parameters. /description /parameter reserved-parameter name=href/ /component-specification AreaLink.java package com.annadaletech.yourProject.web.jwc; import org.apache.tapestry.AbstractComponent; import org.apache.tapestry.IActionListener; import org.apache.tapestry.IDirect; import org.apache.tapestry.IMarkupWriter; import org.apache.tapestry.IRequestCycle; import org.apache.tapestry.Tapestry; import org.apache.tapestry.annotations.InjectObject; import org.apache.tapestry.engine.DirectServiceParameter; import org.apache.tapestry.engine.IEngineService; import org.apache.tapestry.engine.ILink; import org.apache.tapestry.link.DirectLink; public abstract class AreaLink extends AbstractComponent implements IDirect { public abstract Object getParameters(); public abstract IActionListener getListener(); @InjectObject(engine-service:direct) public abstract IEngineService getDirectService(); public void renderComponent(IMarkupWriter writer, IRequestCycle cycle) { if (cycle.isRewinding()) return; Object[] parameters = DirectLink.constructServiceParameters (getParameters()); //IEngineService service = getDirectService(); DirectServiceParameter dsParam = new DirectServiceParameter(this,parameters); ILink link = getDirectService().getLink(false,dsParam); writer.beginEmpty(area); writer.attribute(href,link.getURL()); renderInformalParameters(writer,cycle); } public void trigger(IRequestCycle cycle) { IActionListener listener = getListener(); if (listener == null) throw Tapestry.createRequiredParameterException(this, listener); listener.actionTriggered(this, cycle); } public boolean isStateful() { return false; } } hivemodule.xml contribution configuration-id=tapestry.url.ServiceEncoders direct-service-encoder id=direct stateless-extension=direct stateful-extension=sdirect/ /contribution yourProject.application component-type type=AreaLink specification-path=jwc/AreaLink.jwc / I hope this helps . . . /Brian. On 9/1/06, Hajaansh [EMAIL PROTECTED] wrote: I was wondering how to make a DirectArea component (getting callbacks on Image Maps) for Tapestry 4 as the implementation for Tapestry 3 does not work in Tapestry 4. And clues? I was looking at using the ILinkRenderer but to be honest I am just getting in a muddle. Cheers, Hajaash - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DirectArea component in Tapestry 4
I meant the direct part not the engine-service: part. Cheers, On 9/1/06, James Carman [EMAIL PROTECTED] wrote: It's a HiveMind object provider. http://tapestry.apache.org/tapestry4/tapestry/hivedocs/service/tapestry.serv ices.EngineServiceObjectProvider.html -Original Message- From: Hajaansh [mailto:[EMAIL PROTECTED] Sent: Friday, September 01, 2006 7:21 AM To: Tapestry users Subject: Re: DirectArea component in Tapestry 4 Perfect. Where did you find that the name for the engine service was engine-service:direct ? On 9/1/06, Brian Long [EMAIL PROTECTED] wrote: Hajaansh, had the same problem myself when moving from 3 to 4, so here are the updated AreaLink.jwc and AreaLink.java that I use. The main difference in the use of property injection for the engine service. AreaLink.jwc ?xml version=1.0 encoding=UTF-8? !DOCTYPE component-specification PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; component-specification class=com.yourProject.web.page.AreaLink allow-body=no allow-informal-parameters=yes !--inject property=directService object=engine-service:direct/-- description Creates a non-contextual link. Non-persistent state can be stored within the link using the context. /description parameter name=listener required=yes / parameter name=parameters description An object, or list of objects, encoded into the URL as service parameters. /description /parameter reserved-parameter name=href/ /component-specification AreaLink.java package com.annadaletech.yourProject.web.jwc; import org.apache.tapestry.AbstractComponent; import org.apache.tapestry.IActionListener; import org.apache.tapestry.IDirect; import org.apache.tapestry.IMarkupWriter; import org.apache.tapestry.IRequestCycle; import org.apache.tapestry.Tapestry; import org.apache.tapestry.annotations.InjectObject; import org.apache.tapestry.engine.DirectServiceParameter; import org.apache.tapestry.engine.IEngineService; import org.apache.tapestry.engine.ILink; import org.apache.tapestry.link.DirectLink; public abstract class AreaLink extends AbstractComponent implements IDirect { public abstract Object getParameters(); public abstract IActionListener getListener(); @InjectObject(engine-service:direct) public abstract IEngineService getDirectService(); public void renderComponent(IMarkupWriter writer, IRequestCycle cycle) { if (cycle.isRewinding()) return; Object[] parameters = DirectLink.constructServiceParameters (getParameters()); //IEngineService service = getDirectService(); DirectServiceParameter dsParam = new DirectServiceParameter(this,parameters); ILink link = getDirectService().getLink(false,dsParam); writer.beginEmpty(area); writer.attribute(href,link.getURL()); renderInformalParameters(writer,cycle); } public void trigger(IRequestCycle cycle) { IActionListener listener = getListener(); if (listener == null) throw Tapestry.createRequiredParameterException(this, listener); listener.actionTriggered(this, cycle); } public boolean isStateful() { return false; } } hivemodule.xml contribution configuration-id=tapestry.url.ServiceEncoders direct-service-encoder id=direct stateless-extension=direct stateful-extension=sdirect/ /contribution yourProject.application component-type type=AreaLink specification-path=jwc/AreaLink.jwc / I hope this helps . . . /Brian. On 9/1/06, Hajaansh [EMAIL PROTECTED] wrote: I was wondering how to make a DirectArea component (getting callbacks on Image Maps) for Tapestry 4 as the implementation for Tapestry 3 does not work in Tapestry 4. And clues? I was looking at using the ILinkRenderer but to be honest I am just getting in a muddle. Cheers, Hajaash - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DirectArea component in Tapestry 4
And, you can see where it's contributed as an object provider here: http://tapestry.apache.org/tapestry4/tapestry/hivedocs/config/hivemind.Objec tProviders.html -Original Message- From: James Carman [mailto:[EMAIL PROTECTED] Sent: Friday, September 01, 2006 7:24 AM To: 'Tapestry users' Subject: RE: DirectArea component in Tapestry 4 It's a HiveMind object provider. http://tapestry.apache.org/tapestry4/tapestry/hivedocs/service/tapestry.serv ices.EngineServiceObjectProvider.html -Original Message- From: Hajaansh [mailto:[EMAIL PROTECTED] Sent: Friday, September 01, 2006 7:21 AM To: Tapestry users Subject: Re: DirectArea component in Tapestry 4 Perfect. Where did you find that the name for the engine service was engine-service:direct ? On 9/1/06, Brian Long [EMAIL PROTECTED] wrote: Hajaansh, had the same problem myself when moving from 3 to 4, so here are the updated AreaLink.jwc and AreaLink.java that I use. The main difference in the use of property injection for the engine service. AreaLink.jwc ?xml version=1.0 encoding=UTF-8? !DOCTYPE component-specification PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; component-specification class=com.yourProject.web.page.AreaLink allow-body=no allow-informal-parameters=yes !--inject property=directService object=engine-service:direct/-- description Creates a non-contextual link. Non-persistent state can be stored within the link using the context. /description parameter name=listener required=yes / parameter name=parameters description An object, or list of objects, encoded into the URL as service parameters. /description /parameter reserved-parameter name=href/ /component-specification AreaLink.java package com.annadaletech.yourProject.web.jwc; import org.apache.tapestry.AbstractComponent; import org.apache.tapestry.IActionListener; import org.apache.tapestry.IDirect; import org.apache.tapestry.IMarkupWriter; import org.apache.tapestry.IRequestCycle; import org.apache.tapestry.Tapestry; import org.apache.tapestry.annotations.InjectObject; import org.apache.tapestry.engine.DirectServiceParameter; import org.apache.tapestry.engine.IEngineService; import org.apache.tapestry.engine.ILink; import org.apache.tapestry.link.DirectLink; public abstract class AreaLink extends AbstractComponent implements IDirect { public abstract Object getParameters(); public abstract IActionListener getListener(); @InjectObject(engine-service:direct) public abstract IEngineService getDirectService(); public void renderComponent(IMarkupWriter writer, IRequestCycle cycle) { if (cycle.isRewinding()) return; Object[] parameters = DirectLink.constructServiceParameters (getParameters()); //IEngineService service = getDirectService(); DirectServiceParameter dsParam = new DirectServiceParameter(this,parameters); ILink link = getDirectService().getLink(false,dsParam); writer.beginEmpty(area); writer.attribute(href,link.getURL()); renderInformalParameters(writer,cycle); } public void trigger(IRequestCycle cycle) { IActionListener listener = getListener(); if (listener == null) throw Tapestry.createRequiredParameterException(this, listener); listener.actionTriggered(this, cycle); } public boolean isStateful() { return false; } } hivemodule.xml contribution configuration-id=tapestry.url.ServiceEncoders direct-service-encoder id=direct stateless-extension=direct stateful-extension=sdirect/ /contribution yourProject.application component-type type=AreaLink specification-path=jwc/AreaLink.jwc / I hope this helps . . . /Brian. On 9/1/06, Hajaansh [EMAIL PROTECTED] wrote: I was wondering how to make a DirectArea component (getting callbacks on Image Maps) for Tapestry 4 as the implementation for Tapestry 3 does not work in Tapestry 4. And clues? I was looking at using the ILinkRenderer but to be honest I am just getting in a muddle. Cheers, Hajaash - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DirectArea component in Tapestry 4
Oh, that. You can see that here: http://tapestry.apache.org/tapestry4/tapestry/hivedocs/module/tapestry.servi ces.html The engine services are contributed to the tapestry.services.FactoryServices configuration point. -Original Message- From: Hajaansh [mailto:[EMAIL PROTECTED] Sent: Friday, September 01, 2006 7:36 AM To: Tapestry users Subject: Re: DirectArea component in Tapestry 4 I meant the direct part not the engine-service: part. Cheers, On 9/1/06, James Carman [EMAIL PROTECTED] wrote: It's a HiveMind object provider. http://tapestry.apache.org/tapestry4/tapestry/hivedocs/service/tapestry.serv ices.EngineServiceObjectProvider.html -Original Message- From: Hajaansh [mailto:[EMAIL PROTECTED] Sent: Friday, September 01, 2006 7:21 AM To: Tapestry users Subject: Re: DirectArea component in Tapestry 4 Perfect. Where did you find that the name for the engine service was engine-service:direct ? On 9/1/06, Brian Long [EMAIL PROTECTED] wrote: Hajaansh, had the same problem myself when moving from 3 to 4, so here are the updated AreaLink.jwc and AreaLink.java that I use. The main difference in the use of property injection for the engine service. AreaLink.jwc ?xml version=1.0 encoding=UTF-8? !DOCTYPE component-specification PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; component-specification class=com.yourProject.web.page.AreaLink allow-body=no allow-informal-parameters=yes !--inject property=directService object=engine-service:direct/-- description Creates a non-contextual link. Non-persistent state can be stored within the link using the context. /description parameter name=listener required=yes / parameter name=parameters description An object, or list of objects, encoded into the URL as service parameters. /description /parameter reserved-parameter name=href/ /component-specification AreaLink.java package com.annadaletech.yourProject.web.jwc; import org.apache.tapestry.AbstractComponent; import org.apache.tapestry.IActionListener; import org.apache.tapestry.IDirect; import org.apache.tapestry.IMarkupWriter; import org.apache.tapestry.IRequestCycle; import org.apache.tapestry.Tapestry; import org.apache.tapestry.annotations.InjectObject; import org.apache.tapestry.engine.DirectServiceParameter; import org.apache.tapestry.engine.IEngineService; import org.apache.tapestry.engine.ILink; import org.apache.tapestry.link.DirectLink; public abstract class AreaLink extends AbstractComponent implements IDirect { public abstract Object getParameters(); public abstract IActionListener getListener(); @InjectObject(engine-service:direct) public abstract IEngineService getDirectService(); public void renderComponent(IMarkupWriter writer, IRequestCycle cycle) { if (cycle.isRewinding()) return; Object[] parameters = DirectLink.constructServiceParameters (getParameters()); //IEngineService service = getDirectService(); DirectServiceParameter dsParam = new DirectServiceParameter(this,parameters); ILink link = getDirectService().getLink(false,dsParam); writer.beginEmpty(area); writer.attribute(href,link.getURL()); renderInformalParameters(writer,cycle); } public void trigger(IRequestCycle cycle) { IActionListener listener = getListener(); if (listener == null) throw Tapestry.createRequiredParameterException(this, listener); listener.actionTriggered(this, cycle); } public boolean isStateful() { return false; } } hivemodule.xml contribution configuration-id=tapestry.url.ServiceEncoders direct-service-encoder id=direct stateless-extension=direct stateful-extension=sdirect/ /contribution yourProject.application component-type type=AreaLink specification-path=jwc/AreaLink.jwc / I hope this helps . . . /Brian. On 9/1/06, Hajaansh [EMAIL PROTECTED] wrote: I was wondering how to make a DirectArea component (getting callbacks on Image Maps) for Tapestry 4 as the implementation for Tapestry 3 does not work in Tapestry 4. And clues? I was looking at using the ILinkRenderer but to be honest I am just getting in a muddle. Cheers, Hajaash - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tapestry component deficiencies
Tapestry web components are made of Tapestry jwc-components and Tapestry page components. The Tapestry jwc-component comprises all the logic and resources related to a component specification whereas the Tapestry page component comprises all the logic and resources related to a page specification. A simple Tapestry web component is just made of a single jwc-component whereas a complex Tapestry web component, such as the inspector button component in Tapestry's contrib-library, is made of several jwc-components and several page components. Of course, both types of components may themselves be made of other, nested, Tapestry components. So far so good. For now, let a multipage web component be a web component that consists of more than a single page, that is, in Tapestry's world, a web component that is made of a jwc-component and at least one page component. Tapestry's inspector button component is a multipage web component and there are a few more in the contrib-library. In Tapestry it is not possible to declare a multipage web component as a single unit. (However, you can *treat* a multipage web component as a single unit.) This is evident in the application and library specification files where the paths to the component specification *and* to the individual page specifiations have to be listed. (See, for instance, the page entry of the Inspector page in the Contrib.library file.) Consequently, Tapestry has no namespace for a multipage web component. Tapestry only knows about application namespaces and library namespaces. In a i18n capable multipage web component, i.e., a web component that supports different languages, it is not possible to centralize any messages shared by the individual pages other than putting these messages in a so called namespace message catalog. By doing this, the messages are seen application wide or library wide but not web component wide. To be concrete: Assume there is a need to make the inspector button component multi-language capable and assume that there are messages that are shared between the individual pages and the local sub-components of the inspector button component. Then putting these messages into the contrib-library's namespace message catalog makes them visible to all other components contained in the library not to say of the potential risk for a nameclash with a message key already defined by another component. In Java, libraries do not hava a namespace but components have one: Components in Java consist of one or more packages. Tapestry itself is, for instance, a Java component where all names are virtually prefixed by the org.apache.tapestry literal character string. Maybe replacing the library namespace concept by a web component namespace concept would help clarify the situation in Tapestry. I use Tapestry 4.0.2. I do not know if this issue is addressed in Tapestry 5 (aka Tapestry IoC). I even don't know if this is the right forum. Therefore, any comments on this complex topic are highly appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tapestry Acegi
Hi James, I've managed to get Acegi up and running with our own custom filter but when I put the Tapestry Acegi jar into my build I get errors about various beans not being present. Is there any documentation on what Spring beans TA depends on? Also, looking at the hivemodule, most of the configuration is in Hivemind with some dependencies on other Acegi objects being created somewhere else, i.e. in Spring. While we make extensive use of both, we have Hivemind sitting on top of Spring. In otherwords, while Hivemind can retrieve Spring beans, Spring cannot gain access to Hivemind services. This is to stop any circular depencecies being created. Could this cause a problem for TA? I guess I'm kind of working in the cark at the moment, but the concept of TA looks very, very promising! Rob Cole James Carman [EMAIL PROTECTED] 31/08/2006 18:11 To
RE: Tapestry Acegi
Tapestry-Acegi doesn't use Spring at all. Can you send me the error messages? You need hivemind-acegi.jar in your classpath. -Original Message- From: Robert Cole [mailto:[EMAIL PROTECTED] Sent: Friday, September 01, 2006 9:53 AM To: Tapestry users Cc: 'Tapestry users' Subject: RE: Tapestry Acegi Hi James, I've managed to get Acegi up and running with our own custom filter but when I put the Tapestry Acegi jar into my build I get errors about various beans not being present. Is there any documentation on what Spring beans TA depends on? Also, looking at the hivemodule, most of the configuration is in Hivemind with some dependencies on other Acegi objects being created somewhere else, i.e. in Spring. While we make extensive use of both, we have Hivemind sitting on top of Spring. In otherwords, while Hivemind can retrieve Spring beans, Spring cannot gain access to Hivemind services. This is to stop any circular depencecies being created. Could this cause a problem for TA? I guess I'm kind of working in the cark at the moment, but the concept of TA looks very, very promising! Rob Cole James Carman [EMAIL PROTECTED] 31/08/2006 18:11 To 'Tapestry users' users@tapestry.apache.org cc Please respond to Tapestry users users@tapestry.apache.org Subject RE: Tapestry Acegi Oh, as for the @Secured annotation not being present, you have to add the acegi-security-tiger.jar file (tiger = JDK5) to your classpath. Tapestry-Acegi uses the built-in @Secured annotation available from Acegi to secure page classes and listener methods. For the build to work, you will have to install some of the sun jars (it's a pain in the rear, I know) and you can refer to the maven documentation here: http://maven.apache.org/guides/mini/guide-coping-with-sun-jars.html There is a bit (a very bit, sorry :-) of documentation available at: http://www.carmanconsulting.com/tapestry-acegi Again, I am going to have some time off next week and the next and I plan on updating all of this stuff. -Original Message- From: Robert Cole [mailto:[EMAIL PROTECTED] Sent: Thursday, August 31, 2006 12:53 PM To: users@tapestry.apache.org Subject: Tapestry Acegi Has anyone used the Tapestry-Acegi project? I'm about to implement some role based security on our project and we're looking at this as its linked on the Tapestry home page. Unfortunately there's no doc and the builds don't appear to work as when I tried one (the latest one from June some time) it looks like there's some hivemind configuration missing. Plus the annotation file that's supposed to do all of the work for me is missing from the build! Its not going to be that hard to implement our own Acegi based security but it would be nice if the Tapestry one could do 90% of the work for us. Thanks, Rob Cole --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tapestry Acegi
Hi James. Thanks for taking the time to help me with this. I think my problem was caused by not having the hivemind-acegi module. I've now got that plus the hivemind-acegi-dao, as I want to use a simple InMemoryDaoImpl. I think I'm now back into Hivemind related issues, as this is where my Hivemind knowledge breaks down. I can see in the hivemodule you've got this: service-point id=UserDetailsService interface=org.acegisecurity.userdetails.UserDetailsService/ I need to provide my own implementation, something like this, though I'm not quite sure how to specify the userMap. Fun with that later I suspect. service-point id=userDetailsService interface=org.acegisecurity.userdetails.UserDetailsService invoke-factory construct class=org.acegisecurity.userdetails.memory.InMemoryDaoImpl set-object property=userMap value [EMAIL PROTECTED],ROLE_SUPERUSER [EMAIL PROTECTED],ROLE_DATA_ADMINISTRATOR fred,ROLE_SUPPORT /value /set-object /construct /invoke-factory /service-point I've tried using a contribution : !-- Acegi DAO seurity requirement -- contribution configuration-id=hivemind.acegi.dao.UserDetailsService service name=UserDetailsService object=service:userDetailsService/ /contribution But since I'm not contributing to a named service I get an error. Hopefully I just need to sort out these last two things and I'm up and running. If you like once I get there I could write a how-to for you to use on the tapestry-acegi site detailing what I did along with some concrete examples? Rob Cole CSA Web +44 (0)20 754 51117 James Carman [EMAIL PROTECTED] 01/09/2006 14:58
Issues with Custom Components
Hi, I am a beginner with tapestry and I am trying to create my first custom component. I am using Kent Tongs book as my source and doing the Copyright component, but I am doing somthing wrong becouse I receive a org.apache.tapestry.util.xml.DocumentParseException that states: Unable to read context:/default/html/public/index.page: Attribute value must be declared for element type component. And then I got org.xml.sax.SAXParseException that states: Attribute value must be declared for element type component. I figure that there is something wrong with my mapping or the location of the files or the location, but I cant find out what is wrong. My mycompany.application looks like this: ?xml version=1.0 encoding=UTF-8? !DOCTYPE application PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; application name=mycompany library id=contrib specification-path=classpath:/org/apache/tapestry/contrib/Contrib.library/ meta key=org.apache.tapestry.component-class-packages value=com.mycompany.ui.web.components/ component-type type=Copyright specification-path=classes/com/mycompany/ui/web/components/Copyright.jwc/ /application My Copyright.html: html body jwcid=$content$ hrCopyright span jwcid=year2005/span. Investacorp Inc. All rights reserved. /body /html My Copyright.jwc: ?xml version=1.0? !DOCTYPE component-specification PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; component-specification allow-body=no descriptionIt renders a copyright notice./description parameter name=holder required=yes/ component id=year type=Insert binding name=value value=currentYear/ /component /component-specification My Copyright.java: package com.mycompany.ui.web.components; import java.util.GregorianCalendar; import org.apache.tapestry.BaseComponent; public class Copyright extends BaseComponent { public int getCurrentYear() { return new GregorianCalendar().get(GregorianCalendar.YEAR); } } My index.page fale that tries to use the component: ?xml version=1.0? !DOCTYPE page-specification PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; page-specification class=com.mycompany.ui.web.action.home.HomeAction component id=companyName type=Insert binding name=value value=repSite.companyName/ /component component id=copyright value=Copyright binding name=holder value=companyName/ /component /page-specification I have my java-class in a seperate folder structure: src/main/java/com/mycompany/ui/web/components/Copyright.java My .jwc file have this location: WEB-INF/classes/com/mycompany/ui/web/components/Copyright.jwc My .application have this location: WEB-INF/mycompany.application As far as my knowlegde is I think this is correct... but it does not work...can somebody point out the error/errors in my code? thanks Jacob -- View this message in context: http://www.nabble.com/Issues-with-Custom-Components-tf2204142.html#a6104003 Sent from the Tapestry - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Issues with Custom Components
Read the error message. Your index.page has this line: component id=copyright value=Copyright but it should be: component id=copyright type=Copyright just a small typo :) Martin On Fri, 01 Sep 2006 21:17:29 +0200, jake123 [EMAIL PROTECTED] wrote: Hi, I am a beginner with tapestry and I am trying to create my first custom component. I am using Kent Tongs book as my source and doing the Copyright component, but I am doing somthing wrong becouse I receive a org.apache.tapestry.util.xml.DocumentParseException that states: Unable to read context:/default/html/public/index.page: Attribute value must be declared for element type component. And then I got org.xml.sax.SAXParseException that states: Attribute value must be declared for element type component. I figure that there is something wrong with my mapping or the location of the files or the location, but I cant find out what is wrong. My mycompany.application looks like this: ?xml version=1.0 encoding=UTF-8? !DOCTYPE application PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; application name=mycompany library id=contrib specification-path=classpath:/org/apache/tapestry/contrib/Contrib.library/ meta key=org.apache.tapestry.component-class-packages value=com.mycompany.ui.web.components/ component-type type=Copyright specification-path=classes/com/mycompany/ui/web/components/Copyright.jwc/ /application My Copyright.html: html body jwcid=$content$ hrCopyright span jwcid=year2005/span. Investacorp Inc. All rights reserved. /body /html My Copyright.jwc: ?xml version=1.0? !DOCTYPE component-specification PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; component-specification allow-body=no descriptionIt renders a copyright notice./description parameter name=holder required=yes/ component id=year type=Insert binding name=value value=currentYear/ /component /component-specification My Copyright.java: package com.mycompany.ui.web.components; import java.util.GregorianCalendar; import org.apache.tapestry.BaseComponent; public class Copyright extends BaseComponent { public int getCurrentYear() { return new GregorianCalendar().get(GregorianCalendar.YEAR); } } My index.page fale that tries to use the component: ?xml version=1.0? !DOCTYPE page-specification PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; page-specification class=com.mycompany.ui.web.action.home.HomeAction component id=companyName type=Insert binding name=value value=repSite.companyName/ /component component id=copyright value=Copyright binding name=holder value=companyName/ /component /page-specification I have my java-class in a seperate folder structure: src/main/java/com/mycompany/ui/web/components/Copyright.java My .jwc file have this location: WEB-INF/classes/com/mycompany/ui/web/components/Copyright.jwc My .application have this location: WEB-INF/mycompany.application As far as my knowlegde is I think this is correct... but it does not work...can somebody point out the error/errors in my code? thanks Jacob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Contrib Table Summarize
Hi, I'm using the contrib Table component, iterating over a Collection of Row Objects, and setting the collumns values with a String parameter. I want to get the last row of the table with a sum of all data on each column. Does anybody know how to do this in a simple way? Thank's! Mael Caldas
OpenDating 0.1.1 is Released.
OpenDating.org developement team is happy to announce the release of version 0.1.1 to its open source online dating system. This release brings major architectural enhancements: * Spring-backed DAOs * AspectJ integration: - performance monitoring of Tapestry pages via AOP - enforcing coding standards * Hivemind Interceptor: - performance monitoring of DAOs * Improved logging * New global location database which includes city, longitude and latitude from almost every country in the world. This database will be used in the next version to enable international support. OpenDating is an open source online dating system built in Java on top of several successfull frameworks: mainly Tapestry, Hivemind, Spring, AspectJ and Log4J. OpenDating promotes ideas of sharing the code to help solve coding problems (by serving as a practical example), and provide a usable online dating solution. Developer Home Page: http://dev.opendating.org JavaDoc: http://dev.opendating.org/javadoc/opendating-0.1.1/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]