| Author |
Output html inside command link
|
Duran Harris
Ranch Hand
Joined: Nov 09, 2008
Posts: 571
|
|
Hi,
I am facing a small issue...
I have installed JBOSS 7.1 and can't get Richfaces to work inside the application....
I have a php website that I am converting, where the website's navigations is performed on a horizontal menu generated by html that looks like
Styles are then applied to this html structure.
My problem is that I want to have JSF action's invoked when a menu item link is clicked so I tried to produce the html above....Unfortunately it is not possible to nest a span inside of an <h:commandLink> ... I receive the error :
The value of attribute "value" associated with an element type "h:commandLink" must not contain the '<' character.
As I am not a designer, recoding the CSS is not an option.... so I am left with 2 choices :
1. Figure out how to get JSF to render a span inside of the commandLink
2. Find a JSF component that can render a horizontal menu that I can run in JBOSS 7.1 without any issues....
Suggestions...please?
|
===>SCJP 1.5(72%)<===
==>SCWCD1.5(76%)<===
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14456
|
|
Well, considering that the formal name of the product is "JBoss RichFaces", you certainly should be able to use RichFaces - and its menu tags - in your webapp.
Although, ironically, I had some words for one of the JBoss people not long ago about the advisability of mixing raw HTML and JSF together. I don't recommend it myself, since JSF is an abstract media-independent system and HTML is not. And JBoss 4 eliminated certain features of JBoss 3 that allowed be to avoid "brute-force" HTML, so Smeagol's not happy.
One question: Why do you consider a "span" element to be essential to your link? Typically spans are used to bracket content for the purpose of applying a style to them. As far as it goes, the h:outputText will do that - it generates a span and uses the style and styleClass attributes to set the span's style. However, the commandLink control obtains its value from its "value=" attribute, not body text. And the style(s) of that text will be taken from the commandLink's styleClass and style attributes.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
 |
|
|
subject: Output html inside command link
|
|
|