Obviously in the example below, since we are talking about extension mapping here, the "controllerPath" variable is set to the empty string.

Just wanted to avoid any confusion.

Erik



Erik Weber wrote:

Craig, this is exactly what I was looking for, except, I need html:rewrite instead of html:link, because many hyperlinks are unfortunately embedded in JavaScript functions. Any suggestions?

I can't quite figure out html:rewrite. The docs (1.1) seem to explain that it works exactly like html:link, leading me to believe that the "action" parameter is acceptable. This is from the html:rewrite section of struts-html.html, in the entry for the "href" attribute:

"You must specify exactly one of the action attribute, the forward attribute, the href attribute, or the page attribute."

But when I try to use the "action" attribute, I get this error:

Attribute action invalid for tag rewrite according to TLD


I also notice that the rewrite section of that doc, despite that quote above, has no entry for the "action" attribute as the html:link section does. I am using html-el if that makes a difference. Perhaps this is a bug, and the "action" parameter should be available to html:rewrite as well as html:link? I haven't dug into the tld yet . . .


This is my JavaScript syntax:

location='<html:rewrite action="${controllerPath}/actor/usecase"/>'

Again, this works with html:link.

Any thoughts on that?


Thanks, Erik




Craig McClanahan wrote:

On Fri, 23 Jul 2004 15:36:34 -0400, Erik Weber <[EMAIL PROTECTED]> wrote:


Ah, you're probably right, the path mappings might not need to change
very often, but on the other hand, I thought, if the html:form tag
appends the (.do) extension for you, it isn't far-fetched to think that
another tag would do the equivalent for hyperlinks.



According to the documentation,

<link ... action="/foo" ... />

should do what you want (i.e. hyperlink to action "/foo", no matter
which mapping you are using). Doesn't that work?



Erik


Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to