I've got to say again that turbine rocks. The pull
tool concept suddenly became clear to me late last
night (early this morning really) and I whipped one
up today - works like a treat.
Anyways...
I am building an application that will ultimately have
around 25 screens. Rather than rushing into it I
have spent the last week perfecting my first couple
of screens so that they are close to perfect before
I start making replicas to produce the remaining
screens. I have bunches of macros that make
the code for each page very succinct and yet
easy to customize or extend.
Unfortunatley I have run into a problem with
TemplateLinks (the problem is the way I am
trying to use them). I have pages that include a
bunch of links that to the same page, but with
different pathInfo and/or queryData. What I
would like to be able to do is:
#set ($detailPage = $link.setPage("content,SubjectForm.vm"))
#if ($data.parameters.get("topicid"))
#set ($detailPage = $detailPage.addPathInfo("topicid",$topic.TopicId))
#end
and then later...
<tr><td>
<table>
#foreach ($subject in $subjects)
<tr>
#entryCell ($!subject.SubjectShortName)
<td>
<a href="$detailPage.addQueryData("mode","modify")">Details</a>
</td>
</tr>
#end
</table>
</td></tr>
<tr><td>
<a href="$detailPage.addQueryData("mode","insert")">New Subject</a>
<td></tr>
The trouble is that only the first use of $detailPage
actually works (in the example above this is the one
produced for the first $subject in $subjects). The
others produce new TemplateLink objects with
only the last queryData value/data pair appended
thus:
http://localhost:8080/myapp/servlet/myapp?mode=insert
I was actually trying to avoid having to code the
same details in a number of places with a whole
bunch of #if statements used to determine when
extra queryData or pathInfo needs to be added.
Is there a way of doing what I want or do I need to
go put all of the #if statements back in my code?
Thanks,
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]