[Building Sakai] h:outputLink encoding problem
DAVID ROLDAN MARTINEZ
darolmar at upvnet.upv.es
Tue Mar 31 00:43:22 PDT 2009
Hi Yan-hong Lin,
I'm not sure if this is quite standard but we use it in production and works fine:
<h:outputText escape="false" value="<a target='new_window' href='" />
<h:outputText value="#{attach.location}" />
<h:outputText escape="false" value="'>#{attach.filename}</a>" />
Replace attach.location by the URL you want to link and attach.filename by the link text.
Hope this helps.
David
________________________________________
De: sakai-dev-bounces at collab.sakaiproject.org [sakai-dev-bounces at collab.sakaiproject.org] En nombre de Yan-hong Lin [lyhcode at gmail.com]
Enviado el: martes, 31 de marzo de 2009 9:13
Para: sakai-dev at collab.sakaiproject.org
Asunto: [Building Sakai] h:outputLink encoding problem
Hello,
I found many Sakai tools using JSF tag "h:outputLink" to display <a> hyperlinks.
But if URL contains non-ascii characters, the output is incorrect.
e.g. Have a uploaded file in Syllabus attachments named "檔案名稱.doc".
The output is a bad link, browser display file not found error.
I try to fix code in each Sakai tool programs, but there are too many.
Is there a quick way to solve this problem?
Link replace some setting or patch JSF source.
Thanks a lot.
Yan-hong Lin
More information about the sakai-dev
mailing list