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-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to