Re: Question about contributed actions and one about the UI

2016-06-13 Thread Hector Fabio Meza
 

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 regarding top menu

2016-06-13 Thread Fabio Purcino
HI Hector,

Thanks for your contribution. I could do the same as your screenshot in
detail screen, but I'd like to put an "Add" button on "List All" screen
without showing any checkbox for bulk actions.

The closest thing I'm trying to do is the Incode App showing an Add Button
as on screenshot in [1].

Links:
---
[1]
https://raw.githubusercontent.com/incodehq/incode-module-note/master/images/040-add-note.png




2016-06-13 16:36 GMT-03:00 Hector Fabio Meza :

>
>
> Hi, Fabio,
>
> Dan will be able to explain this with greater detail, but since I
> recently implemented some contributed actions without really trying to,
> I'd like to give you a couple pointers.
>
> The actions appear in the UI as buttons next to your object title, as
> shown here http://i.imgur.com/OWI4Wo3.png [3] (Create IT Services is an
> action defined in a class called ITServices that is contributed to the
> ANS class' UI).
>
> The code for that actions is as follows. From what I understand, ISIS
> detects that the action has an ANS parameter and then adds it to ANS's
> actions.
>
> public ITService createITService(
> final @ParameterLayout(named="Name") String name,
> final @ParameterLayout(named="Description", multiLine=4)
> String description,
> final @ParameterLayout(named="Status") String status,
> final @ParameterLayout(named="ANS")
> @Parameter(optionality=Optionality.OPTIONAL) ANS ans
> ) {
>
> 
>
> }
>
> Hope this is helpful.
>
> El 2016-06-13 14:19, Fabio Purcino escribió:
>
> > Hi Dan,
> >
> > Thank you so much for your explanation. Now I can get it working but I'm
> > afraid it's not enough because I'll need 3 or 4 lines for each domain.
> >
> > The best way for my project may be listing actions as buttons above title
> > of List All pages. Can I do this by using Contributed Actions?
> >
> > I didn't understand how contributed actions work. How can I fire these
> > actions? By buttons?
> >
> > Best regards,
> >
> > Fabio
> >
> > 2016-06-12 6:48 GMT-03:00 Dan Haywood :
> >
> >> Hi Fabio,
> >> and welcome to the mailing list. Very nice to hear you are enjoying
> using
> >> the framework.
> >>
> >> With respect to your question, you can use the
> @DomainServiceLayout#named
> >> attribute [1 [1]] to place the menu items for different menu domain
> services
> >> onto the same menu. The @DomainServiceLayout#menuOrder then determines
> the
> >> relative order of each set of menu items with respect to others. The
> >> framework automatically puts a menu separator between each set.
> >>
> >> For example, in Estatio [2 [2]] we have a "Fixed Assets" menu that is
> built out
> >> of three menu services:
> >>
> >> @DomainService(
> >> nature = NatureOfService.VIEW_MENU_ONLY
> >> )
> >> @DomainServiceLayout(
> >> named = "Fixed Assets",
> >> menuBar = DomainServiceLayout.MenuBar.PRIMARY,
> >> menuOrder = "10.1")
> >> public class PropertyMenu ... { ... }
> >>
> >> and
> >>
> >> @DomainService(
> >> nature = NatureOfService.VIEW_MENU_ONLY
> >> )
> >> @DomainServiceLayout(
> >> named = "Fixed Assets",
> >> menuBar = DomainServiceLayout.MenuBar.PRIMARY,
> >> menuOrder = "10.2"
> >> )
> >> public class UnitMenu ... { ... }
> >>
> >> and
> >>
> >> @DomainService(
> >> nature = NatureOfService.VIEW_MENU_ONLY
> >> )
> >> @DomainServiceLayout(
> >> named = "Fixed Assets",
> >> menuBar = DomainServiceLayout.MenuBar.PRIMARY,
> >> menuOrder = "10.3"
> >> )
> >> public class FixedAssetRegistrationMenu ... { ... }
> >>
> >> HTH
> >> Dan
> >>
> >> [1] http://isis.apache.org/guides/rgant.html#_rgant-DomainServiceLayout
> [1]
> >> [2] http://github.com/estatio/estatio [2]
>
> Cordial saludo,
>
>  Hector Fabio Meza Martínez
>  R&D Leader
> www.smartools.com.co [4]
>
> Links:
> --
> [1] http://isis.apache.org/guides/rgant.html#_rgant-DomainServiceLayout
> [2] http://github.com/estatio/estatio
> [3] http://i.imgur.com/OWI4Wo3.png
> [4] http://www.smartools.com.co
>



-- 

Fábio Purcino Aragão


Re: Question regarding top menu

2016-06-13 Thread Hector Fabio Meza
 

Hi, Fabio, 

Dan will be able to explain this with greater detail, but since I
recently implemented some contributed actions without really trying to,
I'd like to give you a couple pointers. 

The actions appear in the UI as buttons next to your object title, as
shown here http://i.imgur.com/OWI4Wo3.png [3] (Create IT Services is an
action defined in a class called ITServices that is contributed to the
ANS class' UI). 

The code for that actions is as follows. From what I understand, ISIS
detects that the action has an ANS parameter and then adds it to ANS's
actions. 

public ITService createITService(
final @ParameterLayout(named="Name") String name, 
final @ParameterLayout(named="Description", multiLine=4)
String description,
final @ParameterLayout(named="Status") String status,
final @ParameterLayout(named="ANS")
@Parameter(optionality=Optionality.OPTIONAL) ANS ans
) {



} 

Hope this is helpful. 

El 2016-06-13 14:19, Fabio Purcino escribió: 

> Hi Dan,
> 
> Thank you so much for your explanation. Now I can get it working but I'm
> afraid it's not enough because I'll need 3 or 4 lines for each domain.
> 
> The best way for my project may be listing actions as buttons above title
> of List All pages. Can I do this by using Contributed Actions?
> 
> I didn't understand how contributed actions work. How can I fire these
> actions? By buttons?
> 
> Best regards,
> 
> Fabio
> 
> 2016-06-12 6:48 GMT-03:00 Dan Haywood :
> 
>> Hi Fabio,
>> and welcome to the mailing list. Very nice to hear you are enjoying using
>> the framework.
>> 
>> With respect to your question, you can use the @DomainServiceLayout#named
>> attribute [1 [1]] to place the menu items for different menu domain services
>> onto the same menu. The @DomainServiceLayout#menuOrder then determines the
>> relative order of each set of menu items with respect to others. The
>> framework automatically puts a menu separator between each set.
>> 
>> For example, in Estatio [2 [2]] we have a "Fixed Assets" menu that is built 
>> out
>> of three menu services:
>> 
>> @DomainService(
>> nature = NatureOfService.VIEW_MENU_ONLY
>> )
>> @DomainServiceLayout(
>> named = "Fixed Assets",
>> menuBar = DomainServiceLayout.MenuBar.PRIMARY,
>> menuOrder = "10.1")
>> public class PropertyMenu ... { ... }
>> 
>> and
>> 
>> @DomainService(
>> nature = NatureOfService.VIEW_MENU_ONLY
>> )
>> @DomainServiceLayout(
>> named = "Fixed Assets",
>> menuBar = DomainServiceLayout.MenuBar.PRIMARY,
>> menuOrder = "10.2"
>> )
>> public class UnitMenu ... { ... }
>> 
>> and
>> 
>> @DomainService(
>> nature = NatureOfService.VIEW_MENU_ONLY
>> )
>> @DomainServiceLayout(
>> named = "Fixed Assets",
>> menuBar = DomainServiceLayout.MenuBar.PRIMARY,
>> menuOrder = "10.3"
>> )
>> public class FixedAssetRegistrationMenu ... { ... }
>> 
>> HTH
>> Dan
>> 
>> [1] http://isis.apache.org/guides/rgant.html#_rgant-DomainServiceLayout [1]
>> [2] http://github.com/estatio/estatio [2]

Cordial saludo,

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

Links:
--
[1] http://isis.apache.org/guides/rgant.html#_rgant-DomainServiceLayout
[2] http://github.com/estatio/estatio
[3] http://i.imgur.com/OWI4Wo3.png
[4] http://www.smartools.com.co


Re: Question regarding top menu

2016-06-13 Thread Fabio Purcino
Hi Dan,

Thank you so much for your explanation. Now I can get it working but I'm
afraid it's not enough because I'll need 3 or 4 lines for each domain.

The best way for my project may be listing actions as buttons above title
of List All pages. Can I do this by using Contributed Actions?

I didn't understand how contributed actions work. How can I fire these
actions? By buttons?

Best regards,

Fabio




2016-06-12 6:48 GMT-03:00 Dan Haywood :

> Hi Fabio,
> and welcome to the mailing list.   Very nice to hear you are enjoying using
> the framework.
>
> With respect to your question, you can use the @DomainServiceLayout#named
> attribute [1] to place the menu items for different menu domain services
> onto the same menu.  The @DomainServiceLayout#menuOrder then determines the
> relative order of each set of menu items with respect to others.  The
> framework automatically puts a menu separator between each set.
>
> For example, in Estatio [2] we have a "Fixed Assets" menu that is built out
> of three menu services:
>
>
> @DomainService(
> nature = NatureOfService.VIEW_MENU_ONLY
> )
> @DomainServiceLayout(
> named = "Fixed Assets",
> menuBar = DomainServiceLayout.MenuBar.PRIMARY,
> menuOrder = "10.1")
> public class PropertyMenu ... { ... }
>
>
> and
>
>
> @DomainService(
> nature = NatureOfService.VIEW_MENU_ONLY
> )
> @DomainServiceLayout(
> named = "Fixed Assets",
> menuBar = DomainServiceLayout.MenuBar.PRIMARY,
> menuOrder = "10.2"
> )
> public class UnitMenu ... { ... }
>
> and
>
>
> @DomainService(
> nature = NatureOfService.VIEW_MENU_ONLY
> )
> @DomainServiceLayout(
> named = "Fixed Assets",
> menuBar = DomainServiceLayout.MenuBar.PRIMARY,
> menuOrder = "10.3"
> )
> public class FixedAssetRegistrationMenu ... { ... }
>
>
>
> HTH
> Dan
>
> [1] http://isis.apache.org/guides/rgant.html#_rgant-DomainServiceLayout
> [2] http://github.com/estatio/estatio
>
>
>
>
>
>
>
>
>
> On 11 June 2016 at 15:27, Fabio Purcino  wrote:
>
> > Dear sirs,
> >
> > I'm new on Apache ISIS development. It`s really fantastic but i'm facing
> > the following issue:
> >
> > I have 20 domains with one domain service for each one showing basic
> > operations (List, Create and Find by Name).  Because of this I got three
> > lines of top menu, a little bit messy.
> >
> > Is there any way to manage this responsively? Or by making multilevel
> menu,
> > or by moving menu to a tree view in left site or by changing top menu
> > dynamically?
> >
> > I've already tried @menuOrder 1 , @menuOrder 1.1 to see different levels
> > but Isis only put my Actions under the same level.
> >
> > Thanks for your help and best regards,
> >
> > --
> > 
> > Fábio Purcino Aragão
> >
>



-- 

Fábio Purcino Aragão


Re: Question about contributed actions and one about the UI

2016-06-13 Thread Hector Fabio Meza
 

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