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 > > > > > > > "-//Apache Software Foundation//Tapestry Specification 4.0//EN" > > "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";> > > > > > class="com.yourProject.web.page.AreaLink" > > allow-body="no" > > allow-informal-parameters="yes"> > > > > > > > > > > Creates a non-contextual link. Non-persistent state can be stored > within > > the link > > using the context. > > > > > > > > > > > > > > An object, or list of objects, encoded into the URL > > as service parameters. > > > > > > > > > > > > > > > > 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 > > > > > > > stateful-extension="sdirect"/> > > > > > > yourProject.application > > > > > > > > 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
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 > > >"-//Apache Software Foundation//Tapestry Specification 4.0//EN" > "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";> > > class="com.yourProject.web.page.AreaLink" > allow-body="no" > allow-informal-parameters="yes"> > > > > > Creates a non-contextual link. Non-persistent state can be stored within > the link > using the context. > > > > > > > An object, or list of objects, encoded into the URL > as service parameters. > > > > > > > > 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 > > > stateful-extension="sdirect"/> > > > yourProject.application > > > > 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
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 > > >"-//Apache Software Foundation//Tapestry Specification 4.0//EN" > "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";> > > class="com.yourProject.web.page.AreaLink" > allow-body="no" > allow-informal-parameters="yes"> > > > > > Creates a non-contextual link. Non-persistent state can be stored within > the link > using the context. > > > > > > > An object, or list of objects, encoded into the URL > as service parameters. > > > > > > > > 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 > > > stateful-extension="sdirect"/> > > > yourProject.application > > > > 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
From the tapestry users mailing list, where else . . . ! /Brian. On 9/1/06, Hajaansh <[EMAIL PROTECTED]> wrote: 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 > > >"-//Apache Software Foundation//Tapestry Specification 4.0//EN" > "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";> > > class="com.yourProject.web.page.AreaLink" > allow-body="no" > allow-informal-parameters="yes"> > > > > > Creates a non-contextual link. Non-persistent state can be stored within > the link > using the context. > > > > > > > An object, or list of objects, encoded into the URL > as service parameters. > > > > > > > > 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 > > > stateful-extension="sdirect"/> > > > yourProject.application > > > > 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 > > >"-//Apache Software Foundation//Tapestry Specification 4.0//EN" > "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";> > > class="com.yourProject.web.page.AreaLink" > allow-body="no" > allow-informal-parameters="yes"> > > > > > Creates a non-contextual link. Non-persistent state can be stored within > the link > using the context. > > > > > > > An object, or list of objects, encoded into the URL > as service parameters. > > > > > > > > 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 > > > stateful-extension="sdirect"/> > > > yourProject.application > > > > 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
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 http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";> Creates a non-contextual link. Non-persistent state can be stored within the link using the context. An object, or list of objects, encoded into the URL as service parameters. 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 yourProject.application 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
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 http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";> Creates a non-contextual link. Non-persistent state can be stored within the link using the context. An object, or list of objects, encoded into the URL as service parameters. 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 yourProject.application 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