Thank you, Dan,  

I agree that contributions are a little hard to visualize. When reading
the documentation I got the idea that it worked based on interfaces, so
after creating my own example without noticing it I understand the idea
better.

I'll check the documentation on mixins, too. 

Thanks for the detailed explanation, I'll update to 1.12.2 and get back
to you. 

El 2016-06-12 05:25, Dan Haywood escribió: 

> within
> 
> On 10 June 2016 at 03:28, Hector Fabio Meza <[email protected]>
> wrote:
> 
>> I'm attaching 4 java files and 3 screenshots hoping to explain the
>> situation clearly.
> 
> thanks for these.
> 
>> The behavior appeared when I added two new classes, ANS and ITService (To
>> keep this light I'm not including the superclass, which has common JDO
>> parameters and some methods to control visibility). ITService contains an
>> attribute of type ANS.
>> 
>> When I create the ANS, the UI shows a button connected to the
>> createITService action in ITServices. I think ANS is seeing that action as
>> contributed since it has a parameter of type ANS,
> 
> correct. The ITServices is annotated with NatureOfService.VIEW, which
> implies both as a menu and also for contributions.
> 
> While this is convenient when getting started, what we have found is that
> we only every use VIEW_MENU_ONLY. As for contributions, we are slowly
> phasing them out in our app (Estatio) to use mixins. It's possible that
> contributions might be deprecated in the future - certainly I want to have
> that discussion on the mailing list - because while powerful they can be a
> little obscure. For myself, I find mixins easier to rationalize about.
> 
>> but that's something that hasn't happened with other classes. Is this how
>> contributed actions are supposed to work?
> 
> Yes... they will contribute to any and all reference (entity or view model)
> parameters. There is no way to exclude certain parameters ... if you want
> that control, use a mixin.
> 
>> I managed to work around it using NatureOfService.VIEW_MENU_ONLY on the
>> ITServices class, by the way. (screenshot1)
> 
> That's the correct approach.
> 
>> I then create an ITService, and after the creation, the screen that shows
>> the newly created object show the attribute of type ANS as null
>> (screenshot2). However, if I click the edit button for that property, it
>> shows a value, which makes me believe the "null" on the first screen is a
>> glitch (screenshot3).
> 
> That looks like one of the issues fixed in 1.12.2 [a [2]]; perhaps you could
> update and see if it's still a problem.
> 
> Thx
> Dan
> 
> [a] http://isis.apache.org/release-notes.html#r1.12.2 [2]
> 
>> If I use the list menu option and click on the IT Service again, the
>> property shows a non null value.
>> 
>> Thank you for setting up this mailing list, by the way.
>> Cordial saludo,
>> 
>> Hector Fabio Meza Martínez
>> R&D Leader
>> www.smartools.com.co [1]

Cordial saludo,

 Hector Fabio Meza Martínez
 R&D Leader
www.smartools.com.co [1] 

Links:
------
[1] http://www.smartools.com.co
[2] http://isis.apache.org/release-notes.html#r1.12.2

Reply via email to