- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Set Medium using FormData?
FirstSpirit API version: 4.2.454
Old style:
Dataset dataSet = csVideo.getDataset(entityVideo);
Data data = dataSet.getData();
FileEditorValue editorFile = (FileEditorValue) data.get("cs_file").getEditor();
editorFile.get(language).setMedium(mediaVideo);
Since getData is deprecated, there probably is a way to do that using:
Dataset dataSet = csVideo.getDataset(entityVideo);
FormData videoFormData = videoDataSet.getFormData();
fileFormField.set(mediaVideo); !! does not work
The question is how do I do that?
- Labels:
-
Developers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, a Media is no BinaryMedium ... it works analogue to using the editorvalue in your first post:
FormField<?> fileFormField = videoFormData.get(language,"cs_file");
BinaryMedium container = (BinaryMedium) fileFormField.get();
container.setMedium(mediaVideo);
fileFormField.set(container);
...
Stefan.


- ยซ Previous
-
- 1
- 2
- Next ยป
- ยซ Previous
-
- 1
- 2
- Next ยป