[jira] [Commented] (ISIS-439) Wicket viewer should support mutable collections - ie with an implicit 'add' and 'remove' action.

2014-11-25 Thread Martin Grigorov (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14225208#comment-14225208
 ] 

Martin Grigorov commented on ISIS-439:
--

Isn't this already implemented ?
I have seen Add/Remove action links for collections here and there.

 Wicket viewer should support mutable collections - ie with an implicit 'add' 
 and 'remove' action.
 -

 Key: ISIS-439
 URL: https://issues.apache.org/jira/browse/ISIS-439
 Project: Isis
  Issue Type: Improvement
  Components: Viewer: Wicket
Affects Versions: viewer-wicket-1.2.0
Reporter: Dan Haywood
Assignee: Dan Haywood
 Fix For: viewer-wicket-2.0.0






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ISIS-439) Wicket viewer should support mutable collections - ie with an implicit 'add' and 'remove' action.

2014-11-25 Thread Dan Haywood (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14225214#comment-14225214
 ] 

Dan Haywood commented on ISIS-439:
--

No, those are separate actions that just happened to be associated with the 
collection.

It's a subtle point, but the Isis programming model for collections defines:

CollectionElement getCollection()
setCollection(CollectionElement)
addToCollection(Element)
removeFromCollection(Element)

With validateAddToCollection(), validateRemoveFromCollection() etc also being 
supported methods.

In the metamodel there is only one member on the ObjectSpec, namely an instance 
of OneToManyAssociation; this member has facets representing the ability to 
add/remove.

~~~
In contrast, when we right:

CollectionElement getCollection()
setCollection(CollectionElement)

addCollection(Element)  // @MemberOrder(name=collection) to render close to 
the collection
removeCollection(Element)  // @MemberOrder(name=collection) to render close 
to the collection

Then there are three members on the ObjectSpec: the OneToManyAssociation and 
two ObjectActions.

~~
The above notwithstanding, in Isis 2.0 it may make sense to get rid of the idea 
of mutable collections; the amount of code that the developer writes is almost 
identical (and is one less concept for the developer to understand), and it 
would simplify some of the code in Isis.

 Wicket viewer should support mutable collections - ie with an implicit 'add' 
 and 'remove' action.
 -

 Key: ISIS-439
 URL: https://issues.apache.org/jira/browse/ISIS-439
 Project: Isis
  Issue Type: Improvement
  Components: Viewer: Wicket
Affects Versions: viewer-wicket-1.2.0
Reporter: Dan Haywood
Assignee: Dan Haywood
 Fix For: viewer-wicket-2.0.0






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ISIS-439) Wicket viewer should support mutable collections - ie with an implicit 'add' and 'remove' action.

2014-11-25 Thread Jeroen van der Wal (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14225261#comment-14225261
 ] 

Jeroen van der Wal commented on ISIS-439:
-

Agree that it's better to remove mutable collections from the programming model 
since it's not compatible with decoupling using contributed collections.

 Wicket viewer should support mutable collections - ie with an implicit 'add' 
 and 'remove' action.
 -

 Key: ISIS-439
 URL: https://issues.apache.org/jira/browse/ISIS-439
 Project: Isis
  Issue Type: Improvement
  Components: Viewer: Wicket
Affects Versions: viewer-wicket-1.2.0
Reporter: Dan Haywood
Assignee: Dan Haywood
 Fix For: viewer-wicket-2.0.0






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)