Bug #29395
SelectViewHelper with multiple=true cannot work with Collections
Status: | Resolved | Start date: | 2011-08-31 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | - | |||
Target version: | TYPO3 Flow Base Distribution - 1.0.1 | |||
Has patch: | No | Affected Flow version: | FLOW3 1.0.0 |
Description
When using collections as preselected values for SelectView-Helper with option multiple="1" the preselection is only possible when you have a "public" identity field.
The preselection for lists does only work if "optionValueField"-Argument is set, which you cannot use with the internal flow3-identity.
First part of the solution is:
1/**
2 * Retrieves the selected value(s)
3 *
4 * @return mixed value string or an array of strings
5 * @author Bastian Waidelich <bastian@typo3.org>
6 */
7protected function getSelectedValue() {
8 $value = $this->getValue();
9 if (!$this->hasArgument('optionValueField') && ! is_array($value)) {
10 return $value;
11 }
(Important is the & ! is_array())
But than further the code runs in the next problem selecting by using $this->arguments['optionValueField'] to retrieve the value.
Related issues
Associated revisions
[BUGFIX] pre-selecting entities does not work with multiple flag set
The SelectViewHelper is not able to retrieve the selected uuid values for
a collection of objects
Change-Id: Ifc005c58287c4d1479bb42eb04455f38c37efc40
Resolves: #29395
Releases: 1.0, 1.1
[BUGFIX] pre-selecting entities does not work with multiple flag set
The SelectViewHelper is not able to retrieve the selected uuid values for
a collection of objects
Change-Id: Ib7da7fd0d0906ab4ba37c5e1b5c09ce0e2cf3dfa
Fixes: #29395
Releases: 1.0, 1.1
History
#1 Updated by Johannes K almost 4 years ago
- File patch29395.diff added
Had this issue, too.
Attached a patch (including testcase)
#2 Updated by Ferdinand Kuhl almost 4 years ago
Would you mind, if I push your patch to gerrit?
I do remember that there somewhere is a task to refactor all form-elements, so perhaps the core team already adresses this issue...
#3 Updated by Johannes K almost 4 years ago
I would be happy if you could push it to Gerrit.
I would do it myself, but I haven't signed the CLA yet.
Thanks, Johannes
#4 Updated by Mr. Hudson almost 4 years ago
Patch set 1 of change Ifc005c58287c4d1479bb42eb04455f38c37efc40 has been pushed to the review server.
It is available at http://review.typo3.org/5361
#5 Updated by Karsten Dambekalns almost 4 years ago
- Affected Flow version set to FLOW3 1.0.0
#6 Updated by Mr. Hudson over 3 years ago
Patch set 2 of change Ifc005c58287c4d1479bb42eb04455f38c37efc40 has been pushed to the review server.
It is available at http://review.typo3.org/5361
#7 Updated by Mr. Hudson over 3 years ago
Patch set 3 of change Ifc005c58287c4d1479bb42eb04455f38c37efc40 has been pushed to the review server.
It is available at http://review.typo3.org/5361
#8 Updated by Sebastian Kurfuerst over 3 years ago
- Status changed from New to Resolved
- Target version set to 1.0.1
thanks a lot for the patchset :)