Zamek <[EMAIL PROTECTED]> writes: >#createForm ("forumTopic" "post" $link.setAction("Topic") >$link.addPathInfo("catid", $catid).setPage("forum,TopicList.vm"))
Don't do this. Velocity does lexical replacement similar to the C preprocessor. Velocity is not a programming language and macros are no methods. Please try #set ($_action = $link.setAction("Topic")) #set ($_uri = $link.addPathInfo("catid", $catid).setPage("forum,TopicList.vm")) #createForm ("forumTopic" "post" $_action $_uri) This should work. If not, please report the value of $_action and $_uri right before the macro call: #set ($_action = $link.setAction("Topic")) #set ($_uri = $link.addPathInfo("catid", $catid).setPage("forum,TopicList.vm")) <pre> $_action $_uri</pre> #createForm ("forumTopic" "post" $_action $_uri) Regards Henning >createForm is a macro: >#macro (createForm $name $method $action $next) > <form name="$name" method="$method" Accept-Charset="ISO-8859-2" > #if ($action) action="$action" #end > > #if ($next) > <input type="hidden" name="nextScreen" value="$next"> > #else > <input type="hidden" name="nextScreen" >value="$data.Parameters.nextScreen"> > #end > #set ($requiredCounter = 0) >#end >and here is the result: ><form name="forumTopic" method="post" Accept-Charset="ISO-8859-2" >action="http://localhost:8080/portal/servlet/portal/action/Topic/action/Topic" >> > >and here is the nextScreen: ><input type="hidden" name="nextScreen" >value="http://localhost:8080/portal/servlet/portal/catid/1/template/forum%2CTopicList.vm/catid/1/template/forum%2CTopicList.vm"> >> -----Original Message----- >> There is a problem in my Velocity pages. Forexample: >> >> $link.setPage("forum,TopicList.vm").addPathInfo("catid", $catid) result >> is: >> >> http://localhost:8080/portal/servlet/portal/template/forum%2CTopicList.v >> m/catid/1/template/forum%2CTopicList.vm/catid/1 >> _________________________________|_____________1st________________|_____ >> ________2nd________________ >> why does it duplicate parameters? >-- >thx, >---------------------------------------------------- >Zoltan Zidarics programmer >PTE University Pecs, Hungary >icq: 43288694 >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] -- Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH [EMAIL PROTECTED] +49 9131 50 654 0 http://www.intermeta.de/ Java, perl, Solaris, Linux, xSP Consulting, Web Services freelance consultant -- Jakarta Turbine Development -- hero for hire "You are being far too rational for this discussion." --- Scott Robert Ladd in <[EMAIL PROTECTED]> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]