I went for a sub despatch system eventually, using Tommi's trick with the .setpathInfo.
It turns out to be simpler as the function stubs and the dispatcher are in the same place and the urlmapper only needs to know about the root url and the component name. I have a json library, that I plan to use, once i have this working, i will put together a class that inherits from ecppcomponent and does all the magic, and share it with everybody. Im trying to make it conform to the RubyOnRails ActiveResource REST url format, which will make it easier to integrate with other applications as that is becoming a defacto standard for REST interfaces. On 19 Aug 2008, at 16:37, Mark Wright wrote: > On Tue, 19 Aug 2008 17:27:35 +0200 > Tommi Mäkitalo <[EMAIL PROTECTED]> wrote: > >> Am Dienstag 19 August 2008 17:21:25 schrieb Mark Wright: >>> Hi Tim, >>> >>> This email from Tommi has some hints: >>> >>> http://www.mail-archive.com/[email protected]/msg00123.h >>> tml >>> >> ... >> >> Hi, >> >> you are really fast ;-) >> >> And you are indeed right. I did not test my previous post and I >> oversee, that there is actually a internal subcomponent called. This >> is not supported. >> >> Tommi >> > > Hi Tommi and Tim, > > The following based on Tommi's email referenced above seems > to work calling sub-components from a URL like: > > http://mywebsite/solar > > tntnet.conf > > MapUrl ^/solar [EMAIL PROTECTED] menu_solar_page_0 > > in the main component of wizard.ecpp: > > std::string pathInfo = request.getPathInfo(); > if (pathInfo.size() > 2) > { > qparam.getScope().put("sss_p", tnt::createPointerObject(&sss)); > return callSubComp(request.getPathInfo(), request, reply, qparam); > } > > and the sub-component: > > <%def menu_solar_page_0><%param> > vett::ServerSessionState *sss_p; > </%param><%args> > std::string some_arg; > </%args><%cpp> > // etc. > </%cpp></%def> > > Thanks, Mark > > -- > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere in > the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Tntnet-general mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/tntnet-general ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Tntnet-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tntnet-general
