You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Matthias Klein <ma...@cmklein.de> on 2006/05/22 20:33:00 UTC
[newbie] embedding HTML links
I need to somehow embed a link such as <a href="...">ggg</a> in a JSF page.
I tried outputText with and without verbatim and I tried the tomahawk html
tag component. Nothing works.
How does one do such thing?
Btw. the link itself is contructed in a backing bean as string so I can't
hard-code the link in the page.
thanks
Re: [newbie] embedding HTML links
Posted by Matthias Wessendorf <ma...@apache.org>.
Matthias-
keep in mind that using <outputLink> to refer to other JSF will cause
a non-postback request.
This means only Phase 1 und Phase 6 of FacesLifecycle are executed.
-Matthias
On 5/22/06, Matthias Klein <ma...@cmklein.de> wrote:
> Thanks. That did it
>
>
> Am Mo, 22.05.2006, 21:08, schrieb Jeff Bischoff:
> > <h:outputLink> ?
> >
> >
> > Matthias Klein wrote:
> >
> >> I need to somehow embed a link such as <a href="...">ggg</a> in a JSF
> >> page. I tried outputText with and without verbatim and I tried the
> >> tomahawk html tag component. Nothing works. How does one do such thing?
> >>
> >>
> >> Btw. the link itself is contructed in a backing bean as string so I
> >> can't hard-code the link in the page.
> >>
> >> thanks
> >>
> >>
> >>
> >>
> >
> >
> >
>
>
>
--
Matthias Wessendorf
Aechterhoek 18
48282 Emsdetten
http://jroller.com/page/mwessendorf
mwessendorf-at-gmail-dot-com
Re: [newbie] embedding HTML links
Posted by Matthias Klein <ma...@cmklein.de>.
Thanks. That did it
Am Mo, 22.05.2006, 21:08, schrieb Jeff Bischoff:
> <h:outputLink> ?
>
>
> Matthias Klein wrote:
>
>> I need to somehow embed a link such as <a href="...">ggg</a> in a JSF
>> page. I tried outputText with and without verbatim and I tried the
>> tomahawk html tag component. Nothing works. How does one do such thing?
>>
>>
>> Btw. the link itself is contructed in a backing bean as string so I
>> can't hard-code the link in the page.
>>
>> thanks
>>
>>
>>
>>
>
>
>
Re: [newbie] embedding HTML links
Posted by Jeff Bischoff <jb...@klkurz.com>.
<h:outputLink> ?
Matthias Klein wrote:
> I need to somehow embed a link such as <a href="...">ggg</a> in a JSF page.
> I tried outputText with and without verbatim and I tried the tomahawk html
> tag component. Nothing works.
> How does one do such thing?
>
> Btw. the link itself is contructed in a backing bean as string so I can't
> hard-code the link in the page.
>
> thanks
>
>
>
>
Re: [newbie] embedding HTML links
Posted by Joey Geiger <jo...@staff.onmilwaukee.com>.
<h:outputText value="" escape="false" />
Matthias Klein wrote:
> I should have added some more info:
>
> The code that creates the string with the link looks like:
> this.link = "<a href=\"";
> this.location += "/" + filename + "\" target=\"_blank\">" + param + "</a>";
>
> It is embedded in the JSP page with
>
> <h:outputText value="#{ContentBackingBean.link}" />
>
> (I tried with verbatim, doesn't change a thing)
>
> When I then call that page I get
>
> <a href="c:/JavaCode/files/10.html"
> target="_blank">10.html</a>
>
> So the JSF renderer seems to insist to always translate the special
> characters of HTML (like < into < and so on)
>
> How do I switch that off?
>
> Or is there a better way to embed links like that into JSF pages?
>
>
>
> Am Mo, 22.05.2006, 20:33, schrieb Matthias Klein:
>
>> I need to somehow embed a link such as <a href="...">ggg</a> in a JSF
>> page. I tried outputText with and without verbatim and I tried the
>> tomahawk html tag component. Nothing works. How does one do such thing?
>>
>>
>> Btw. the link itself is contructed in a backing bean as string so I can't
>> hard-code the link in the page.
>>
>> thanks
>>
>>
>>
>>
>
>
>
>
>
Re: [newbie] embedding HTML links
Posted by Matthias Klein <ma...@cmklein.de>.
I should have added some more info:
The code that creates the string with the link looks like:
this.link = "<a href=\"";
this.location += "/" + filename + "\" target=\"_blank\">" + param + "</a>";
It is embedded in the JSP page with
<h:outputText value="#{ContentBackingBean.link}" />
(I tried with verbatim, doesn't change a thing)
When I then call that page I get
<a href="c:/JavaCode/files/10.html"
target="_blank">10.html</a>
So the JSF renderer seems to insist to always translate the special
characters of HTML (like < into < and so on)
How do I switch that off?
Or is there a better way to embed links like that into JSF pages?
Am Mo, 22.05.2006, 20:33, schrieb Matthias Klein:
> I need to somehow embed a link such as <a href="...">ggg</a> in a JSF
> page. I tried outputText with and without verbatim and I tried the
> tomahawk html tag component. Nothing works. How does one do such thing?
>
>
> Btw. the link itself is contructed in a backing bean as string so I can't
> hard-code the link in the page.
>
> thanks
>
>
>