Re: title() value appears in table

2015-09-27 Thread Dan Haywood
This is configurable, see
http://isis.apache.org/guides/ug.html#_ug_wicket-viewer_configuration-properties_abbreviating-titles

If set to 0, then (IIRC) it will suppress the title completely (though the
icon is still available as a hyperlink to the object).

Cheers
Dan







On 27 September 2015 at 12:42, Stephen Cameron 
wrote:

> This is in my polymorphic linked Note object, so suspect that is the reason
> for the behaviour.
>
>
>
> On Sun, Sep 27, 2015 at 8:36 PM, Stephen Cameron <
> steve.cameron...@gmail.com
> > wrote:
>
> > Hi,
> >
> > I am not sure if this is correct, that a title() value appears in a
> > collection table column?
> >
> > In my Note class I have:
> >
> > // region > identificatiom
> > @PropertyLayout(hidden = Where.ALL_TABLES)
> > public String title() {
> > return "Note: " + getSubject();
> > }
> >
> > // endregion
> >
> > // region > name (property)
> >
> > private String subject;
> >
> > @Column(allowsNull = "false", length = 40)
> > @MemberOrder(sequence = "1")
> > public String getSubject() {
> > return subject;
> > }
> >
> > public void setSubject(final String subject) {
> > this.subject = subject;
> > }
> >
> >
> > Title is appearing, along with Subject, even though I have attempted to
> > hide it.
> >
> >
> >
> >
> >
> >
>


Re: Invalid autoComplete Support method?

2015-09-27 Thread Burbach, Matthias
Yes, tried Johan's proposal and it worked! Thanks a lot!
Will raise a ticket in your JIRA.
Matthias

Am 27.09.15 19:48 schrieb "Dan Haywood" unter
:

