You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by tux4ever <ge...@gmx.net> on 2006/10/31 20:16:21 UTC
Tree and Table Component
Dear users!
I hope you can give me some hints to realize the following requirement. We
want to implement a tree table including custom components. Please have a
look a the screenshot to see what I mean;-)
The header should include some fields and if you click on the "+" symbol a
detailed overview is shown. All fields in the list should be editable.
Please give me some advice to develop this feature or can explain a design
pattern to implement the desired feature.
Best regards,
Gerry http://www.nabble.com/file/3931/ScreenShot.jpg
--
View this message in context: http://www.nabble.com/Tree-and-Table-Component-tf2547715.html#a7100515
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Overriding HomeService (this works)
Posted by Kevin Whitley <ke...@podtech.net>.
Thanks for the help. Just to complete the loop for anybody who is
interested in doing something similar...
This configuration worked for me (added to my hivemodule.xml):
<implementation service-id="tapestry.services.Home">
<invoke-factory service-id="hivemind.BuilderFactory"
model="singleton">
<construct class="xx.tapestry.MyHomeService">
<set-object property="responseRenderer"
value="infrastructure:responseRenderer" />
<set-object property="linkFactory"
value="infrastructure:linkFactory" />
<set-object property="pageName" value="app-
property:org.apache.tapestry.home-page" />
</construct>
</invoke-factory>
</implementation>
Where I had the class "MyHomeService" with code like this:
------------------------------------------------------------------------
----------
package xx.tapestry;
import org.apache.tapestry.engine.HomeService;
import org.apache.tapestry.services.ResponseRenderer;
import org.apache.tapestry.IRequestCycle;
import java.io.IOException;
/**
Example override of Tapestry's HomeService
*/
public class MyHomeService extends HomeService
{
private String _defaultPageName;
private ResponseRenderer _responseRenderer;
public void setResponseRenderer (ResponseRenderer responseRenderer)
{
_responseRenderer = responseRenderer;
super.setResponseRenderer(responseRenderer);
}
public void setPageName (String pageName)
{
super.setPageName(pageName);
_defaultPageName = pageName;
}
public String getPageName ()
{
// replace with interesting logic
return "_defaultPageName;
}
public void service(IRequestCycle cycle) throws IOException
{
// copied from HomeService (because no way to reuse that code)
cycle.activate(getPageName());
_responseRenderer.renderResponse(cycle);
}
------------------------------------------------------------------------
----------
Thanks,
Kevin Whitley
podtech.net
On Nov 3, 2006, at 1:35 PM, James Carman wrote:
> You might have to inject the same things that the regular home service
> has injected. Take a look at the HiveDoc for HomeService.
>
> On 11/3/06, Kevin Whitley <ke...@podtech.net> wrote:
>> Thanks - that gets the service instantiated. However, I discover
>> that my service doesn't get initialized the same way that the regular
>> HomeService does.
>>
>> Without my implementation xml in place the standard HomeService gets
>> initialized (calls to setResponseRenderer() and setPageName()) when
>> it is referenced in
>> tapestry.services.impl.ServiceMapImpl.resolveEngineService(). But
>> when I've got my MyHomeService in place that same routine does not
>> result in the calls to setResponseRenderer and setPageName - which
>> basically makes it impossible to work. Huh? I would have thought
>> that the service would have been treated the same - is there more
>> configuration I have to set up somewhere?
>>
>> Thanks,
>> Kevin Whitley
>> podtech.net
>>
>>
>> On Nov 3, 2006, at 11:03 AM, James Carman wrote:
>>
>> > Try this:
>> >
>> > <implementation service-id="tapestry.services.Home">
>> > <invoke-factory>
>> > <construct class="net.podtech.ui.tapestry.MyHomeService"/>
>> > </invoke-factory>
>> > </implementation>
>> >
>> > On 11/3/06, Kevin Whitley <ke...@podtech.net> wrote:
>> >> In Tapestry 4.0 I'd like to override the HomeService (varying the
>> >> home page depending on the user - unfortunately not as simple as
>> >> merely changing the home page name). Javadoc comments in
>> HomeService
>> >> make it sound like this is expected and trivial.
>> >>
>> >> I created a test class to try this out - MyHomeService. And
>> then in
>> >> my hivemodule.xml file I have:
>> >>
>> >> <module id="podtech" version="1.0.0"
>> >> package="net.podtech.ui.tapestry.Xx">
>> >> <implementation service-id="home">
>> >> <create-instance
>> >> class="net.podtech.ui.tapestry.MyHomeService"/>
>> >> </implementation>
>> >> </module>
>> >>
>> >> But when HiveMind is initializing I get complaints that "Module
>> >> podtech contributed to unknown service point podtech.home". On a
>> >> guess I tried changing the service-id to "tapestry.home" but I got
>> >> the same error ("unknown service point tapestry.home").
>> >>
>> >> I'm basing the service-override on the HiveMind "overriding a
>> service
>> >> doc" at http://hivemind.apache.org/override.html. Is this the
>> right
>> >> approach? hivemodule.xml the right place? What is the service-id
>> >> that is needed? Do I need to have this in a particular
>> module? (Is
>> >> there some way to ask HiveMind for an enumeration of legal service
>> >> points?)
>> >>
>> >> By the way, once I get my HomeService hooked in, I assume that
>> >> overriding the getPageName() method will be all I need to do to
>> >> redirect to different pages?
>> >>
>> >> Thanks for any advice,
>> >> Kevin Whitley
>> >> Podtech.net
>> >>
>> >>
>> >>
>> >>
>> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> >> For additional commands, e-mail: users-help@tapestry.apache.org
>> >>
>> >>
>> >
>> >
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> > For additional commands, e-mail: users-help@tapestry.apache.org
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Overriding HomeService
Posted by James Carman <ja...@carmanconsulting.com>.
You might have to inject the same things that the regular home service
has injected. Take a look at the HiveDoc for HomeService.
On 11/3/06, Kevin Whitley <ke...@podtech.net> wrote:
> Thanks - that gets the service instantiated. However, I discover
> that my service doesn't get initialized the same way that the regular
> HomeService does.
>
> Without my implementation xml in place the standard HomeService gets
> initialized (calls to setResponseRenderer() and setPageName()) when
> it is referenced in
> tapestry.services.impl.ServiceMapImpl.resolveEngineService(). But
> when I've got my MyHomeService in place that same routine does not
> result in the calls to setResponseRenderer and setPageName - which
> basically makes it impossible to work. Huh? I would have thought
> that the service would have been treated the same - is there more
> configuration I have to set up somewhere?
>
> Thanks,
> Kevin Whitley
> podtech.net
>
>
> On Nov 3, 2006, at 11:03 AM, James Carman wrote:
>
> > Try this:
> >
> > <implementation service-id="tapestry.services.Home">
> > <invoke-factory>
> > <construct class="net.podtech.ui.tapestry.MyHomeService"/>
> > </invoke-factory>
> > </implementation>
> >
> > On 11/3/06, Kevin Whitley <ke...@podtech.net> wrote:
> >> In Tapestry 4.0 I'd like to override the HomeService (varying the
> >> home page depending on the user - unfortunately not as simple as
> >> merely changing the home page name). Javadoc comments in HomeService
> >> make it sound like this is expected and trivial.
> >>
> >> I created a test class to try this out - MyHomeService. And then in
> >> my hivemodule.xml file I have:
> >>
> >> <module id="podtech" version="1.0.0"
> >> package="net.podtech.ui.tapestry.Xx">
> >> <implementation service-id="home">
> >> <create-instance
> >> class="net.podtech.ui.tapestry.MyHomeService"/>
> >> </implementation>
> >> </module>
> >>
> >> But when HiveMind is initializing I get complaints that "Module
> >> podtech contributed to unknown service point podtech.home". On a
> >> guess I tried changing the service-id to "tapestry.home" but I got
> >> the same error ("unknown service point tapestry.home").
> >>
> >> I'm basing the service-override on the HiveMind "overriding a service
> >> doc" at http://hivemind.apache.org/override.html. Is this the right
> >> approach? hivemodule.xml the right place? What is the service-id
> >> that is needed? Do I need to have this in a particular module? (Is
> >> there some way to ask HiveMind for an enumeration of legal service
> >> points?)
> >>
> >> By the way, once I get my HomeService hooked in, I assume that
> >> overriding the getPageName() method will be all I need to do to
> >> redirect to different pages?
> >>
> >> Thanks for any advice,
> >> Kevin Whitley
> >> Podtech.net
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Overriding HomeService
Posted by Kevin Whitley <ke...@podtech.net>.
Thanks - that gets the service instantiated. However, I discover
that my service doesn't get initialized the same way that the regular
HomeService does.
Without my implementation xml in place the standard HomeService gets
initialized (calls to setResponseRenderer() and setPageName()) when
it is referenced in
tapestry.services.impl.ServiceMapImpl.resolveEngineService(). But
when I've got my MyHomeService in place that same routine does not
result in the calls to setResponseRenderer and setPageName - which
basically makes it impossible to work. Huh? I would have thought
that the service would have been treated the same - is there more
configuration I have to set up somewhere?
Thanks,
Kevin Whitley
podtech.net
On Nov 3, 2006, at 11:03 AM, James Carman wrote:
> Try this:
>
> <implementation service-id="tapestry.services.Home">
> <invoke-factory>
> <construct class="net.podtech.ui.tapestry.MyHomeService"/>
> </invoke-factory>
> </implementation>
>
> On 11/3/06, Kevin Whitley <ke...@podtech.net> wrote:
>> In Tapestry 4.0 I'd like to override the HomeService (varying the
>> home page depending on the user - unfortunately not as simple as
>> merely changing the home page name). Javadoc comments in HomeService
>> make it sound like this is expected and trivial.
>>
>> I created a test class to try this out - MyHomeService. And then in
>> my hivemodule.xml file I have:
>>
>> <module id="podtech" version="1.0.0"
>> package="net.podtech.ui.tapestry.Xx">
>> <implementation service-id="home">
>> <create-instance
>> class="net.podtech.ui.tapestry.MyHomeService"/>
>> </implementation>
>> </module>
>>
>> But when HiveMind is initializing I get complaints that "Module
>> podtech contributed to unknown service point podtech.home". On a
>> guess I tried changing the service-id to "tapestry.home" but I got
>> the same error ("unknown service point tapestry.home").
>>
>> I'm basing the service-override on the HiveMind "overriding a service
>> doc" at http://hivemind.apache.org/override.html. Is this the right
>> approach? hivemodule.xml the right place? What is the service-id
>> that is needed? Do I need to have this in a particular module? (Is
>> there some way to ask HiveMind for an enumeration of legal service
>> points?)
>>
>> By the way, once I get my HomeService hooked in, I assume that
>> overriding the getPageName() method will be all I need to do to
>> redirect to different pages?
>>
>> Thanks for any advice,
>> Kevin Whitley
>> Podtech.net
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Overriding HomeService
Posted by James Carman <ja...@carmanconsulting.com>.
Try this:
<implementation service-id="tapestry.services.Home">
<invoke-factory>
<construct class="net.podtech.ui.tapestry.MyHomeService"/>
</invoke-factory>
</implementation>
On 11/3/06, Kevin Whitley <ke...@podtech.net> wrote:
> In Tapestry 4.0 I'd like to override the HomeService (varying the
> home page depending on the user - unfortunately not as simple as
> merely changing the home page name). Javadoc comments in HomeService
> make it sound like this is expected and trivial.
>
> I created a test class to try this out - MyHomeService. And then in
> my hivemodule.xml file I have:
>
> <module id="podtech" version="1.0.0"
> package="net.podtech.ui.tapestry.Xx">
> <implementation service-id="home">
> <create-instance
> class="net.podtech.ui.tapestry.MyHomeService"/>
> </implementation>
> </module>
>
> But when HiveMind is initializing I get complaints that "Module
> podtech contributed to unknown service point podtech.home". On a
> guess I tried changing the service-id to "tapestry.home" but I got
> the same error ("unknown service point tapestry.home").
>
> I'm basing the service-override on the HiveMind "overriding a service
> doc" at http://hivemind.apache.org/override.html. Is this the right
> approach? hivemodule.xml the right place? What is the service-id
> that is needed? Do I need to have this in a particular module? (Is
> there some way to ask HiveMind for an enumeration of legal service
> points?)
>
> By the way, once I get my HomeService hooked in, I assume that
> overriding the getPageName() method will be all I need to do to
> redirect to different pages?
>
> Thanks for any advice,
> Kevin Whitley
> Podtech.net
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Overriding HomeService
Posted by Kevin Whitley <ke...@podtech.net>.
In Tapestry 4.0 I'd like to override the HomeService (varying the
home page depending on the user - unfortunately not as simple as
merely changing the home page name). Javadoc comments in HomeService
make it sound like this is expected and trivial.
I created a test class to try this out - MyHomeService. And then in
my hivemodule.xml file I have:
<module id="podtech" version="1.0.0"
package="net.podtech.ui.tapestry.Xx">
<implementation service-id="home">
<create-instance
class="net.podtech.ui.tapestry.MyHomeService"/>
</implementation>
</module>
But when HiveMind is initializing I get complaints that "Module
podtech contributed to unknown service point podtech.home". On a
guess I tried changing the service-id to "tapestry.home" but I got
the same error ("unknown service point tapestry.home").
I'm basing the service-override on the HiveMind "overriding a service
doc" at http://hivemind.apache.org/override.html. Is this the right
approach? hivemodule.xml the right place? What is the service-id
that is needed? Do I need to have this in a particular module? (Is
there some way to ask HiveMind for an enumeration of legal service
points?)
By the way, once I get my HomeService hooked in, I assume that
overriding the getPageName() method will be all I need to do to
redirect to different pages?
Thanks for any advice,
Kevin Whitley
Podtech.net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org