Thanks, this seems to work basically.
But is it possible to mix that with - optimal even dynamic - templates?
I miss something like
insertTemplate("<"+myComponentAsConfigured+" type=\"way\" id=\"5\"/>");
To describe it another way:
At runtime I have all informations to assemble a tml template, but these
come from symbols which are configured by a config file.
I tried
1) to use the MarkupWriter to write template markup - sure, this didn't
work.
2) to find out how to instrumentalize the beforeRenderTemplate to add
template code myself - but no idea how that could work (if).
3) to find anything like a util class that allows something like
mentioned above.
So: is that possible?
regards
Peter
Am 13.10.2012 03:30, schrieb Josh Canfield:
If you need to create a link, take a look at PageRenderLinkSource.
Then create your component so that it generates the html using the
MarkupWriter.
Josh
On Fri, Oct 12, 2012 at 8:58 AM, Peter Wendorff
<wendo...@uni-paderborn.de>wrote:
Hi.
I would like to have a component that is able to create arbitrary
hypertext, and I'm not sure, if there's a better way to do that than I have
in mind currently.
My database contains spatial geo data from the OpenStreetMap project, and
I would like to generate texts as they probably could be part of an old
styled text adventure or something like that.
Let's do an example:
[snip]
The page /explore/way/12423 refers to one object of the database, a
geographic linestring, e.g. a street.
From the database I get more information about the way and would like to
assemble these into a text like the following:
You are at the [Abbey Road] between [Marcus Square] and [Church Alley].
The [Westminster Abbey] is on your left.
From here you can cross the [Marcus Square] to straight ahead follow the
[Abbey road towards the River way], or you can...
[snap]
I think, it's enough as an example.
The parts in brackets should be page links or action links, leading e.g.
to the /explore/way/2413 (and other ids) for other streets or /details/3432
for details about the abbey or other points of interests - imagine opening
hours of a bar, service times for a church or a website link.
Currently I know two variants how to achieve that:
1) Use a template that models all possibilities on how to assemble that
kind of text, e.g. as a big loop with many ifs assembling atomic parts
(like links, static texts and so on) together, and create a corresponding
object collection in java.
2) Create a component without template and render directly - with the big
drawback that I have not yet any idea how to inject tapestry components
like ActionLink or PageLink to that.
Any hints or example pages are welcome.
regards
Peter
------------------------------**------------------------------**---------
To unsubscribe, e-mail:
users-unsubscribe@tapestry.**apache.org<users-unsubscr...@tapestry.apache.org>
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org