Security Module Addon Tables

2016-06-29 Thread Fabio Purcino
Dear sirs,

I'm currently developing a solution using Apache Isis. I have implemented
Security Module Addon "out-of-box" according to Dan's video tutorial.

I'm persisting all data on a SQL Server Database but none of Security's
module tables are being created.

Is there any additional configuration?

Thanks,

-- 

Fábio Purcino Aragão


Re: Invoking an Action Programmatically

2016-06-16 Thread Fabio Purcino
Hi Dan,

Yes, It would be perfect. I'll be watching ISIS-1196 to check releasing.

Thanks,
Fabio



2016-06-16 9:34 GMT-03:00 Dan Haywood <d...@haywood-associates.co.uk>:

> OK.
>
> We actually have ISIS-1196 [1] raised already to provide this sort of
> capability, but baked directly into the Wicket viewer.  What we envisage is
> something similar to the "more actions" in JIRA, or the cmd-alt-A in
> IntelliJ , as per [2]
>
> Would this suffice?
>
> Thx
> Dan
>
> [1] https://issues.apache.org/jira/browse/ISIS-1196
> [2] http://imgur.com/a/It2TN
>
>
> On 16 June 2016 at 13:24, Fabio Purcino <fa...@viacodigo.com.br> wrote:
>
> > Hi Dan,
> >
> > It's exactly what I'm trying to do. I want to make an Action with an
> > Autocomplete Parameter listing All Services and Actions.  After user
> select
> > some action this action will fire the action as if I clicked.
> >
> > I'm thinking about the growing complexity keeping navigation fluidly and
> > easy.
> >
> > Thanks,
> > Fabio
> >
> >
> >
> >
> >
> >
> > 2016-06-16 8:57 GMT-03:00 Dan Haywood <d...@haywood-associates.co.uk>:
> >
> > > Hi Fabio,
> > >
> > > What Stephen has said is all true, of course, but I'm just wondering if
> > > what you want is some sort of intercept in order to influence the
> action
> > > prompt that's rendered?
> > >
> > > If so, then the answer to that is "no", I'm afraid.
> > >
> > > That said, I'm not certain if I fully understand the objective.  My
> > *guess*
> > > is that you want to be able to have the user invoke some sort of menu
> > item,
> > > but then programmatically decide which action to delegate on to, almost
> > > like a redirect?
> > >
> > > For example, something like:
> > >
> > >
> > > public class SomeMenu {
> > > public void doSomethingOrOther() {
> > > if(shouldDoSomething()) {
> > >// render the prompt for "doSomething" and invoke
> > >  } else
> > >// render the prompt for "doOther" and invoke
> > >  }
> > > }
> > >
> > > public Object doSomething(int x) {
> > >// would render an action prompt requesting an int param, and
> > return
> > > a single object
> > > }
> > >
> > > public List doSomething(boolean y) {
> > >// would render an action prompt requesting an boolean param,
> and
> > > return a list
> > > }
> > >
> > > }
> > >
> > > Do I at least understand the question?
> > >
> > > Thx
> > > Dan
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > On 15 June 2016 at 23:33, Stephen Cameron <steve.cameron...@gmail.com>
> > > wrote:
> > >
> > > > At the code level its just OO programming, so whatever your action
> > > 'method'
> > > > returns is what Isis will display to the user, as long as it knows of
> > > that
> > > > class in its metamodel (from which it builds the view) so the Doenca
> > > class
> > > > needs to be annotated with @DomainObject.
> > > >
> > > > then:
> > > >
> > > > @DomainService(nature = NatureOfService.DOMAIN) // not a user viewed
> > > > service
> > > >
> > > > public class Doencas {
> > > >
> > > > public Doenca create(){
> > > > ...
> > > > }
> > > >
> > > > }
> > > >
> > > > and:
> > > >
> > > > @DomainService(nature = NatureOfService.VIEW_MENU_ONLY)
> > > >
> > > > @DomainServiceLayout(
> > > >
> > > > named = "Transações",
> > > >
> > > > menuBar = DomainServiceLayout.MenuBar.PRIMARY,
> > > >
> > > > menuOrder = "1"
> > > >
> > > > )
> > > >
> > > > public class Transacoes {
> > > >
> > > > @Action(semantics = SemanticsOf.SAFE)
> > > >
> > > > @ActionLayout(bookmarking = BookmarkPolicy.AS_ROOT, named="Buscar
> > > &g

Re: Invoking an Action Programmatically

2016-06-16 Thread Fabio Purcino
Hi Dan,

It's exactly what I'm trying to do. I want to make an Action with an
Autocomplete Parameter listing All Services and Actions.  After user select
some action this action will fire the action as if I clicked.

I'm thinking about the growing complexity keeping navigation fluidly and
easy.

Thanks,
Fabio






2016-06-16 8:57 GMT-03:00 Dan Haywood <d...@haywood-associates.co.uk>:

> Hi Fabio,
>
> What Stephen has said is all true, of course, but I'm just wondering if
> what you want is some sort of intercept in order to influence the action
> prompt that's rendered?
>
> If so, then the answer to that is "no", I'm afraid.
>
> That said, I'm not certain if I fully understand the objective.  My *guess*
> is that you want to be able to have the user invoke some sort of menu item,
> but then programmatically decide which action to delegate on to, almost
> like a redirect?
>
> For example, something like:
>
>
> public class SomeMenu {
> public void doSomethingOrOther() {
> if(shouldDoSomething()) {
>// render the prompt for "doSomething" and invoke
>  } else
>// render the prompt for "doOther" and invoke
>  }
> }
>
> public Object doSomething(int x) {
>// would render an action prompt requesting an int param, and return
> a single object
> }
>
> public List doSomething(boolean y) {
>// would render an action prompt requesting an boolean param, and
> return a list
> }
>
> }
>
> Do I at least understand the question?
>
> Thx
> Dan
>
>
>
>
>
>
>
> On 15 June 2016 at 23:33, Stephen Cameron <steve.cameron...@gmail.com>
> wrote:
>
> > At the code level its just OO programming, so whatever your action
> 'method'
> > returns is what Isis will display to the user, as long as it knows of
> that
> > class in its metamodel (from which it builds the view) so the Doenca
> class
> > needs to be annotated with @DomainObject.
> >
> > then:
> >
> > @DomainService(nature = NatureOfService.DOMAIN) // not a user viewed
> > service
> >
> > public class Doencas {
> >
> > public Doenca create(){
> > ...
> > }
> >
> > }
> >
> > and:
> >
> > @DomainService(nature = NatureOfService.VIEW_MENU_ONLY)
> >
> > @DomainServiceLayout(
> >
> > named = "Transações",
> >
> > menuBar = DomainServiceLayout.MenuBar.PRIMARY,
> >
> > menuOrder = "1"
> >
> > )
> >
> > public class Transacoes {
> >
> > @Action(semantics = SemanticsOf.SAFE)
> >
> > @ActionLayout(bookmarking = BookmarkPolicy.AS_ROOT, named="Buscar
> > Transação") // Why bookmark an action thats in the menu?
> >
> > @MemberOrder(sequence = "1.1")
> >
> > public Doenca buscarTransacao(
> >
> > final @ParameterLayout(named="Transação") String tr) {
> >
> >
> >
> > //Code here
> >
> >   return   doencaRepo.create();
> >
> > }
> >
> > @javax.inject.Inject
> > Doencas doencaRepo;
> >
> > }
> >
> > On Thu, Jun 16, 2016 at 3:13 AM, Fabio Purcino <fa...@viacodigo.com.br>
> > wrote:
> >
> > > Hi Jeroen,
> > >
> > > Thanks for your reply. Following are some code snippets:
> > >
> > > First of all I have this Domain Service with an action buscarTransacao
> > that
> > > shows an parameter screen. It works fine.
> > >
> > > My goal is call a method like this:
> > >
> > > manager.InvokeAction("Doenca","create") ;
> > >
> > > And the action be called showing a parameter screen. I tried to do this
> > by
> > > injecting Doencas into Transacoes and calling it directly but It
> bypasses
> > > parameter screen.
> > >
> > > Could you help me solving this issue?
> > >
> > >
> > >
> > >
> > >
> >
> ***
> > >
> > > @DomainService(nature = NatureOfService.VIEW_MENU_ONLY)
> > >
> > > @DomainServiceLayout(
> > >
> > > named = "Transações",
> > >
> > > menuBar = DomainServiceLayout.MenuBar.PRIMARY,
> > >
> > > menuOrder = "1"
> > >
> > > )
> > >
> > > public class Transacoes {
&

Re: Invoking an Action Programmatically

2016-06-15 Thread Fabio Purcino
Hi Jeroen,

Thanks for your reply. Following are some code snippets:

First of all I have this Domain Service with an action buscarTransacao that
shows an parameter screen. It works fine.

My goal is call a method like this:

manager.InvokeAction("Doenca","create") ;

And the action be called showing a parameter screen. I tried to do this by
injecting Doencas into Transacoes and calling it directly but It bypasses
parameter screen.

Could you help me solving this issue?



***

@DomainService(nature = NatureOfService.VIEW_MENU_ONLY)

@DomainServiceLayout(

named = "Transações",

menuBar = DomainServiceLayout.MenuBar.PRIMARY,

menuOrder = "1"

)

public class Transacoes {

@Action(semantics = SemanticsOf.SAFE)

@ActionLayout(bookmarking = BookmarkPolicy.AS_ROOT, named="Buscar
Transação")

@MemberOrder(sequence = "1.1")

public void buscarTransacao(

final @ParameterLayout(named="Transação") String tr) {



//Code here

  manager.InvokeAction("Doenca","create") ;

}

}

***


I have another Domain Service I intend to be called only programmatically.
It works fine too.


***

@DomainService(nature = NatureOfService.VIEW_MENU_ONLY,repositoryFor =
Doenca.class)

@DomainServiceLayout(

named = "Dados Mestres",

menuBar = DomainServiceLayout.MenuBar.PRIMARY,

menuOrder = "10.3"

)

public class Doencas {

public TranslatableString title() {

return TranslatableString.tr("Doenças");

}







@Action(semantics = SemanticsOf.SAFE)

@ActionLayout(bookmarking = BookmarkPolicy.AS_ROOT, named="Doenças")

@MemberOrder(sequence = "1")

public List listAll() {

return repositoryService.allInstances(Doenca.class);

}





@Action(semantics = SemanticsOf.SAFE)

@ActionLayout(bookmarking = BookmarkPolicy.AS_ROOT)

@MemberOrder(sequence = "2")

public Doenca create(

final @ParameterLayout(named="CID") String cid,

final @ParameterLayout(named="Descrição") String descricao) {

final Doenca obj = repositoryService.instantiate(Doenca.class);

obj.setCid(cid);

obj.setDescricao(descricao);

repositoryService.persist(obj);

return obj;

}







@javax.inject.Inject

RepositoryService repositoryService;

}

***








2016-06-15 13:14 GMT-03:00 Jeroen van der Wal <jer...@stromboli.it>:

> Perhaps you can specify your question with some (pseudo) code?
>
> On 15 June 2016 at 16:41, Fabio Purcino <fa...@viacodigo.com.br> wrote:
>
> > Hi all,
> >
> > Is it possible to invoke an action programmatically from another action?
> >
> > The called action has parameters and I'd like to show the same screen as
> I
> > click on the service menu.
> >
> > Thanks and best Regards,
> >
> > --
> > 
> > Fábio Purcino Aragão
> >
>



-- 

Fábio Purcino Aragão


Invoking an Action Programmatically

2016-06-15 Thread Fabio Purcino
Hi all,

Is it possible to invoke an action programmatically from another action?

The called action has parameters and I'd like to show the same screen as I
click on the service menu.

Thanks and best Regards,

-- 

Fábio Purcino Aragão


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 <hector.m...@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 <d...@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 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 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 <d...@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


Question regarding top menu

2016-06-11 Thread Fabio Purcino
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