Create a multiselect field (MGNLUI-1449)

[MGNLUI-1454] MultiProperty handling. Created: 28/May/13  Updated: 25/Jun/13  Resolved: 05/Jun/13

Status: Closed
Project: Magnolia UI
Component/s: framework
Affects Version/s: 5.0
Fix Version/s: 5.0

Type: Sub-task Priority: Neutral
Reporter: Eric Hechinger Assignee: Eric Hechinger
Resolution: Fixed Votes: 0
Labels: adapters
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Date of First Response:
Sprint: Beta 3

 Description   

Create Specific properties in order to store the multi selected values into 3 different way:
*Single field property (value separated with string)
*Multi-property values
*Multi sub nodes

The builder create a MultiProperty object (extend VaadinProperty). This property then delegate to configured Handler the retrieval and storage of properties in the appropriate form (single vale, multi values or multi child node)



 Comments   
Comment by Tobias Mattsson [ 04/Jun/13 ]

SaveModeType

  • should be in the form.field.definition package

MultiProperty

  • what would it take to make MultiProperty able to support more types than strings?
  • field delegate should be renamed to handler
  • unnecessary cast in setValue()

MultiValueHandler

  • javadoc is confusing, should say that the responsibility of the handler is to store the value in a adapter

MultiValuesHandler

  • extends SingleValueHandler, would it not make more sense to add an Abstract base class if all we need to share is a util method?
  • the name is confusing would make more sense if this was MultiValueHandler

SubNodesValueHandler

  • the terms root and parent seems to mean the same thing, can we use parent consistently instead?
  • the term rootChild should be just child
  • the name child sometimes seems to be the node holding the entries and sometimes the entry itself, we should use the term entry to make it clear which is what
  • should not call applyChanges() since this should only be done once when actually saving the data, use getJcrItem() instead
  • spelling error in SubNodesValueHandlerTest chield should be child
  • unnecessary casts in getOrCreateChildNode()
  • StringUtils.rightPad does not cut the string down to 20 chars, only makes it at least 20 chars long

MultiValuesHandlerTest

  • copyright header says 2012
  • should call applyChanges() only once per test

SingleValueHandlerTest

  • copyright header says 2012
  • should call applyChanges() only once per test

SubNodesValueHandlerTest

  • copyright header says 2012
  • should call applyChanges() only once per test
Comment by Eric Hechinger [ 05/Jun/13 ]

SaveModeType

  • should be in the form.field.definition package
    (ehe: current package package info.magnolia.ui.form.field.definition)

MultiProperty

  • what would it take to make MultiProperty able to support more types than strings?
    (ehe: I wanted to handle it in a more generic task MGNLUI-1455)
  • field delegate should be renamed to handler (ehe:ok)
  • unnecessary cast in setValue() (ehe:ok)

MultiValueHandler

  • javadoc is confusing, should say that the responsibility of the handler is to store the value in a adapter
    (ehe:ok)

MultiValuesHandler

  • extends SingleValueHandler, would it not make more sense to add an Abstract base class if all we need to share is a util method?
    (ehe: make sens, I was asking my self the same question.)
  • the name is confusing would make more sense if this was MultiValueHandler
    (ehe: MultiValueHandler is already the name of the implemented interface.)

SubNodesValueHandler

  • the terms root and parent seems to mean the same thing, can we use parent consistently instead?
  • the term rootChild should be just child
  • the name child sometimes seems to be the node holding the entries and sometimes the entry itself, we should use the term entry to make it clear which is what
    (ehe: ok, tried to add consistency to the variable name.)
  • should not call applyChanges() since this should only be done once when actually saving the data, use getJcrItem() instead
    (ehe: agree event un-necessary method, removed)
  • spelling error in SubNodesValueHandlerTest chield should be child
  • unnecessary casts in getOrCreateChildNode()
    (ehe: agree)
  • StringUtils.rightPad does not cut the string down to 20 chars, only makes it at least 20 chars long
    (ehe: agree, my mistake, Name may be less than 20 char but not longer)

MultiValuesHandlerTest

  • copyright header says 2012
  • should call applyChanges() only once per test
    (ehe: agree)

SingleValueHandlerTest

  • copyright header says 2012
  • should call applyChanges() only once per test
    (ehe: agree)

SubNodesValueHandlerTest

  • copyright header says 2012
  • should call applyChanges() only once per test
    (ehe: agree)
Generated at Mon Feb 12 08:46:44 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.