>If that's the reason, then we should fix this.
>
>Matthias, could you try out John's suggestion, and if it's correct then
>raise a ticket in our JIRA?
>
>Thx,
>Dan
>On 27 Sep 2015 18:46,  wrote:
>
>> Hi Matthias,
>>
>>
>>
>> Try to use List instead of collection. That worked for me.
>>
>>
>>
>> Grtz
>>
>>
>>
>> Johan
>>
>>
>>
>>
>>
>>
>> - Original Message 
>>
>> From: "Burbach, Matthias"
>>
>> To: "users@isis.apache.org"
>>
>> Sent: Zon, 27 Sep 2015 17:20
>>
>> Subject: Invalid autoComplete Support method?
>>
>>
>>
>>
>> Hi,
>> hope I am using the correct channel for this question. If not please
>>tell
>> me where I can best place such questions.
>>
>> I am going first steps with Apache Isis by modifying the simple app. So
>> far it works fine but I cannot understand why I am getting:
>>
>>
>>  ISIS METAMODEL
>>VALIDATION
>> ERRORS 
>>
>>
>> domainapp.dom.simple.Connections#autoComplete0Create: has prefix
>> autoComplete, is probably a supporting method for a property,
>>collection or
>> action.  If the method is intended to be an action, then rename and use
>> @ActionLayout(named="...") or ignore completely using @Programmatic
>>
>>
>> Please inspect the above messages and correct your domain model.
>>
>> for this:
>> ...
>>
>> //region > create (action)
>>
>> public static class CreateDomainEvent extends ActionDomainEvent {
>>
>> public CreateDomainEvent(final Connections source, final
>> Identifier identifier, final Object... arguments) {
>>
>> super(source, identifier, arguments);
>>
>> }
>>
>> }
>>
>>
>> @Action(
>>
>> domainEvent = CreateDomainEvent.class
>>
>> )
>>
>> @MemberOrder(sequence = "3")
>>
>> public Connection create(
>>
>> final @ParameterLayout(named="System A") System systemA) {
>>
>> final Connection obj =
>> container.newTransientInstance(Connection.class);
>>
>> obj.setName(systemA.getName());
>>
>> obj.setSystemA(systemA);
>>
>> container.persistIfNotAlready(obj);
>>
>> return obj;
>>
>> }
>>
>>
>> public Collection autoComplete0Create(@MinLength(value = 1) final
>> String search) {
>>
>>  return systems.listAll();
>>
>> }
>>
>> ...
>> }
>>
>> while using choices instead of autoComplete works fine:
>>
>>
>> public Collection choices0Create() {
>>
>> return systems.listAll();
>>
>> }
>>
>> //public Collection autoComplete0Create(@MinLength(value = 1) final
>> String search) {
>>
>> //return systems.listAll();
>>
>> //}
>>
>>
>>
>> Matthias
>>
>>
>>
>>



Re: Invalid autoComplete Support method?

2015-09-27 Thread Burbach, Matthias
Sorry, signed up for your JIRA, but I am confused by the create options,
they are:

* Kylin 
* Atlas 
* Apache Infrastructure


What do I have to choose to create that issue?


Am 27.09.15 19:51 schrieb "Burbach, Matthias" unter
:

>Yes, tried Johan's proposal and it worked! Thanks a lot!
>Will raise a ticket in your JIRA.
>Matthias
>
>Am 27.09.15 19:48 schrieb "Dan Haywood" unter
>:
>
>>If that's the reason, then we should fix this.
>>
>>Matthias, could you try out John's suggestion, and if it's correct then
>>raise a ticket in our JIRA?
>>
>>Thx,
>>Dan
>>On 27 Sep 2015 18:46,  wrote:
>>
>>> Hi Matthias,
>>>
>>>
>>>
>>> Try to use List instead of collection. That worked for me.
>>>
>>>
>>>
>>> Grtz
>>>
>>>
>>>
>>> Johan
>>>
>>>
>>>
>>>
>>>
>>>
>>> - Original Message 
>>>
>>> From: "Burbach, Matthias"
>>>
>>> To: "users@isis.apache.org"
>>>
>>> Sent: Zon, 27 Sep 2015 17:20
>>>
>>> Subject: Invalid autoComplete Support method?
>>>
>>>
>>>
>>>
>>> Hi,
>>> hope I am using the correct channel for this question. If not please
>>>tell
>>> me where I can best place such questions.
>>>
>>> I am going first steps with Apache Isis by modifying the simple app. So
>>> far it works fine but I cannot understand why I am getting:
>>>
>>>
>>>  ISIS METAMODEL
>>>VALIDATION
>>> ERRORS 
>>>
>>>
>>> domainapp.dom.simple.Connections#autoComplete0Create: has prefix
>>> autoComplete, is probably a supporting method for a property,
>>>collection or
>>> action.  If the method is intended to be an action, then rename and use
>>> @ActionLayout(named="...") or ignore completely using @Programmatic
>>>
>>>
>>> Please inspect the above messages and correct your domain model.
>>>
>>> for this:
>>> ...
>>>
>>> //region > create (action)
>>>
>>> public static class CreateDomainEvent extends ActionDomainEvent {
>>>
>>> public CreateDomainEvent(final Connections source, final
>>> Identifier identifier, final Object... arguments) {
>>>
>>> super(source, identifier, arguments);
>>>
>>> }
>>>
>>> }
>>>
>>>
>>> @Action(
>>>
>>> domainEvent = CreateDomainEvent.class
>>>
>>> )
>>>
>>> @MemberOrder(sequence = "3")
>>>
>>> public Connection create(
>>>
>>> final @ParameterLayout(named="System A") System systemA) {
>>>
>>> final Connection obj =
>>> container.newTransientInstance(Connection.class);
>>>
>>> obj.setName(systemA.getName());
>>>
>>> obj.setSystemA(systemA);
>>>
>>> container.persistIfNotAlready(obj);
>>>
>>> return obj;
>>>
>>> }
>>>
>>>
>>> public Collection autoComplete0Create(@MinLength(value = 1) final
>>> String search) {
>>>
>>>  return systems.listAll();
>>>
>>> }
>>>
>>> ...
>>> }
>>>
>>> while using choices instead of autoComplete works fine:
>>>
>>>
>>> public Collection choices0Create() {
>>>
>>> return systems.listAll();
>>>
>>> }
>>>
>>> //public Collection autoComplete0Create(@MinLength(value = 1) final
>>> String search) {
>>>
>>> //return systems.listAll();
>>>
>>> //}
>>>
>>>
>>>
>>> Matthias
>>>
>>>
>>>
>>>
>



Invalid autoComplete Support method?

2015-09-27 Thread Burbach, Matthias
Hi,
hope I am using the correct channel for this question. If not please tell me 
where I can best place such questions.

I am going first steps with Apache Isis by modifying the simple app. So far it 
works fine but I cannot understand why I am getting:


 ISIS METAMODEL VALIDATION 
ERRORS 


domainapp.dom.simple.Connections#autoComplete0Create: has prefix autoComplete, 
is probably a supporting method for a property, collection or action.  If the 
method is intended to be an action, then rename and use 
@ActionLayout(named="...") or ignore completely using @Programmatic


Please inspect the above messages and correct your domain model.

for this:
...

//region > create (action)

public static class CreateDomainEvent extends 
ActionDomainEvent {

public CreateDomainEvent(final Connections source, final Identifier 
identifier, final Object... arguments) {

super(source, identifier, arguments);

}

}


@Action(

domainEvent = CreateDomainEvent.class

)

@MemberOrder(sequence = "3")

public Connection create(

final @ParameterLayout(named="System A") System systemA) {

final Connection obj = container.newTransientInstance(Connection.class);

obj.setName(systemA.getName());

obj.setSystemA(systemA);

container.persistIfNotAlready(obj);

return obj;

}


public Collection autoComplete0Create(@MinLength(value = 1) final 
String search) {

 return systems.listAll();

}

...
}

while using choices instead of autoComplete works fine:


public Collection choices0Create() {

return systems.listAll();

}

