UI Param drop-down support

23 views
Skip to first unread message

Ajay Babu

unread,
Aug 18, 2025, 6:20:11 PMAug 18
to Nussknacker
Hi Team,

I am developing a custom sink where I want to keep a drop-down param to select, is possible to keep a param in drop-down, please share the references scala, config basis.

using nussknacker 1.18.

Thanks,
Ajay  Babu Maguluri.

Arkadiusz Burdach

unread,
Aug 21, 2025, 2:18:11 AMAug 21
to Ajay Babu, Nussknacker
Hi Ajay.

I'm glad to hear that you are exploring our components API.

By drop-down parameter, do you mean a parameter that is available for example in Aggregate tumbling component?


To expose such parameter, you can either add an @Editor annotation to your parameter e.g.:
@Editor(
  `type` = EditorType.FIXED_VALUES_EDITOR,
  possibleValues = Array(
    new LabeledExpression(label = "First", expression = "#AGG.first"),
    new LabeledExpression(label = "Last", expression = "#AGG.last"),
...
  )
)
or use java enum class as a type of the parameter. You can see such usage e.g. in TumblingAggregateTransformer. It is a CustomStreamTransformer but for a SinkFactory it will work the same way.

Let me know if it helped you.

Arek
--
You received this message because you are subscribed to the Google Groups "Nussknacker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nussknacker...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/nussknacker/43fda945-bf52-411b-be19-98265cde4345n%40googlegroups.com.

Message has been deleted

Ajay Babu

unread,
Aug 25, 2025, 2:25:00 AMAug 25
to Nussknacker
Hi Arek,

Thanks for useful reply, anyway I tried in 

 @ParamName("Database Type")
    @SimpleEditor(
        `type` = SimpleEditorType.FIXED_VALUES_EDITOR,
        possibleValues = Array(
          new LabeledExpression(expression = "'mysql'", label = "MySQL"),
          new LabeledExpression(expression = "'postgresql'", label = "PostgreSQL"),
          new LabeledExpression(expression = "'oracle'", label = "Oracle"),
          new LabeledExpression(expression = "'sqlserver'", label = "SQL Server"),
          new LabeledExpression(expression = "'h2'", label = "H2")
        )
    )
    databaseType: String,

It works for me.

1.Can you please share the annotations for the following:
1.Not null/empty validation
2.Validator to allow alphabets, numbers, etc.
3.Password field masking
4.Hint text / tooltip / placeholder
5.Checkbox

2.It would be more helpful if you could share the documentation where I can find the list of supported annotations and application.conf file.
3.I have seen more sources/sinks in the demo setup. Is that because it's an enterprise setup, or can we import them from the Hub in Open-source version?

Thanks,
Ajay Babu Maguluri.

Ajay Babu

unread,
Aug 25, 2025, 3:35:03 PMAug 25
to Arkadiusz Burdach, nussk...@googlegroups.com
Hi Arkadiusz,

Thanks for the valuable explanation.

I created a custom sink component and configured it in application-customizations.conf, but the UI properties enabled in the config are not reflecting in the UI. The same works fine when using annotations. I need a configuration-based approach since it allows updating the properties without code changes.  

Iam attaching the files for your reference.

 It would be more helpful if you  share any .conf file that contains all the UI tags used, since the document looks not updated/latest.

Thanks & Regards
Ajay Babu Maguluri.


On Mon, Aug 25, 2025 at 11:54 AM Arkadiusz Burdach <a...@touk.pl> wrote:
1.1. By default, parameters are mandatory, to make them optional you can use java @Nullable annotation or change the type of parameter to Option[...].
2.2. Via annotations mechanism, currently you can specify only a few validators: @Min, @Max, @NotBlank. There is also RegExpParameterValidator but I see that it is not available via annotations mechanism, only via more advanced, DynamicComponent API. (Contibution is very welcome! :) )
2.3 Unfortunately it is not available yet
2.4
Hint text: I see that it is not exposed via annotations mechanism as well, only via more advanced, DynamicComponent API
Tooltip: We support only hint text - a small (i) icon next to the parameter
Placeholder: Currently, they are hardcoded on the FE side, the only thing that you can specify is the @DefaultValue
2.5. Checkbox is not available. Proposed work around for that is fixed values list with two fixed values

2. The developer documentation is here: https://nussknacker.io/documentation/docs/developers_guide/Components/ but it is outdated and not complete. Again, contribution is very welcome
3. The demo setup is based on the cloud version. In the cloud you have the admin panel when you can mange integrations. Some of these integrations are available open-source (https://nussknacker.io/documentation/docs/integration/) but require some changes in the configuration. The other integrations are enterprise only (e.g. MLFlow integration, LLM integrations




On 22.08.2025 17:21, Ajay Babu wrote:
Hi Arek,

Thanks for useful reply, anyway
 @ParamName("Database Type")
    @SimpleEditor(
        `type` = SimpleEditorType.FIXED_VALUES_EDITOR,
        possibleValues = Array(
          new LabeledExpression(expression = "'mysql'", label = "MySQL"),
          new LabeledExpression(expression = "'postgresql'", label = "PostgreSQL"),
          new LabeledExpression(expression = "'oracle'", label = "Oracle"),
          new LabeledExpression(expression = "'sqlserver'", label = "SQL Server"),
          new LabeledExpression(expression = "'h2'", label = "H2")
        )
    )
    databaseType: String,

works for Me.

1.Can you please share the annotations for the following:
1.Not null/empty validation
2.Validator to allow alphabets, numbers, etc.
3.Password field masking
4.Hint text / tooltip / placeholder
5.Checkbox

2.It would be more helpful if you could share the documentation where I can find the list of supported annotations and application.conf file.
3.I have seen more sources/sinks in the demo setup. Is that because it's an enterprise setup, or can we import them from the Hub in Open-source version?

Thanks,
Ajay Babu Maguluri.
On Thursday, August 21, 2025 at 11:48:11 AM UTC+5:30 a...@touk.pl wrote:


Virus-free.www.avg.com
DatabaseSinkFactory.scala
DatabaseSinkComponentProvider.scala
application-customizations.conf
Reply all
Reply to author
Forward
0 new messages