You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Hector Fabio Meza <he...@smartools.com.co> on 2016/06/10 02:28:13 UTC

Question about contributed actions and one about the UI

 

Hi, 

After adding a few classes to my project, I am seeing 2 behaviors that
make me wonder if I'm missing something or doing something wrong. 

I'm attaching 4 java files and 3 screenshots hoping to explain the
situation clearly. 

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, but that's
something that hasn't happened with other classes. Is this how
contributed actions are supposed to work? I managed to work around it
using NatureOfService.VIEW_MENU_ONLY on the ITServices class, by the
way. (screenshot1) 

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). 

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] 

Links:
------
[1] http://www.smartools.com.co

Re: Question about contributed actions and one about the UI

Posted by Hector Fabio Meza <he...@smartools.com.co>.
 

It was indeed fixed by updating to Isis 1.12.2. Thank you. 

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

> That looks like one of the issues fixed in 1.12.2 [a [1]]; 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 [1]

Cordial saludo,

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

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

Re: Question about contributed actions and one about the UI

Posted by Hector Fabio Meza <he...@smartools.com.co>.
 

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 <he...@smartools.com.co>
> 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

Re: Question about contributed actions and one about the UI

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
within



On 10 June 2016 at 03:28, Hector Fabio Meza <he...@smartools.com.co>
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]; 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




> 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
>

Re: Question about contributed actions and one about the UI

Posted by Hector Fabio Meza <he...@smartools.com.co>.
 

Thanks for the tip, Dan, 

here's a link to the 3 screenshots: http://imgur.com/a/X7ery [3] 

El 2016-06-10 00:41, Dan Haywood escribi�: 

> Hi Hector,
> 
> Thanks for the code listings and screenshots to explain the issue.
> 
> However, screenshots can't be attached to emails to this mailing list, they
> get stripped off. Could you upload them to imgur.com or similar and
> reference them, then we can take a look.
> 
> Cheers, Dan
> 
> PS: mailing lists are one of the services provided "for free" by ASF
> infrastructure. Indeed, mailing lists are part of the "Apache Way (TM)".
> [1 [2]]
> 
> [1] http://theapacheway.com/ [2]
> 
> On 10 Jun 2016 3:28 a.m., "Hector Fabio Meza" <he...@smartools.com.co>
> wrote:
> 
>> Hi,
>> 
>> After adding a few classes to my project, I am seeing 2 behaviors that
>> make me wonder if I'm missing something or doing something wrong.
>> 
>> I'm attaching 4 java files and 3 screenshots hoping to explain the
>> situation clearly.
>> 
>> 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, but that's something that
>> hasn't happened with other classes. Is this how contributed actions are
>> supposed to work? I managed to work around it using
>> NatureOfService.VIEW_MENU_ONLY on the ITServices class, by the way.
>> (screenshot1)
>> 
>> 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).
>> 
>> 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://theapacheway.com/
[3] http://imgur.com/a/X7ery

Re: Question about contributed actions and one about the UI

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Hi Hector,

Thanks for the code listings and screenshots to explain the issue.

However, screenshots can't be attached to emails to this mailing list, they
get stripped off. Could you upload them to imgur.com or similar and
reference them, then we can take a look.

Cheers, Dan


PS: mailing lists are one of the services provided "for free" by ASF
infrastructure.   Indeed, mailing lists are part of the "Apache Way (TM)".
[1]

[1] http://theapacheway.com/



On 10 Jun 2016 3:28 a.m., "Hector Fabio Meza" <he...@smartools.com.co>
wrote:

> Hi,
>
> After adding a few classes to my project, I am seeing 2 behaviors that
> make me wonder if I'm missing something or doing something wrong.
>
> I'm attaching 4 java files and 3 screenshots hoping to explain the
> situation clearly.
>
> 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, but that's something that
> hasn't happened with other classes. Is this how contributed actions are
> supposed to work? I managed to work around it using
> NatureOfService.VIEW_MENU_ONLY on the ITServices class, by the way.
> (screenshot1)
>
> 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).
>
> 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
>