Forum Discussion

dannyparadis's avatar
dannyparadis
Occasional Contributor
13 years ago

Propety Layout for custom component

Hi!
I try to made display a numeric property on my layout with a textfied, but because my property is numeric the default layout display is a potentiometer.


createProperty('host', String, '127.0.0.1')
createProperty('port', Integer, 8649)
...
layout() {
property( property:host, label:'Host')
property( property:port, label:'Port')
}


I try to read on the MIG layout site, but that don't help me.

Ok I found a workaround by changing the type of the port property by String, but I would like to know if I have other way, like using widget.
Where I could find the a widget list and propeties?
Do you use a tool to generate your layout?

I try to read the groovy code for the soapui mockService, but it is not available on the folder script-components. Where I could found this build in component?
By the way, do you have more examples or doc for layout?

;-) A lot of questions!

2 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    Currently the only way to achieve this is to set the Property type to String, and then programatically parse the String as an Integer (this is how it's done in the MockService Component). The soapUI Runner Component as well as the MockService Component are written in Java (not using the Groovy component DSL), the code for these is available from our SVN (requires an SVN client), at:
     svn://svn.eviware.com/soapui/trunk/loadui-soapui-plugin/src/main/java/com/eviware/loadui/components/soapui/MockServiceComponent.java


    Hope this helps!

    Regards,
    Dain
    eviware.com
  • dannyparadis's avatar
    dannyparadis
    Occasional Contributor
    Thanks! This java code will help me!

    And, where I could find the a widget list to use in layout?
    Do you use a tool to generate your layout?

    bye
    Danny