Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown-Menüs dynamisch erzeugen und vorbelegen #175

Closed
dragonfly28 opened this issue Feb 7, 2018 · 3 comments
Closed

Dropdown-Menüs dynamisch erzeugen und vorbelegen #175

dragonfly28 opened this issue Feb 7, 2018 · 3 comments

Comments

@dragonfly28
Copy link
Contributor

Die Werte in den Dropdown-Menüs der Forms (z.B. Animals-Art, Animals-Geschlecht) müssen dynamisch erstellt werden und bei Read/Update-Forms auch dynamisch vorbelegt werden.
Die im Modell als customListType definierten Werte sollen hier zur Auswahl stehen.

1.) Vielleicht kann hier das ALPS-Format von Spring Data Rest weiter helfen, siehe
https://docs.spring.io/spring-data/rest/docs/current/reference/html/#metadata.alps ???

In der Antwort auf http://localhost:39146/profile/animals würden sich auf jeden Fall die notwendigen Informationen finden:

{
    "alps": {
        "version": "1.0",
        "descriptors": [
            {
                ...
                        "name": "species",
                        "doc": {
                            "value": "Elephant, Giraffe, Penguin, Barrakuda",
                            "format": "TEXT"
                        },
                        "type": "SEMANTIC"
                    },
          ...
}

2.) Und dann stellt sich auch noch die Frage der Interantionalisierung solcher Dropdowns, die aus dem Backend generiert werden. Internationalisierung im Backend notwendig???

@dragonfly28
Copy link
Contributor Author

dragonfly28 commented Feb 7, 2018

Eine andere Möglichkeit wäre, für alle Enum-Properties eine entsprechende API im Backend zur Verfügung szu stellen, z.B.:

http://localhost:39146/animals/species
http://localhost:39146/animals/gender

welche dann im HAL-Format die Enum-Werte zurückliefert.

@rowe42 rowe42 added this to the RefArch_1.0 milestone Feb 9, 2018
@rowe42 rowe42 self-assigned this Feb 9, 2018
@rowe42
Copy link
Owner

rowe42 commented Feb 14, 2018

Habe es implementiert so wie @dragonfly28 es vorschlagt (aus /profile auslesen). Musste allerdings noch etwas im Backend ergänzen, denn die Optionen für species erscheinen zwar standardmäßig unter /profile/animals, aber nicht für skill unter /profile/keeper. Der Unterschied ist, dass beim Skill ein Multi-Value-Feld verwendet wird, und da scheint Spring die Optionen nicht unter /profile aufzulisten.

Man kann das aber ergänzen und das habe ich in Branch _#175 in admin-service auch gemacht (Pull Request ist gestellt).

An sonsten vgl. Kommentar unter Issue #188.

ejcsid added a commit that referenced this issue Feb 14, 2018
@rowe42
Copy link
Owner

rowe42 commented Feb 16, 2018

Ist nun so wie beschrieben in den Master gewandert (auch im admin_service). Schließe das Issue.

@rowe42 rowe42 closed this as completed Feb 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants