OfBiz Minilang How to check the length of a parameter

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

OfBiz Minilang How to check the length of a parameter

Daniel Abrecht
How can i check the length of a parameter with the
<if>
<condition></condition>
</if>

I have a string parameter which should not be longer than 80 characters -> if it is, i'd like to show a error

thanks for helping me

daniel
Reply | Threaded
Open this post in threaded view
|

Re: OfBiz Minilang How to check the length of a parameter

cjhowe
Try...

<if>
  <condition>
    <if-compare operator="less" field-name="${bsh:myField.length()}"
value="80"></if-compare>
  </condition>
  <then>

  </then>
</if>


--- Daniel Abrecht <[hidden email]> wrote:

>
> How can i check the length of a parameter with the
> <if>
> <condition></condition>
> </if>
>
> I have a string parameter which should not be longer than 80
> characters ->
> if it is, i'd like to show a error
>
> thanks for helping me
>
> daniel
> --
> View this message in context:
>
http://www.nabble.com/OfBiz-Minilang-How-to-check-the-length-of-a-parameter-tf3273185.html#a9101256
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>