Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to do URLEncoding with HtmlOutputLink

 
mamidi subrahmanyam
Greenhorn
Posts: 19
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
In my code I have created a HtmlOutputLink and set the valuebinding as But the url value some times contains characters '#' there by breaking the actual url.
Can anyone please suggest how to do URLEncoding here?

I am getting this values from a DataTable as something like this.
So the evaluated value #{rowVar[0]} should be URLEncoded.

Thanks,
Mamidi
 
Tim Holloway
Saloon Keeper
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an app that encountered the same issue. However, since I didn't need to go mucking around in the view tree, I just used basic value bindings:

[code]
<hutputLink value="Search" action="#{searchBean.searchURL}"/>
[code]

And did the URLEncode method call in the getSearchURL method.

I may not have the tag syntax entirely correct. My working code is offline at the moment, so I'm using my memory, and that's always dangerous.
 
mamidi subrahmanyam
Greenhorn
Posts: 19
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you all for your prompt sugessions. It gave some idea to solve this issue.
But I would like to provide a link where I found exact answer for this question.
and more important is ... It worked!!
Thanks again!!
Here is the link
encoding HtmlOutputLink
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic