URLs with & ? and other special characters

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

URLs with & ? and other special characters

SkipDever
I am implementing a new system where some of the key fields like productId,
partyId, etc have special characters in them.  When constructing a URL, for
instance EditInventoryItem?productId= and the productId contains one of
these special characters, I expected OfbizUrl to fix it form me.

for instance, findParty?partyId=ANDER&COTCH should be transformed to
findParty?partyId=ANDER%26COTCH

Is there ofbiz code to handle this?

Thanks in advance
Skip

Reply | Threaded
Open this post in threaded view
|

Re: URLs with & ? and other special characters

Rishi Solanki
Hi,
Use following utility methods for formation of Urls before pass it to
OfbizUrl.

UtilFormatOut.encodeQueryValue(String)
UtilFormatOut.decodeQueryValue(String)



Rishi Solanki
Manager, Enterprise Software Development
HotWax Media Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxmedia.com


On Sat, Dec 31, 2011 at 8:21 AM, Skip <[hidden email]> wrote:

> I am implementing a new system where some of the key fields like productId,
> partyId, etc have special characters in them.  When constructing a URL, for
> instance EditInventoryItem?productId= and the productId contains one of
> these special characters, I expected OfbizUrl to fix it form me.
>
> for instance, findParty?partyId=ANDER&COTCH should be transformed to
> findParty?partyId=ANDER%26COTCH
>
> Is there ofbiz code to handle this?
>
> Thanks in advance
> Skip
>
>
Reply | Threaded
Open this post in threaded view
|

RE: URLs with & ? and other special characters

SkipDever
Thanks, didn't know these were there.  Actually ended up writing my own.

-----Original Message-----
From: Rishi Solanki [mailto:[hidden email]]
Sent: Friday, January 20, 2012 1:19 AM
To: [hidden email]
Subject: Re: URLs with & ? and other special characters


Hi,
Use following utility methods for formation of Urls before pass it to
OfbizUrl.

UtilFormatOut.encodeQueryValue(String)
UtilFormatOut.decodeQueryValue(String)



Rishi Solanki
Manager, Enterprise Software Development
HotWax Media Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxmedia.com


On Sat, Dec 31, 2011 at 8:21 AM, Skip <[hidden email]> wrote:

> I am implementing a new system where some of the key fields like
productId,
> partyId, etc have special characters in them.  When constructing a URL,
for

> instance EditInventoryItem?productId= and the productId contains one of
> these special characters, I expected OfbizUrl to fix it form me.
>
> for instance, findParty?partyId=ANDER&COTCH should be transformed to
> findParty?partyId=ANDER%26COTCH
>
> Is there ofbiz code to handle this?
>
> Thanks in advance
> Skip
>
>