It?
<set field="myField" type="String" value="${bsh:
org.ofbiz.StringUtil.replaceAll('this', 'that')}"/>
2007/8/10, Adrian Crum <[EMAIL PROTECTED]>:
>
> I could use a bsh script, but I was trying to avoid that. I would have to
> create a bsh script that
> is only one line long.
>
> I've tried hacks like:
>
> <actions>
> <set field="oldString" value="He went this way"/>
> <set field="replaceResult" value="bsh:newString =
> oldString.replaceAll('this',
> 'that')"/>
> </actions>
>
> I can't seem to get anything to do what I want. I end up with exceptions
> or empty strings.
>
>
> Rodrigo Souza wrote:
>
> > Oks! Your app is mini-lang or bsh?
> >
> > 2007/8/10, Adrian Crum <[EMAIL PROTECTED]>:
> >
> >>I think that code is intended for mini-lang, not screen widgets.
> >>
> >>Rodrigo Souza wrote:
> >>
> >>
> >>>One sugestion:
> >>>
> >>><call-class-method class-name="org.ofbiz.base.util.StringUtil"
> >>>method-name="replaceAll" // rewrite
> >>> ret-field-name="parameters.myFieldParameter">
> >>> <field field-name="meyField"/>
> >>> </call-class-method>
> >>>
> >>>In service definition.
> >>>
> >>>2007/8/10, Adrian Crum <[EMAIL PROTECTED]>:
> >>>
> >>>
> >>>>Does anyone know how I can do the equivalent of
> >>>>java.lang.String.replaceAll(...) in the screen
> >>>>widget? I need to remove some characters from a screen widget field
> and
> >>
> >>I
> >>
> >>>>don't know how.
> >>>>
> >>>>-Adrian
> >>>>
> >>>>
> >>>
> >>>
> >
>