//public Collection autoComplete0Create(@MinLength(value = 1) final 
String search) {

//return systems.listAll();

//}



Matthias


Re: Invalid autoComplete Support method?

2015-09-27 Thread Burbach, Matthias
that's exactly the button I have already tried, it brings up these three
weird options...

Am 27.09.15 20:23 schrieb "Martin Grigorov" unter :

>Hi,
>
>Go to https://issues.apache.org/jira/browse/ISIS and use the blue Create
>button at top center.
>
>Martin Grigorov
>Wicket Training and Consulting
>https://twitter.com/mtgrigorov
>
>On Sun, Sep 27, 2015 at 8:01 PM, Burbach, Matthias
>
>wrote:
>
>> Sorry, signed up for your JIRA, but I am confused by the create options,
>> they are:
>>
>> * Kylin 
>> * Atlas 
>> * Apache Infrastructure
>> 
>>
>> What do I have to choose to create that issue?
>>
>>
>> Am 27.09.15 19:51 schrieb "Burbach, Matthias" unter
>> :
>>
>> >Yes, tried Johan's proposal and it worked! Thanks a lot!
>> >Will raise a ticket in your JIRA.
>> >Matthias
>> >
>> >Am 27.09.15 19:48 schrieb "Dan Haywood" unter
>> >:
>> >
>> >>If that's the reason, then we should fix this.
>> >>
>> >>Matthias, could you try out John's suggestion, and if it's correct
>>then
>> >>raise a ticket in our JIRA?
>> >>
>> >>Thx,
>> >>Dan
>> >>On 27 Sep 2015 18:46,  wrote:
>> >>
>> >>> Hi Matthias,
>> >>>
>> >>>
>> >>>
>> >>> Try to use List instead of collection. That worked for me.
>> >>>
>> >>>
>> >>>
>> >>> Grtz
>> >>>
>> >>>
>> >>>
>> >>> Johan
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> - Original Message 
>> >>>
>> >>> From: "Burbach, Matthias"
>> >>>
>> >>> To: "users@isis.apache.org"
>> >>>
>> >>> Sent: Zon, 27 Sep 2015 17:20
>> >>>
>> >>> Subject: Invalid autoComplete Support method?
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> Hi,
>> >>> hope I am using the correct channel for this question. If not please
>> >>>tell
>> >>> me where I can best place such questions.
>> >>>
>> >>> I am going first steps with Apache Isis by modifying the simple
>>app. So
>> >>> far it works fine but I cannot understand why I am getting:
>> >>>
>> >>>
>> >>>  ISIS METAMODEL
>> >>>VALIDATION
>> >>> ERRORS 
>>
>> >>>
>> >>>
>> >>> domainapp.dom.simple.Connections#autoComplete0Create: has prefix
>> >>> autoComplete, is probably a supporting method for a property,
>> >>>collection or
>> >>> action.  If the method is intended to be an action, then rename and
>>use
>> >>> @ActionLayout(named="...") or ignore completely using @Programmatic
>> >>>
>> >>>
>> >>> Please inspect the above messages and correct your domain model.
>> >>>
>> >>> for this:
>> >>> ...
>> >>>
>> >>> //region > create (action)
>> >>>
>> >>> public static class CreateDomainEvent extends ActionDomainEvent
>>{
>> >>>
>> >>> public CreateDomainEvent(final Connections source, final
>> >>> Identifier identifier, final Object... arguments) {
>> >>>
>> >>> super(source, identifier, arguments);
>> >>>
>> >>> }
>> >>>
>> >>> }
>> >>>
>> >>>
>> >>> @Action(
>> >>>
>> >>> domainEvent = CreateDomainEvent.class
>> >>>
>> >>> )
>> >>>
>> >>> @MemberOrder(sequence = "3")
>> >>>
>> >>> public Connection create(
>> >>>
>> >>> final @ParameterLayout(named="System A") System
>>systemA) {
>> >>>
>> >>> final Connection obj =
>> >>> container.newTransientInstance(Connection.class);
>> >>>
>> >>> obj.setName(systemA.getName());
>> >>>
>> >>> obj.setSystemA(systemA);
>> >>>
>> >>> container.persistIfNotAlready(obj);
>> >>>
>> >>> return obj;
>> >>>
>> >>> }
>> >>>
>> >>>
>> >>> public Collection autoComplete0Create(@MinLength(value = 1)
>>final
>> >>> String search) {
>> >>>
>> >>>  return systems.listAll();
>> >>>
>> >>> }
>> >>>
>> >>> ...
>> >>> }
>> >>>
>> >>> while using choices instead of autoComplete works fine:
>> >>>
>> >>>
>> >>> public Collection choices0Create() {
>> >>>
>> >>> return systems.listAll();
>> >>>
>> >>> }
>> >>>
>> >>> //public Collection autoComplete0Create(@MinLength(value = 1)
>>final
>> >>> String search) {
>> >>>
>> >>> //return systems.listAll();
>> >>>
>> >>> //}
>> >>>
>> >>>
>> >>>
>> >>> Matthias
>> >>>
>> >>>
>> >>>
>> >>>
>> >
>>
>>



Re: Invalid autoComplete Support method?

2015-09-27 Thread Martin Grigorov
Click  on text "Create", not on the "down arrow".

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Sun, Sep 27, 2015 at 8:26 PM, Burbach, Matthias 
wrote:

> that's exactly the button I have already tried, it brings up these three
> weird options...
>
> Am 27.09.15 20:23 schrieb "Martin Grigorov" unter :
>
> >Hi,
> >
> >Go to https://issues.apache.org/jira/browse/ISIS and use the blue Create
> >button at top center.
> >
> >Martin Grigorov
> >Wicket Training and Consulting
> >https://twitter.com/mtgrigorov
> >
> >On Sun, Sep 27, 2015 at 8:01 PM, Burbach, Matthias
> >
> >wrote:
> >
> >> Sorry, signed up for your JIRA, but I am confused by the create options,
> >> they are:
> >>
> >> * Kylin 
> >> * Atlas 
> >> * Apache Infrastructure
> >> 
> >>
> >> What do I have to choose to create that issue?
> >>
> >>
> >> Am 27.09.15 19:51 schrieb "Burbach, Matthias" unter
> >> :
> >>
> >> >Yes, tried Johan's proposal and it worked! Thanks a lot!
> >> >Will raise a ticket in your JIRA.
> >> >Matthias
> >> >
> >> >Am 27.09.15 19:48 schrieb "Dan Haywood" unter
> >> >:
> >> >
> >> >>If that's the reason, then we should fix this.
> >> >>
> >> >>Matthias, could you try out John's suggestion, and if it's correct
> >>then
> >> >>raise a ticket in our JIRA?
> >> >>
> >> >>Thx,
> >> >>Dan
> >> >>On 27 Sep 2015 18:46,  wrote:
> >> >>
> >> >>> Hi Matthias,
> >> >>>
> >> >>>
> >> >>>
> >> >>> Try to use List instead of collection. That worked for me.
> >> >>>
> >> >>>
> >> >>>
> >> >>> Grtz
> >> >>>
> >> >>>
> >> >>>
> >> >>> Johan
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>> - Original Message 
> >> >>>
> >> >>> From: "Burbach, Matthias"
> >> >>>
> >> >>> To: "users@isis.apache.org"
> >> >>>
> >> >>> Sent: Zon, 27 Sep 2015 17:20
> >> >>>
> >> >>> Subject: Invalid autoComplete Support method?
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>> Hi,
> >> >>> hope I am using the correct channel for this question. If not please
> >> >>>tell
> >> >>> me where I can best place such questions.
> >> >>>
> >> >>> I am going first steps with Apache Isis by modifying the simple
> >>app. So
> >> >>> far it works fine but I cannot understand why I am getting:
> >> >>>
> >> >>>
> >> >>>  ISIS METAMODEL
> >> >>>VALIDATION
> >> >>> ERRORS
> >>
> >> >>>
> >> >>>
> >> >>> domainapp.dom.simple.Connections#autoComplete0Create: has prefix
> >> >>> autoComplete, is probably a supporting method for a property,
> >> >>>collection or
> >> >>> action.  If the method is intended to be an action, then rename and
> >>use
> >> >>> @ActionLayout(named="...") or ignore completely using @Programmatic
> >> >>>
> >> >>>
> >> >>> Please inspect the above messages and correct your domain model.
> >> >>>
> >> >>> for this:
> >> >>> ...
> >> >>>
> >> >>> //region > create (action)
> >> >>>
> >> >>> public static class CreateDomainEvent extends ActionDomainEvent
> >>{
> >> >>>
> >> >>> public CreateDomainEvent(final Connections source, final
> >> >>> Identifier identifier, final Object... arguments) {
> >> >>>
> >> >>> super(source, identifier, arguments);
> >> >>>
> >> >>> }
> >> >>>
> >> >>> }
> >> >>>
> >> >>>
> >> >>> @Action(
> >> >>>
> >> >>> domainEvent = CreateDomainEvent.class
> >> >>>
> >> >>> )
> >> >>>
> >> >>> @MemberOrder(sequence = "3")
> >> >>>
> >> >>> public Connection create(
> >> >>>
> >> >>> final @ParameterLayout(named="System A") System
> >>systemA) {
> >> >>>
> >> >>> final Connection obj =
> >> >>> container.newTransientInstance(Connection.class);
> >> >>>
> >> >>> obj.setName(systemA.getName());
> >> >>>
> >> >>> obj.setSystemA(systemA);
> >> >>>
> >> >>> container.persistIfNotAlready(obj);
> >> >>>
> >> >>> return obj;
> >> >>>
> >> >>> }
> >> >>>
> >> >>>
> >> >>> public Collection autoComplete0Create(@MinLength(value = 1)
> >>final
> >> >>> String search) {
> >> >>>
> >> >>>  return systems.listAll();
> >> >>>
> >> >>> }
> >> >>>
> >> >>> ...
> >> >>> }
> >> >>>
> >> >>> while using choices instead of autoComplete works fine:
> >> >>>
> >> >>>
> >> >>> public Collection choices0Create() {
> >> >>>
> >> >>> return systems.listAll();
> >> >>>
> >> >>> }
> >> >>>
> >> >>> //public Collection autoComplete0Create(@MinLength(value = 1)
> >>final
> >> >>> String search) {
> >> >>>
> >> >>> //return systems.listAll();
> >> >>>
> >> >>> //}
> >> >>>
> >> >>>
> >> >>>
> >> >>> Matthias
> >> >>>
> >> >>>

Re: Invalid autoComplete Support method?

2015-09-27 Thread Martin Grigorov
Hi,

Go to https://issues.apache.org/jira/browse/ISIS and use the blue Create
button at top center.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Sun, Sep 27, 2015 at 8:01 PM, Burbach, Matthias 
wrote:

> Sorry, signed up for your JIRA, but I am confused by the create options,
> they are:
>
> * Kylin 
> * Atlas 
> * Apache Infrastructure
> 
>
> What do I have to choose to create that issue?
>
>
> Am 27.09.15 19:51 schrieb "Burbach, Matthias" unter
> :
>
> >Yes, tried Johan's proposal and it worked! Thanks a lot!
> >Will raise a ticket in your JIRA.
> >Matthias
> >
> >Am 27.09.15 19:48 schrieb "Dan Haywood" unter
> >:
> >
> >>If that's the reason, then we should fix this.
> >>
> >>Matthias, could you try out John's suggestion, and if it's correct then
> >>raise a ticket in our JIRA?
> >>
> >>Thx,
> >>Dan
> >>On 27 Sep 2015 18:46,  wrote:
> >>
> >>> Hi Matthias,
> >>>
> >>>
> >>>
> >>> Try to use List instead of collection. That worked for me.
> >>>
> >>>
> >>>
> >>> Grtz
> >>>
> >>>
> >>>
> >>> Johan
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> - Original Message 
> >>>
> >>> From: "Burbach, Matthias"
> >>>
> >>> To: "users@isis.apache.org"
> >>>
> >>> Sent: Zon, 27 Sep 2015 17:20
> >>>
> >>> Subject: Invalid autoComplete Support method?
> >>>
> >>>
> >>>
> >>>
> >>> Hi,
> >>> hope I am using the correct channel for this question. If not please
> >>>tell
> >>> me where I can best place such questions.
> >>>
> >>> I am going first steps with Apache Isis by modifying the simple app. So
> >>> far it works fine but I cannot understand why I am getting:
> >>>
> >>>
> >>>  ISIS METAMODEL
> >>>VALIDATION
> >>> ERRORS 
> >>>
> >>>
> >>> domainapp.dom.simple.Connections#autoComplete0Create: has prefix
> >>> autoComplete, is probably a supporting method for a property,
> >>>collection or
> >>> action.  If the method is intended to be an action, then rename and use
> >>> @ActionLayout(named="...") or ignore completely using @Programmatic
> >>>
> >>>
> >>> Please inspect the above messages and correct your domain model.
> >>>
> >>> for this:
> >>> ...
> >>>
> >>> //region > create (action)
> >>>
> >>> public static class CreateDomainEvent extends ActionDomainEvent {
> >>>
> >>> public CreateDomainEvent(final Connections source, final
> >>> Identifier identifier, final Object... arguments) {
> >>>
> >>> super(source, identifier, arguments);
> >>>
> >>> }
> >>>
> >>> }
> >>>
> >>>
> >>> @Action(
> >>>
> >>> domainEvent = CreateDomainEvent.class
> >>>
> >>> )
> >>>
> >>> @MemberOrder(sequence = "3")
> >>>
> >>> public Connection create(
> >>>
> >>> final @ParameterLayout(named="System A") System systemA) {
> >>>
> >>> final Connection obj =
> >>> container.newTransientInstance(Connection.class);
> >>>
> >>> obj.setName(systemA.getName());
> >>>
> >>> obj.setSystemA(systemA);
> >>>
> >>> container.persistIfNotAlready(obj);
> >>>
> >>> return obj;
> >>>
> >>> }
> >>>
> >>>
> >>> public Collection autoComplete0Create(@MinLength(value = 1) final
> >>> String search) {
> >>>
> >>>  return systems.listAll();
> >>>
> >>> }
> >>>
> >>> ...
> >>> }
> >>>
> >>> while using choices instead of autoComplete works fine:
> >>>
> >>>
> >>> public Collection choices0Create() {
> >>>
> >>> return systems.listAll();
> >>>
> >>> }
> >>>
> >>> //public Collection autoComplete0Create(@MinLength(value = 1) final
> >>> String search) {
> >>>
> >>> //return systems.listAll();
> >>>
> >>> //}
> >>>
> >>>
> >>>
> >>> Matthias
> >>>
> >>>
> >>>
> >>>
> >
>
>


Re: Automatic created-by and modified-by property updates

2015-09-27 Thread Stephen Cameron
Hi Dan,

I tried this and its not correct, I get the open and close methods being
called over and over whenever I open and close an object in the UI. but the
jdo listener method preStore (InstanceLifecycleEvent event) never gets
called.

I pictured open()  and close() being called just once as the DOMAIN service
singleton is created by Isis and then it listens on the JDO events as each
entity goes through its lifecycle.

 I will put this aside as its not the main priority. I'll read up and
understand the jdo events to find an answer, this must be close to correct.


On Wed, Sep 16, 2015 at 4:02 PM, Dan Haywood 
wrote:

> Hi Steve,
>
> Although there isn't any direct support for this, it's should be relatively
> easy to do by using the underlying JDO API.
>
> As a quick code sketch:
>
> public interface CreateTrackingEntity {
> void setCreatedBy(String createdBy);
> void setCreatedOn(DateTime createdOn);
> }
>
> public interface ModifyTrackingEntity {
> void setModifiedBy(String username);
> void setModifiedOn(DateTime modifiedOn);
> }
>
>
> Your entity should implement one or both of the above.
>
> Then, define a service such as:
>
> @RequestScoped
> @DomainService(nature=NatureOfService.DOMAIN)
> public class UpdateableEntityServices implements
> javax.jdo.listener.StoreLifecycleListener {
>
> @PostConstruct
> public void open() {
>
>
> isisJdoSupport.getJdoPersistenceManager().addInstanceLifecycleListener(this);
> }
>
> @PreDestroy
> public void close() {
>
>
> isisJdoSupport.getJdoPersistenceManager().removeInstanceLifecycleListener(this);
> }
>
> @Programmatic
> public void preStore (InstanceLifecycleEvent event) {
>
> final Object pi = event.getPersistentInstance();
>
> if(pi instanceof org.datanucleus.enhancement.Persistable) {
> boolean isPersistent =
> ((org.datanucleus.enhancement.Persistable)pi).dnIsPersistent();
>
> if(!isPersistent) {
> if(pi instanceof CreateTrackingEntity) {
>
>  ((CreateTrackingEntity)pi).setCreatedBy(container.getUserName());
>
>  ((CreateTrackingEntity)pi).setCreatedOn(clockService.nowAsDateTime());
> }
> } else {
> if(pi instanceof ModifyTrackingEntity) {
>
>  ((ModifyTrackingEntity)pi).setModifiedBy(container.getUserName());
>
>  ((ModifyTrackingEntity)pi).setModifedOn(clockService.nowAsDateTime());
> }
> }
> }
> }
>
> @Programmatic
> public void postStore (InstanceLifecycleEvent event) {
> // no-op
> }
>
> @Inject
> private DomainObjectContainer container;
>
> @Inject
> private ClockService clockService;
>
> @Inject
> private IsisJdoSupport isisJdoSupport;
> }
>
>
>
> 
> There is actually a ticket in JIRA for this [1], so I'll formalize this as
> a service in Isis 1.10.0.
>
> HTH
> Dan
>
> [1] https://issues.apache.org/jira/browse/ISIS-867
>
>
> On 16 September 2015 at 05:18, Stephen Cameron  >
> wrote:
>
> > Hi,
> >
> > Could someone please assist me in adding this capability, to automate the
> > creation and update of values in these standard fields
> >
> > created_by
> > created_on
> > modified_by
> > modified_on
> >
> > That is I need to set the first two on creating a new object, and the
> last
> > two on modifying an object.
> >
> > Thanks
> > Steve Cameron
> >
>


Re: security module questions

2015-09-27 Thread Stephen Cameron
re " I have the home page as it appears in the security demo"

sorry, that is not so, its the right 'welcome' page.  So must be just
permissions.

On Sun, Sep 27, 2015 at 5:13 PM, Dan Haywood 
wrote:

> Not sure.
>
> What I can tell you is that the home page is simply the result of the
> framework invoking a domain service annotated with @HomePage (or to be more
> precise, one that has a HomePageFacet). If one cannot be found in all of
> the services, then the index.html page (somewhere in the webapp module and
> as specified in your app's subclass of IsisWebApplication) will be
> rendered. If more than one such service can be found, then the app will
> fail to boot with a metamodel validation error.
>
> My guess is that the domain service you have with an @HomePage annotation
> isn't within the last of packages derived from the module package names. As
> a quick check, you could add the service class itself to the list returned
> from getModules() and see what happens.
>
> With respect to the marker classes you've added for security module, there
> is a class called simply SecurityModule that you could use.
>
> HTH
>
> Dan
> On 27 Sep 2015 07:42, "Stephen Cameron" 
> wrote:
>
> > I see the following on the home page always, even when a new user logs in
> > other than isis-module-security-admin:
> >
> > Apache Isis ™ is a platform to let you rapidly
> > develop domain-driven apps in Java.
> >
> > This app has been generated using Apache Isis' SimpleApp
> >  >
> > archetype, to create a purposefully minimal application that nevertheless
> > includes fixture data, integration tests and BDD specs.
> >
> > The app itself consists of a single domain class, SimpleObject
> > <
> >
> https://github.com/apache/isis/blob/master/example/application/simple%61pp/dom/src/main/java/dom/simple/SimpleObject.java
> > >,
> > along with an equally simple (factory/repository) domain service,
> > SimpleObjects
> > <
> >
> https://github.com/apache/isis/blob/master/example/application/simple%61pp/dom/src/main/java/dom/simple/SimpleObjects.java
> > >.
> >
> >
> > For more details, see the Apache Isis website
> > .
> >
> > On Sun, Sep 27, 2015 at 3:40 PM, Stephen Cameron <
> > steve.cameron...@gmail.com
> > > wrote:
> >
> > > Hi,
> > >
> > > I am making use of the Apache Isis security module addon. I've
> configured
> > > it using the new App Manifest means, but have one issue, which is how
> is
> > > the home page being created now?
> > >
> > > I have the home page as it appears in the security demo, rather than
> the
> > > one that I created in my app.  Its not clear to me why Isis is picking
> up
> > > the alernative SecurityModuleApplication rather than my customised
> > > HomePageViewModel.
> > >
> > > To make it work with the AppManifest, I have the following:
> > >
> > > package domainapp.app;
> > >
> > > import java.util.Arrays;
> > > import java.util.Collections;
> > > import java.util.List;
> > > import java.util.Map;
> > >
> > > import org.apache.isis.applib.AppManifest;
> > > import org.apache.isis.applib.fixturescripts.FixtureScript;
> > > import org.isisaddons.module.security.dom.DomainAppSecurityDomModule;
> > > import org.isisaddons.module.security.seed.DomainAppSecuritySeedModule;
> > >
> > > import au.com.scds.chats.dom.DomainAppDomainModule;
> > >
> > > import domainapp.fixture.DomainAppFixtureModule;
> > >
> > > /**
> > >  * Bootstrap the application.
> > >  */
> > > public class DomainAppAppManifest implements AppManifest {
> > >
> > > /**
> > >  * Load all services and entities found in (the packages and
> > > subpackages within) these modules
> > >  */
> > > @Override
> > > public List getModules() {
> > > return Arrays.asList(
> > > DomainAppDomainModule.class,  // domain (entities and
> > > repositories)
> > > DomainAppFixtureModule.class, // fixtures
> > > DomainAppAppModule.class,  // home page service etc
> > > DomainAppSecurityDomModule.class,  //security
> > > DomainAppSecuritySeedModule.class, //seed the security
> > > admin user
> > >
> > > org.isisaddons.wicket.gmap3.cpt.service.Gmap3ServiceModule.class
> //Google
> > > Gmap Geocoding Service
> > > );
> > > }
> > >
> > > /**
> > >  * No additional services.
> > >  */
> > > @Override
> > > public List getAdditionalServices() {
> > > //return Collections.emptyList();
> > > return Arrays.asList(
> > >
> > >
> >
> org.isisaddons.module.security.dom.password.PasswordEncryptionServiceUsingJBcrypt.class,
> > >
> > >
> >
> org.isisaddons.module.security.dom.permission.PermissionsEvaluationServiceAllowBeatsVeto.class
> > > );
> > > }
> > >
> > >
> > > I've added these two 

Re: security module questions

2015-09-27 Thread Stephen Cameron
sure enough, when I gave package access to domainapp.app.services.homepage
to my general user - Voila!

On Sun, Sep 27, 2015 at 6:09 PM, Stephen Cameron  wrote:

> re " I have the home page as it appears in the security demo"
>
> sorry, that is not so, its the right 'welcome' page.  So must be just
> permissions.
>
> On Sun, Sep 27, 2015 at 5:13 PM, Dan Haywood  > wrote:
>
>> Not sure.
>>
>> What I can tell you is that the home page is simply the result of the
>> framework invoking a domain service annotated with @HomePage (or to be
>> more
>> precise, one that has a HomePageFacet). If one cannot be found in all of
>> the services, then the index.html page (somewhere in the webapp module and
>> as specified in your app's subclass of IsisWebApplication) will be
>> rendered. If more than one such service can be found, then the app will
>> fail to boot with a metamodel validation error.
>>
>> My guess is that the domain service you have with an @HomePage annotation
>> isn't within the last of packages derived from the module package names.
>> As
>> a quick check, you could add the service class itself to the list returned
>> from getModules() and see what happens.
>>
>> With respect to the marker classes you've added for security module, there
>> is a class called simply SecurityModule that you could use.
>>
>> HTH
>>
>> Dan
>> On 27 Sep 2015 07:42, "Stephen Cameron" 
>> wrote:
>>
>> > I see the following on the home page always, even when a new user logs
>> in
>> > other than isis-module-security-admin:
>> >
>> > Apache Isis ™ is a platform to let you rapidly
>> > develop domain-driven apps in Java.
>> >
>> > This app has been generated using Apache Isis' SimpleApp
>> > <
>> http://isis.apache.org/intro/getting-started/simple%61pp-archetype.html>
>> > archetype, to create a purposefully minimal application that
>> nevertheless
>> > includes fixture data, integration tests and BDD specs.
>> >
>> > The app itself consists of a single domain class, SimpleObject
>> > <
>> >
>> https://github.com/apache/isis/blob/master/example/application/simple%61pp/dom/src/main/java/dom/simple/SimpleObject.java
>> > >,
>> > along with an equally simple (factory/repository) domain service,
>> > SimpleObjects
>> > <
>> >
>> https://github.com/apache/isis/blob/master/example/application/simple%61pp/dom/src/main/java/dom/simple/SimpleObjects.java
>> > >.
>> >
>> >
>> > For more details, see the Apache Isis website
>> > .
>> >
>> > On Sun, Sep 27, 2015 at 3:40 PM, Stephen Cameron <
>> > steve.cameron...@gmail.com
>> > > wrote:
>> >
>> > > Hi,
>> > >
>> > > I am making use of the Apache Isis security module addon. I've
>> configured
>> > > it using the new App Manifest means, but have one issue, which is how
>> is
>> > > the home page being created now?
>> > >
>> > > I have the home page as it appears in the security demo, rather than
>> the
>> > > one that I created in my app.  Its not clear to me why Isis is
>> picking up
>> > > the alernative SecurityModuleApplication rather than my customised
>> > > HomePageViewModel.
>> > >
>> > > To make it work with the AppManifest, I have the following:
>> > >
>> > > package domainapp.app;
>> > >
>> > > import java.util.Arrays;
>> > > import java.util.Collections;
>> > > import java.util.List;
>> > > import java.util.Map;
>> > >
>> > > import org.apache.isis.applib.AppManifest;
>> > > import org.apache.isis.applib.fixturescripts.FixtureScript;
>> > > import org.isisaddons.module.security.dom.DomainAppSecurityDomModule;
>> > > import
>> org.isisaddons.module.security.seed.DomainAppSecuritySeedModule;
>> > >
>> > > import au.com.scds.chats.dom.DomainAppDomainModule;
>> > >
>> > > import domainapp.fixture.DomainAppFixtureModule;
>> > >
>> > > /**
>> > >  * Bootstrap the application.
>> > >  */
>> > > public class DomainAppAppManifest implements AppManifest {
>> > >
>> > > /**
>> > >  * Load all services and entities found in (the packages and
>> > > subpackages within) these modules
>> > >  */
>> > > @Override
>> > > public List getModules() {
>> > > return Arrays.asList(
>> > > DomainAppDomainModule.class,  // domain (entities and
>> > > repositories)
>> > > DomainAppFixtureModule.class, // fixtures
>> > > DomainAppAppModule.class,  // home page service
>> etc
>> > > DomainAppSecurityDomModule.class,  //security
>> > > DomainAppSecuritySeedModule.class, //seed the security
>> > > admin user
>> > >
>> > > org.isisaddons.wicket.gmap3.cpt.service.Gmap3ServiceModule.class
>> //Google
>> > > Gmap Geocoding Service
>> > > );
>> > > }
>> > >
>> > > /**
>> > >  * No additional services.
>> > >  */
>> > > @Override
>> > > public List getAdditionalServices() {
>> > > //return 

title() value appears in table

2015-09-27 Thread Stephen Cameron
Hi,

I am not sure if this is correct, that a title() value appears in a
collection table column?

In my Note class I have:

// region > identificatiom
@PropertyLayout(hidden = Where.ALL_TABLES)
public String title() {
return "Note: " + getSubject();
}

// endregion

// region > name (property)

private String subject;

@Column(allowsNull = "false", length = 40)
@MemberOrder(sequence = "1")
public String getSubject() {
return subject;
}

public void setSubject(final String subject) {
this.subject = subject;
}


Title is appearing, along with Subject, even though I have attempted to
hide it.


Re: title() value appears in table

2015-09-27 Thread Stephen Cameron
This is in my polymorphic linked Note object, so suspect that is the reason
for the behaviour.



On Sun, Sep 27, 2015 at 8:36 PM, Stephen Cameron  wrote:

> Hi,
>
> I am not sure if this is correct, that a title() value appears in a
> collection table column?
>
> In my Note class I have:
>
> // region > identificatiom
> @PropertyLayout(hidden = Where.ALL_TABLES)
> public String title() {
> return "Note: " + getSubject();
> }
>
> // endregion
>
> // region > name (property)
>
> private String subject;
>
> @Column(allowsNull = "false", length = 40)
> @MemberOrder(sequence = "1")
> public String getSubject() {
> return subject;
> }
>
> public void setSubject(final String subject) {
> this.subject = subject;
> }
>
>
> Title is appearing, along with Subject, even though I have attempted to
> hide it.
>
>
>
>
>
>