Projects tigase _server server-core Issues #1161
Improve CompRepo ad-hocs and DataForm handling (#1161)
Open
wojciech.kapcia@tigase.net opened 4 years ago
  • allow specifying that fields are required
  • when processing CompRepo item, instead of using "marker-command", check if all required fields are set (minimum set)
wojciech.kapcia@tigase.net commented 4 years ago

Instead of extending tigase.server.DataForm with handling of required we should switch to tigase.form.Form implementation from tigase-utils - what do you think @andrzej.wojcik ?

Andrzej Wójcik (Tigase) commented 4 years ago

DataForm (at least in 8.2.0 and most likely in 8.1.0) has a builder which makes it easy to create forms. I do not like Form as it forces creation of temporary objects (fields) just to parse and get access to the data.

wojciech.kapcia@tigase.net commented 4 years ago

I agree that DataForm could be a little bit more efficient (especially in server, where almost everything is Element based, but IMHO Form API feels a bit more cleaner.

My biggest gripe seems to be with Command.addField*() and DataForm.addField*() methods and having single .addField() methods taking single Field as parameter would clean it up a bit. Builder doesn't help here much IMHO.

It would also be nice to somehow have only single Form/Field API so moving DataForm to tigase-utils (and maybe merging?) could be sensible.

wojciech.kapcia@tigase.net batch edited 4 months ago
Name Previous Value Current Value
Iterations
empty
Candidate for next minor release
issue 1 of 1
Type
Task
Priority
Minor
Assignee
Version
Candidate for next minor release
Spent time
30m
Issue Votes (0)
Watchers (2)
Reference
tigase/_server/server-core#1161
Please wait...
Page is in error, reload to recover