File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Xtags tag in html:link problem ... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Xtags tag in html:link problem ..." Watch "Xtags tag in html:link problem ..." New topic
Author

Xtags tag in html:link problem ...

Daniel Platon
Ranch Hand

Joined: Oct 10, 2005
Posts: 42
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

Joined: Apr 14, 2005
Posts: 354
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.


-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
Daniel Platon
Ranch Hand

Joined: Oct 10, 2005
Posts: 42
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

Joined: Apr 14, 2005
Posts: 354
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}" .../>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Xtags tag in html:link problem ...