You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Skip <sk...@thedevers.org> on 2011/12/31 03:51:58 UTC

URLs with & ? and other special characters

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


RE: URLs with & ? and other special characters

Posted by Skip <sk...@thedevers.org>.
Thanks, didn't know these were there.  Actually ended up writing my own.

-----Original Message-----
From: Rishi Solanki [mailto:rishisolankii@gmail.com]
Sent: Friday, January 20, 2012 1:19 AM
To: user@ofbiz.apache.org
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 <sk...@thedevers.org> 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
>
>


Re: URLs with & ? and other special characters

Posted by Rishi Solanki <ri...@gmail.com>.
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 <sk...@thedevers.org> 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
>
>