You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Adrian Crum <ad...@hlmksw.com> on 2009/06/11 17:01:26 UTC
Re: svn commit: r783603 - in /ofbiz/trunk: applications/party/script/org/ofbiz/party/contact/
applications/party/servicedef/ applications/party/widget/partymgr/ framework/base/src/org/ofbiz/base/util/
Hans,
This method isn't necessary. There is a UEL function that does the same
thing:
http://api.ofbiz.org/org/ofbiz/base/util/string/UelFunctions.html
See str:replcate()
-Adrian
hansbak@apache.org wrote:
> Author: hansbak
> Date: Thu Jun 11 02:14:32 2009
> New Revision: 783603
>
> URL: http://svn.apache.org/viewvc?rev=783603&view=rev
> Log:
> make the party viewprofile request also working when only an emailaddress or telephone number is provided. usefull when this url is called from other webbased systems.
> Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilParse.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilParse.java?rev=783603&r1=783602&r2=783603&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilParse.java (original)
> +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilParse.java Thu Jun 11 02:14:32 2009
> @@ -35,4 +35,17 @@
> }
> return new BigDecimal(bigDecimalString);
> }
> +
> + /**
> + *
> + * to be used in minilanguage to remove all occurrencies of removeString from inputString
> + *
> + * @param inputString
> + * @param removeString
> + * @return
> + */
> + public static String removeStringFromString(String inputString, String removeString) {
> + return(inputString.replaceAll(removeString, ""));
> + }
> +
> }
>
>
>
Re: svn commit: r783603 - in /ofbiz/trunk:
applications/party/script/org/ofbiz/party/contact/
applications/party/servicedef/ applications/party/widget/partymgr/
framework/base/src/org/ofbiz/base/util/
Posted by Hans Bakker <ma...@antwebsystems.com>.
good point Adrian, revised in revision 784399.
Regards,
Hans
On Thu, 2009-06-11 at 08:07 -0700, Adrian Crum wrote:
> Oops, keyboard malfunction. See str:replace().
>
> -Adrian
>
> Adrian Crum wrote:
> > Hans,
> >
> > This method isn't necessary. There is a UEL function that does the same
> > thing:
> >
> > http://api.ofbiz.org/org/ofbiz/base/util/string/UelFunctions.html
> >
> > See str:replcate()
> >
> > -Adrian
> >
> >
> > hansbak@apache.org wrote:
> >> Author: hansbak
> >> Date: Thu Jun 11 02:14:32 2009
> >> New Revision: 783603
> >>
> >> URL: http://svn.apache.org/viewvc?rev=783603&view=rev
> >> Log:
> >> make the party viewprofile request also working when only an
> >> emailaddress or telephone number is provided. usefull when this url is
> >> called from other webbased systems.
> >> Modified:
> >> ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilParse.java
> >> URL:
> >> http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilParse.java?rev=783603&r1=783602&r2=783603&view=diff
> >>
> >> ==============================================================================
> >>
> >> --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilParse.java
> >> (original)
> >> +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilParse.java
> >> Thu Jun 11 02:14:32 2009
> >> @@ -35,4 +35,17 @@
> >> }
> >> return new BigDecimal(bigDecimalString);
> >> }
> >> +
> >> + /**
> >> + * + * to be used in minilanguage to remove all occurrencies
> >> of removeString from inputString
> >> + * + * @param inputString
> >> + * @param removeString
> >> + * @return
> >> + */
> >> + public static String removeStringFromString(String inputString,
> >> String removeString) {
> >> + return(inputString.replaceAll(removeString, ""));
> >> + }
> >> +
> >> }
> >>
> >>
> >>
> >
--
Antwebsystems.com: Quality OFBiz services for competitive rates
Re: svn commit: r783603 - in /ofbiz/trunk: applications/party/script/org/ofbiz/party/contact/
applications/party/servicedef/ applications/party/widget/partymgr/ framework/base/src/org/ofbiz/base/util/
Posted by Adrian Crum <ad...@hlmksw.com>.
Oops, keyboard malfunction. See str:replace().
-Adrian
Adrian Crum wrote:
> Hans,
>
> This method isn't necessary. There is a UEL function that does the same
> thing:
>
> http://api.ofbiz.org/org/ofbiz/base/util/string/UelFunctions.html
>
> See str:replcate()
>
> -Adrian
>
>
> hansbak@apache.org wrote:
>> Author: hansbak
>> Date: Thu Jun 11 02:14:32 2009
>> New Revision: 783603
>>
>> URL: http://svn.apache.org/viewvc?rev=783603&view=rev
>> Log:
>> make the party viewprofile request also working when only an
>> emailaddress or telephone number is provided. usefull when this url is
>> called from other webbased systems.
>> Modified:
>> ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilParse.java
>> URL:
>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilParse.java?rev=783603&r1=783602&r2=783603&view=diff
>>
>> ==============================================================================
>>
>> --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilParse.java
>> (original)
>> +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilParse.java
>> Thu Jun 11 02:14:32 2009
>> @@ -35,4 +35,17 @@
>> }
>> return new BigDecimal(bigDecimalString);
>> }
>> +
>> + /**
>> + * + * to be used in minilanguage to remove all occurrencies
>> of removeString from inputString
>> + * + * @param inputString
>> + * @param removeString
>> + * @return
>> + */
>> + public static String removeStringFromString(String inputString,
>> String removeString) {
>> + return(inputString.replaceAll(removeString, ""));
>> + }
>> +
>> }
>>
>>
>>
>
Re: svn commit: r783603 - in /ofbiz/trunk: applications/party/script/org/ofbiz/party/contact/
applications/party/servicedef/ applications/party/widget/partymgr/ framework/base/src/org/ofbiz/base/util/
Posted by Adam Heath <do...@brainfood.com>.
Adrian Crum wrote:
> Hans,
>> ==============================================================================
>>
>> --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilParse.java
>> (original)
>> +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilParse.java
>> Thu Jun 11 02:14:32 2009
>> @@ -35,4 +35,17 @@
>> }
>> return new BigDecimal(bigDecimalString);
>> }
>> +
>> + /**
>> + * + * to be used in minilanguage to remove all occurrencies
>> of removeString from inputString
>> + * + * @param inputString
>> + * @param removeString
>> + * @return
>> + */
>> + public static String removeStringFromString(String inputString,
>> String removeString) {
>> + return(inputString.replaceAll(removeString, ""));
>> + }
>> +
Please follow ofbiz code formatting guidelines. Remove the () around
the expression(not needed), and put a space after return.