Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Xtags tag in html:link problem ...

 
Daniel Platon
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all...

I don't know if this is the correct title for the topic , but here's the problem.
I have a dynamic menu in my app. The menu definition is read from a xml file using xtags library. I use <html:link action="..." > to navigate.
The code looks something like:

The error I get is
which means that the quotes in the "action" attribute mess up. Is there any way I can fix this ?!

Thanks a lot.
[ October 10, 2005: Message edited by: Daniel Platon ]
 
alan do
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
one set of tag must use double quote while the other must use single. try the single quotes for your xtags and place that inside html:link's action attribute.
 
Daniel Platon
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot. It compiles now but it still doesn't work. When I put it like this:

it says

meaning that he's not able to interpret the xtags tag.

When I put it like this
it displays funny and still isn't able to interpret the tag.

I have finally tried without the qoutes on the action tag but it raises a compilation errors.

Thanks a lot.
 
alan do
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tough one buddy. struts-html generally evaluates values passed into the tags as strings. some tag attributes accept scriptlets, but others you cannot. it's even worse in your case.

the only way i can think of that may let this work is to see if xtags can set a value to a variable and place the variable into the request or page scope and use html_el:link (that is the expression language library - http://struts.apache.org/faqs/struts-el.html) to access it. ex. <html_el:link action="${requestScope.xActionName}" .../>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic