You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Fabio Purcino <fa...@viacodigo.com.br> on 2016/06/11 14:27:29 UTC
Question regarding top menu
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
Re: Question regarding top menu
Posted by Jeroen van der Wal <je...@stromboli.it>.
Hi Fabio,
Unfortunately it's not possible to decorate collections from a service
action with another action. Only contributed or embedded collections can be
decorated with actions.
The closest thing you could do is create a homepage [1] (or another
viewmodel) and contribute your collection and action to that.
[1] https://isis.apache.org/guides/rgant.html#_rgant-HomePage
On 13 June 2016 at 21:46, Fabio Purcino <fa...@viacodigo.com.br> wrote:
> 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 <hector.meza@smartools.com.co
> >:
>
> >
> >
> > 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 <da...@haywood-associates.co.uk>:
> > >
> > >> 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
Posted by Fabio Purcino <fa...@viacodigo.com.br>.
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 <he...@smartools.com.co>:
>
>
> 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 <da...@haywood-associates.co.uk>:
> >
> >> 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
Posted by Hector Fabio Meza <he...@smartools.com.co>.
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 <da...@haywood-associates.co.uk>:
>
>> 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
Posted by Fabio Purcino <fa...@viacodigo.com.br>.
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 <da...@haywood-associates.co.uk>:
> 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 <fa...@viacodigo.com.br> 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 regarding top menu
Posted by Dan Haywood <da...@haywood-associates.co.uk>.
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 <fa...@viacodigo.com.br> 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
>