As a personal observation, parameterized methods calls in a View Definition are not what I consider good practice. It makes it look like you are trying to force JSF instead of work with it, and people often misuse such constructs to break the MVC Separations of Concerns. But that's not what's causing your problem.
You should be able to avoid having the JSF renderer reformat your tag by enclosing it within the "f:verbatim" JSF tag. Technically, any time you embed non-JSF content (and that includes raw HTML), it should be wrapped in a verbatim tag, although in current versions of JSF it isn't as essential as it used to be.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Apr 20, 2012
Thanks for the warm welcome )
I managed to get the right output now:
I tried the "f:verbatim" JSF tag before, but JSF expressions inside this tag don't get processed.
With respects to method expressions - I can't see any difference to field expressions. I bought Core JavaServer Faces (Prentice Hall) and the author names method expressions as a valid means to get values right next to field expressions. However it appears the method expression parameters aren't part of JSF but pert of JSR 245 (jsp). Anyway as long as it works...
Joined: Apr 20, 2012
That board is a bit too clever to display the code correctly, see attached image
One of the reasons why "bean.getURI()" is a bad construct is that it's a strictly read-only access of the property. If you code it on a "value=" attribute for a read/write control such as the inputText control, it won't be able to update the backing bean because it's a call and not a reference.
Another reason I don't recommend that sort of thing is that it reduces the abstraction between View and Model. You are explicitly telling the View how to access something rather than letting the Controller worry about it. That couples implementation details between Model and Controller unnecessarily.
A reason for me is that I'm lazy. I'd rather type "bean.URI". 3 letters fewer plus bonus points for not having to press the shift key and type "()"!
I also tend to be wary about parameters in EL. It's often a sign that the Model and Controller are overlapping in responsibilities, and the whole point of MVC is that it makes design and maintenance simpler, faster, and cheaper because responsibilities are strictly defined and not tightly coupled.
Now that you mention it, EL does have issues in verbatim code. I shudder when outputText is used to generate HTML, but offhand, it's the best of a set of bad solutions.
BTW, JSF 2.2 is working on HTML5 support. Which is another reason for keeping your present code clean and simple. That way it will be less work and less frustration to upgrade it.