aspose file tools*
The moose likes JSF and the fly likes How to do URLEncoding with HtmlOutputLink Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How to do URLEncoding with HtmlOutputLink" Watch "How to do URLEncoding with HtmlOutputLink" New topic
Author

How to do URLEncoding with HtmlOutputLink

mamidi subrahmanyam
Greenhorn

Joined: Jun 29, 2005
Posts: 18
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

Joined: Jun 25, 2001
Posts: 15632
    
  15

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
mamidi subrahmanyam
Greenhorn

Joined: Jun 29, 2005
Posts: 18
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to do URLEncoding with HtmlOutputLink
 
Similar Threads
Checking arrays
HtmlOutputLink and absolute references
Interview Questions Help
Calling a Hashtable from another class.
How to bind to an object inside HashMap.